# Perspective Map Initial Position

**URL:** <https://forum.inductiveautomation.com/t/perspective-map-initial-position/32970>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 10, 2020, 1:19pm UTC](https://forum.inductiveautomation.com/t/perspective-map-initial-position/32970 "2020-03-10T13:19:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iscrac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/iscrac/32/49757_2.png) [@iscrac](https://forum.inductiveautomation.com/u/iscrac)\
**Post date:** [March 10, 2020, 1:19pm UTC](https://forum.inductiveautomation.com/t/perspective-map-initial-position/32970/1 "2020-03-10T13:19:40Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 10, 2020, 2:13pm UTC](https://forum.inductiveautomation.com/t/perspective-map-initial-position/32970/2 "2020-03-10T14:13:36Z")

</div>

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)

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

```

Here is the [documentation](https://docs.inductiveautomation.com/display/DOC80/Perspective+-+Map#expander-1382997745) for the Map’s component methods.

---

<div class="post-metadata">

**Author:** ![iscrac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/iscrac/32/49757_2.png) [@iscrac](https://forum.inductiveautomation.com/u/iscrac)\
**Post date:** [March 12, 2020, 8:37am UTC](https://forum.inductiveautomation.com/t/perspective-map-initial-position/32970/3 "2020-03-12T08:37:15Z")

</div>

Thanx a lot! It works so beautifully! ❤
