Select to view content in your preferred language

Provide static layer IDs for OGC WMS layers

549
3
12-02-2024 11:24 AM
Status: Open
Labels (1)
johnolulu
Emerging Contributor

The documentation for "Assign layer IDs " instructs the administrator on how to set up static layer IDs:

https://pro.arcgis.com/en/pro-app/latest/help/sharing/overview/assign-layer-ids.htm

Unfortunately, even when that feature is enabled, this behavior does not extend to the OGC "WMS" layer IDs. These numeric layer IDs continue to be automatically assigned based on each layer's order in the group, so they sometimes change when new layers are inserted above them in the stack order. This forces all WMS users to update their client code and websites to use the new numeric layer ID after an update is published, which is undesirable. For this reason, it would be really great if the same static, unique layer IDs were used by all services that ArcGIS publishes, including the WMS service. I am one of the end users of the WMS, not an administrator myself.

To provide a specific example, see the following WMS GetCapabilities XML snippet from an ArcGIS WMS service:
 
<Layer queryable="1">
    <Name>25</Name>
    <Title>State Land Use Districts</Title>
As you can see, ArcGIS assigns a layer ID (in the "Name" field) of "25". In this example, the Name value has changed a number of times since its original publication from 17 to 22, to 23, back to 22, then to 23, 24, and now 25, etc. as layers have been added or removed above it in its group. If this layer ID was static and stayed the same between updates, as is true for other ArcGIS services, myself and other users would not need to modify their client code and websites to point at the new layer ID when this happens.
 
Many thanks for your consideration in implementing this enhancement request.
 
3 Comments
SrinivasVinnakota

WMS services have the option to "Use layer names from the map document" that provide a static name for a layer. This id would remain static as long as the layer name isn't modified. 

 

Documentation: https://enterprise.arcgis.com/en/server/latest/publish-services/windows/available-wms-service-proper...

johnolulu

Thanks for this suggestion, @SrinivasVinnakota . However, sometimes the layer names are quite long and unwieldy and thus make for undesirable layer identifiers: e.g. "1% Coastal Flood Zone with 3.2 ft Sea Level Rise - Statewide". It would be more helpful if the numeric layer IDs could be made static. Plus, users are already using these and would otherwise break access if all were changed now. I have noticed that the REST services do, in contrast, have persistent numeric layer IDs. Could not the same persistent REST numeric layer IDs be the source for the WMS numeric layer IDs?, rather than relying on a number based off of layer order? This not only has the benefit of being persistent, but also matches the layer ID that is published for the dataset elsewhere in ArcGIS via its REST services. A user can then have one layer ID for the dataset and use it for both REST and WMS services, and have the confidence of knowing it will persist. Many thanks for your time and consideration of this request.

SrinivasVinnakota

@johnolulu thank you for your feedback! We’ll take another look at this development experience and aim to improve it in an upcoming release.