according to https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#id, the layer.id can be set so that it remains unique and, presumably static. This is not the numeric layerID value, but layer.id of the form 18d65c0f0b2-layer-29. Where is this changed?
You would include the id in the parameters passed to the layer's constructor, for example:
var layer = new FeatureLayer({ id: "myLayerID", url: "https://myServer/arcgis/rest/services/MyService/MapServer/0" });
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.