Web Map changes break Web App

156
11
04-16-2019 08:36 AM
New Contributor II

I've created a web map and web application using Developer WAB, when I swapped layers using the Admin Tools (find/replace layers using url), the web app broke (See image below for web app and console error). However the web map still works when launched independently.

The only workaround I have found is to make a copy of the map and switch the web map id in the application. However this is not ideal as we would have to do this everytime we need to swap layers. 

Has anyone experienced anything similar and found a fix?

Reply
0 Kudos
11 Replies
MVP Esteemed Contributor

Hayleigh,

   The likely issue is that the wab app is maintaining one or more references to a particular layer that was in the web map that is not now. In WAB dev try removing the layerlist widget and the legend widget and readding them. You will need to do the same for any other widgets that have a specific reference to the web map layers (i.e. query widget, filter widget, etc).

Reply
0 Kudos
New Contributor II

Hi Robert,

Thanks for the quick response! I am using the admin tools to swap my layers and am not removing any layers or changing any layer id's. Since I am simply changing the urls for the layers to reference a new urls. I don't believe this should have any references in the web application? Is that correct?

Reply
0 Kudos
MVP Esteemed Contributor

So are the layers identical (i.e fields and same layer ids) and the only thing that is changing is the url where that layer is coming from?

Reply
0 Kudos
New Contributor II

Yes it is just imagery, however the only difference is we are swapping from a map service to image service, could this be causing an issue?

Reply
0 Kudos
MVP Esteemed Contributor

Absolutely.

New Contributor II

I tried to replicate this and was unsuccessful. It appears swapping the map service with the image service is not causing any issues. 

Reply
0 Kudos
MVP Esteemed Contributor

And how exactly did you replicate this?

Reply
0 Kudos
New Contributor II

I made a map with the original imagery layers (map services) and then swapped them with the new layers (image services), and the map still loaded in the application. 

Reply
0 Kudos
MVP Esteemed Contributor

OK,  but that says nothing about any widgets that were originally configured to use the map service and then you switched the webmap to have images services.

Reply
0 Kudos