Select to view content in your preferred language

Web Map changes break Web App

2522
11
04-16-2019 08:36 AM
HayleighPervorse1
Emerging Contributor

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?

0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus

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).

0 Kudos
HayleighPervorse1
Emerging Contributor

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?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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?

0 Kudos
HayleighPervorse1
Emerging Contributor

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?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Absolutely.

HayleighPervorse1
Emerging Contributor

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

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

And how exactly did you replicate this?

0 Kudos
HayleighPervorse1
Emerging Contributor

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. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos