Set initial extent not working after deploy?

2034
2
Jump to solution
01-12-2016 10:50 AM
RobertSommers
New Contributor II

I'm curious if anyone else is having this problem or has found a way to deal with it:

When I create a new App in Developer I have to choose a web map.  In the web map I have chosen to use the "Web Map's Default Extent" at app initialization.  So, every time the app is initialized it should start at the web map's default extent. 

After I deploy the app to our server, however, this default extent preference seems to be "broken".  For example, if I zoom in to the map, then I close the browser window, and then I go back to the map, it initializes at my last view. 

Am I missing a setting?  Does anybody else have this issue?  Thanks.

0 Kudos
1 Solution

Accepted Solutions
RobertSommers
New Contributor II

Thanks, Robert

I just had to comment out the onBeforeUnload function in MapManager.js and it does not save the last extent anymore.

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Derrick,

   See this thread for an explanation and work around:

How to turn off new "auto saved map extent and layer visibility" in Nov 2015 update?

RobertSommers
New Contributor II

Thanks, Robert

I just had to comment out the onBeforeUnload function in MapManager.js and it does not save the last extent anymore.

0 Kudos