Perspective Map Initial Position

Hi Everyone,

Is there any possibility for backing map to initial position?
When user moving or zooming map, so sometimes happens, that map looses it’s initial position and client has to reload page or search for markers by himself.
I thought a lot about how to implement this option, but my method (actually I set a session tag to True and if this tag is true, so the script works like that: it navigates page to ‘/’ and back (for example) to ‘/map’ and sets the tag to False) doesn’t work when the page is opened in embedded view…

it just won’t work and I am sad about it…
I hope somebody had the same situation and somehow fixed it… please give some advice…

Thanx in Advance!

Instead of forcing navigation, you can use component methods to “fly” or “pan” to a specified lat/long.

In a Scripting Action (you determine how this is triggered)

self.getSibling('Map').flyTo(latLng={'lat':<latitude>}, 'lng':<longitude>)

Here is the documentation for the Map’s component methods.

Thanx a lot! It works so beautifully! :heart:

1 Like