Open map on current location HERE() and adjust zoom level

There is no way to jump to the current location in a map, like we have in google maps.

image

I found a workaround, using an Action.

Here is the Expression:

LINKTOVIEW("Your_Map_View")
&"&_currentLat="&(LAT(HERE()))
&"&_currentLng="&(LONG(HERE()))
&"&_zoom=17"

This will open your Map view centered to your location. You can adjust the zoom level as you need it. From 0 to 21.

Nothing else is needed, no User Settings, no Virtual Column.

This action can be placed in a Detail / Deck / Table / Card view. It can not be placed in a map view (which would be awesome).

With LINKTOFILTEREDVIEW() you can jump to a map based on conditions.

14 Likes

With _currentLat= and _currentLng= in XY map view you can jump to a point without selecting the pin.
This maybe helpful when you like to only see one area.
But you have to calculate the XY to a LatLong.
This can be combined also with _zoom=
This expression is working:

LINKTOFILTEREDVIEW(My_Map_View , ANY_CONDITION)
&'&_currentLat='&(LONG([_THISROW].[XY])/100*90-45)
&'&_currentLng='&(LAT([_THISROW].[XY])/100*180-90)
&'&_zoom=2'
5 Likes

The zoom level is not working with SNAPSHOT().
If you use
<<SNAPSHOT(LINKTOVIEW("YourMapView")&"&_zoom=17")>>
in your workflow attachment, you will get the snapshot, but the zoom level will not be respected.

Yes I have been using Appsheet for 3+ years now and in the past the map views would automatically center on a user’s current location, but now they seem to always start at the first address in the table for some reason.

This is very annoying, is there no solution that works to resolve this bug? The workaround action doesn’t work in map views and so there’s no real way for me to fit it within my current app…

1 Like

Do you have Here() expression in your latlong fields as initial value?

My table only uses the phys addresses, no latlong fields are available

I suggest you take this matter up with support@appsheet.com. This may be a bug.

1 Like

Yea, I did open a case and now they’re telling me that this was never the way Appsheet worked (centering on the map) though my experience tells me otherwise and I’ve seen others comment in the forums with the same experience as me, as far back as Sept '20, noting that the behavior has changed…

From support:

“AppSheet never supported a ‘center location’ feature in Map view, the default behavior is to load all the locations and put them in the map.
However, when these pins are more than 200, AppSheet limit the view to the first 200 and this might generate the false idea that AppSheet is centering the map.”

2 Likes

What that tells me is that the behavior you’d experienced in the past was not intentional by AppSheet–it just happened to work that way. Since it wasn’t intentional, they felt no obligation to keep it. I don’t necessarily agree, but that’s probably the thinking.

1 Like

From my point of view it is essential to keep the zoom and the place where I am working all the time, or at least to have a Here() button on the map.

After months of development and with the application at 90% I’m about to lose a client because the user experience with the map is horrible because the map is not being displayed.
Please review this, it’s very important.

It would also be great if the map itself serves as a filter and only the items shown on the map are shown in the list.

1 Like

Hi @Mariano_Sanz_Gil , Appsheet newbie here but does the OP @Fabian 's solution not work for your use case?

Sorry I just skimmed through the thread but got confused as I thought that’s why he posted the solution since it was a workaround. I’m about to give it a shot but not sure if it no longer works.

Thanks!

Maybe this has never worked right, or maybe AppSheet changed something. The correct expression now should be:

LINKTOFILTEREDVIEW(My_Map_View , ANY_CONDITION)
&'&_currentLat='&((LONG([_THISROW].[XY])/100*90-45)/2)
&'&_currentLng='&(LAT([_THISROW].[XY])/100*90-45)
&'&_zoom=2'