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

15842
53
11-19-2015 07:53 AM
DanAllen
Occasional Contributor III

The November 2015 ArcGIS.com update has a new feature listed for Web AppBuilder where the app automatically saves your last location and layer visibility for the next time you open the app.  HOW DO I TURN THIS OFF?  This seems to be causing issues with map layers not loading that are coming from our internal server.  Plus, I want all the layers to go back to the map default each time on map open.

Thanks

Dan

Tags (1)
53 Replies
Jianxia
Esri Regular Contributor

Dan,

We are able to reproduce and looking into the issue. Thanks for letting us know.

Jianxia

JasonSmith6
New Contributor III

Jianxia,

I am also having the same issue as Dan in WAB.  Layers that are checked by default inside grouped layers are turning off after you refresh the browser or don't clear the cookies.  I hope a solution provided soon.  The only workaround I could find was to either set the cookies to clear on exit, or add the "&level=1" to the end of the URL.

Jason

Jianxia
Esri Regular Contributor

Jason,

The issue on sub-layers in a group being turned off has been submitted. It has something to do with Layer List in conjunction with app state. It is a bit complicated. We decided to move it to the March release for a holistic approach. Sorry for any inconvenience.

Thanks for  sharing the workaround,

Jianxia

MichaelPotter1
New Contributor III

Hi Jianxia,

Having the ability for the users to be able to reset the app state would be, in my opinion, very useful. Maybe a button by the navigation tools.

In my experience many users just do not understand what you are saying when you tell them to clear their browsing history in order to reset their layer visibility back the the default settings.

Hopefully this is an option that can be added in the next release.

Regards,

Michael

ChrisMathers
Occasional Contributor III

I agree. It should be defaulted to off and have an option in a widget to let users enable. It is very confusing behavior if you don't expect it.

JakubSisak
Occasional Contributor III

Adding ampersand "&" to the end of my URL (without any parameters) worked for me. You can redirect the URL and modify the index.htm to do this automatically. 

0 Kudos
JunshanLiu
Occasional Contributor III

There will be a new function in MapManager.js, called onBeforeUnload, you can remove code in this function and app state will net be saved.

ChrisMathers
Occasional Contributor III

Thats good to know. It should be documented somewhere as the current solution.

KimBülow
New Contributor III

it is this line

//onBeforeUnload: function() {

//  this.appStateManager.saveWabAppState(this.map, this.layerInfosObj);

//}
to comment out two lines in MapManager.js
so that the layer is not turned off by close of browser window, and window opens again as normal.

It looks to edit widget also has problems similar to ?
Editor can not show, "read only layers" but only layers with edit abled layers:
but if you insert read only layer in editor.json config file, and sets them as read only, displays both read only and write in pop-up window by editing, as the old edition WAB DEV 1.2
popup edit with read only layers.PNG

Jianxia
Esri Regular Contributor

Kim,

We refactor Edit widget in AGOL Nov. Update and Dev Edition 1.3. Since we don't have Display field option in Configure Layer Fields window like Map Viewer, what you see is expected currently. We will add Display field in the next release to resolve it.

Thanks,

Jianxia

0 Kudos