Hello,
Can anyone help me understand what the purpose of the “id” attribute is in the json of a web map is for. I’m changing out the “url” attribute to change the source of the data.
Basically, what I am doing is cloning the maps (with Python API) from our stagging to our Production. When there is a map service, I know it can’t copy over the content, so it just copies over the reference URL to the source. So, when it is copied over I use ArcGIS Assistant to change the “url” source to a production url. Everything seems to be working just fine.
However, I see “id” attribute. What is the purpose of this attribute and will it affect anything (web app, WAB, dashboards , ect).
Do I need to change this as well ? Everything seems to being working great with the new source. So not sure what it is all about ?
See image below.
Solved! Go to Solution.
That ID is auto-assigned to layers in the map to ensure that each layer in the map can be uniquely identified. It's entirely possible to add multiple layers to your map that share the same name, URL, or both! Not that you would want to have to versions of the same layer added to your map with the same name, but there are situations where this is done for the sake of symbology, filters, etc.
If I had a service "parcels" located at /rest/services/hosted/Parcels/FeatureServer/0, and I had it added twice, the map will still need some way to keep track of one versus the other in order to store its symbology/popup/etc settings separately.
That ID is auto-assigned to layers in the map to ensure that each layer in the map can be uniquely identified. It's entirely possible to add multiple layers to your map that share the same name, URL, or both! Not that you would want to have to versions of the same layer added to your map with the same name, but there are situations where this is done for the sake of symbology, filters, etc.
If I had a service "parcels" located at /rest/services/hosted/Parcels/FeatureServer/0, and I had it added twice, the map will still need some way to keep track of one versus the other in order to store its symbology/popup/etc settings separately.
Ahh yeah I see great. So yeah that makes sense.
So there is no need to change that ID to anything else.
Thank you for the explanation
> So there is no need to change that ID to anything else.
Depends how you use your web map.
If you're using an Instant App like Countdown (or any other app that needs to refer to specific layers), then that "id" is the key connector and changing it will break those apps.
If you have "presentations" as part of your webmap, then that uses the "id" to keep track of the layers.