Operational Layer IDs Standard

552
2
01-15-2018 03:38 AM
Status: Open
SabriGhaith
New Contributor III

Whenever you deal with operational layers, you probably have to know the "layer id", and for some reasons, the developer have to keep track and make sure that the layer id does not changed with respect to the web map.

I believe, the web map should follow a standard when assigning id(s) to the operational layers so that developer's code still running even the layer deleted from the web map and added again with a new layer id.

For example:

If you have this layer id "WORLD_BORDERS_9242" and you use it in the code or in config.json. If you remove the layer from the web map and added it again, it will have different layer id (maybe "WORLD_BORDERS_627" ), and you must to modify the code/config.

If the suffix "9242" has a meaning, we can design our own pattern to expect the layer id.

Thanks,

2 Comments
BrianCollins

We've just encountered this issue with an implementation of the Query Widget in WAB. We have a custom widget that toggles the primary config.json file in order to reload a new web map (58 maps in total). Each of the web maps were duplicated from the same source and they contain the same layers; however, the suffix for each of the operational layers is unique, which in turn breaks the Query Widget for all but the original map. Annoying!!!

by Anonymous User

In 10.3 or 10.4, they added possibility where the layerID won't change, but you have to explicitly check that option in the data frame options when you publish the service from ArcMap. However, I've seen even with that checked that popups get messed up if you change layer order or schema.  

Map authoring considerations—Documentation | ArcGIS Enterprise