Customize web map layerId in arcgis online

12-10-2018 10:36 AM
Status: Open
Occasional Contributor III

Now that the web map model is becoming easier to use (ie via the 4.x api esri/WebMap), it would be nice if ArcGIS online had support for setting the layerId in a web map. The autogenerated layer id is difficult to use because it generally does not reference the layer in any way, it instead becomes something like

layer_service_name_xxxx where the x's are just random numbers.

I know, AGO assistant can do this, and it does. But it would be much more convenient to have the options in the layer properties dialog of AGO, so while customizing a web map I might be able to set this property.

Why would setting a layer ID be beneficial?

Custom apps that use this webmap model will create a map that has these layer ID's. Now imagine trying to configure one of these custom apps to look up a layer by ID for some custom functionality, like a table query. It will be more difficult because each ID in the web map is sort of long and complicated, as well as not directly related to the layer's name at all. If we could set this ID in a web map properties, or even VIEW the layerID in the web map, this might be a lot easier.