use layer URL in all webapp builder configs; not webmap id

06-24-2019 02:57 PM
Status: Open
Frequent Contributor

Another reason the json needs to sync in webmaps.


The Situational Awareness widget and some others, like Query, instead of referring to the service, refer to the webmap service layer id.  It would be better if all WAB widgets from Esri would point to the service. Like Robert's eSearch. Why? Because I cloned my app. I then pointed to another service, where I simply added a few more layers. I thought I could just copy the Situational Awareness widget config. Nope. Like for Query, it did not work. The reason? Instead of simply pointing to a service then configuring fields like Robert's eSearch, which would simply enable Search and Replace to swap out URLs for a service in the Config... it uses the webmap server and layer id. Which change. And get hardcoded in json. So two requests:  1) do not use webmap id in config files. Use the service URL itself ONLY.  2) make webmaps json stay in sync with service as in idea above so we don't need to keep re-adding services if we add a layer and also if we DO re-add the service, keep the id's the same or let us change them back, and with a supported tool not an unsupported workaround 


In short, can it please be considered to make your config files like Robert's eSearch. Point to a service, and configure fields.  Do not point to the intermediary webmap json layer id because it is a problem for a number of reasons. The way it currently works, using the webmap 'service id' is simply more work and less reliable than pointing straight to a URL and layer id.

1 Comment

I added 1 layer today, and now I have to redo Situation Awareness and Query.  This should be an easy fix (don't wire to webmap layer ID but directly to LayerID of the service! Like most other widgets, and like how Robert does eSearch)  that would save people a huge amount of time.  Fortunately I replaced the webmaplayer ID (example SAGISOrg_7276 to SAGISOrg_4455 just for example, the four numbers change) in the Config file and this worked. However for those without Dev Edition this would be a good update.