Optionally change the default zoom level for map view

Upon selecting latlon type fields, ref action is fired to open up map view with selected location sitting in the middle of the view.

I wish to have control over the default zoom level. Depending on the use case what sort of property we would like to locate on map view, sometime it is helpful to view the pin with street level (zoom in deeply) and sometime we have track the position of the ocean going vessels, i.e. the location is always in the middle of the sea somewhere. For the case we locate the vessel position on the map, we always see the blue background… Zooming in too much, not sure where it is instantly, but need to go to lower zoom level to see where it is.

Ideally I, as App creator, wish to have option to control the default zoom level. Google map API should have params in terms of zoom level, so I hope this can be easily accommodated by good hands of Appsheet dev team!

Status Open
12 18 3,516
18 Comments
Grant_Stead
Silver 5
Silver 5

Voted

Grant_Stead
Silver 5
Silver 5

@TDhers Would love to be able to effect the map/xy auto zoom. Currently it automatically zooms into the pins on the map. Especially for XY, it would be nice, preferable even, to be able to set the map auto zoom to off, or a different level. Maybe this could be another project for new engineers?

TDhers
New Member

Thank you Grant. @Arthur_Rallu do you mind adding that to WIP please?

Fabian_Weller
Gold 1
Gold 1

Exactly @Grant_Stead! It should not zoom into a XY map, but it should show the whole XY image.

gretiere
Bronze 5
Bronze 5

I do agree. Sometimes we need to display maps with a low zoom level (country or region for example), so the user can have a big picture and optionnally zoom in if he/she wants to do so. Hence it would be great to pass the zoom level as an argument.

Jamie
Bronze 5
Bronze 5

Voted. I agree! Using map in a dynamic dashboard if I have no record selected, it zooms out to all pins in the world, which is great. But then when I select a record I would like it to zoom down at least to the city level. This may not be exactly what others are looking for, but some control over zoom would be great.

Fabian_Weller
Gold 1
Gold 1

Hi @tsuji_koichi today I found something that may help you. In Browser Version I saw the URL contains a
&_zoom=1.

https://www.appsheet.com/start/a3cb4f1d-c24b-48d8-9f52-99c6a0e1019c#_currentLat=0&_currentLng=0&_mapType=image&_zoom=1&appName=KML-549987&defaults=%5B%7B%22ColumnName%22%3A%22ID%22%2C%22ColumnValue%22%3A%22e7b8bc81%22%7D%5D&page=google-map&table=Image_Overlay_Slice&view=Map_Image_Overlay

The XY map view opens up showing the whole Image.
When you change it to &_zoom=2 or &_zoom=3 it will zoom in.

Maybe you can play around with this and change the ref action

Koichi_Tsuji
Gold 4
Gold 4

Thank you Fabian.

Obviously Appsheet should be using Google Map API, where they provide the property and params to control the default zoom level.

To consume Google Map API, Appsheet is throwing the various different property, inc the map zoom level, but it looks to be some sort of “hard-coded” to be 1

We wish to have the option in appsheet editor where the app creator can explicitely and manually set the map default zoom level and pass to Google MAP api to customize the appearance on opening map within Appsheet.

@TDhers — We are trying to keep you guys busy with requirement, requirements.

Fabian_Weller
Gold 1
Gold 1

Until then we can determine the zoom level in the LINKTOVIEW() Action.

ryanseamons
New Member

Any details on how to do this? I’m having a hard time passing the zoom param in and unsure if I’m using the LINKTOVIEW() action correctly.

I’m trying to figure out how to get a certain map to show up centered on my current location with a specific zoom level.

Thanks.

Fabian_Weller
Gold 1
Gold 1

Hi @ryanseamons please see this post:

ryanseamons
New Member

Thanks! This is great.

The only challenge is that I can’t use that for the main navigation tabs, which would be ideal.

Fabian_Weller
Gold 1
Gold 1

What do you mean by this?

Koichi_Tsuji
Gold 4
Gold 4

Not sure what it is , but is it something like this?

For this app, i have two map views for instance, one for all the pins (but the current location is always centered) as well as another view just showing the pins within N km from the current locations, again the current position is always centered.

Steve
Platinum 4
Platinum 4

My guess:

3X_e_6_e6bd233a9012916fc5390551b1760c2d47d78e9a.png