You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adam,
I think at you already pointed this out, but AGOL operates in a similar fashion, Featurelayers can not be moved below other layer types. I think this has to do with the fact that in the JS API FeatureLayers are grouped together with GraphicLayers in the map. Quote from API doc "layerIds = Array of IDs corresponding to layers in the map, except for GraphicsLayers and FeatureLayers, which are maintained in map.graphicsLayerIds."
Good find on the API doc, Robert. I mostly put this issue up as a note-to-self so that I investigate the issue in detail later, but if it's not something we can do without severely hacking around the API, I agree that it's probably best left by the wayside for now.
It may be possible to override the default layer ordering using map.reorderlayer
You could iterate through the JSON list and ensure that the map's layers matched this order.
Edit: after some testing it appears that even when manually reordering the layers, the Layer List widget isn't updating to show the actual position of the layers in the map.
Layer order should follow the order specified in the widget, instead of Feature Layers automatically floating to the top of the layer draw order
The text was updated successfully, but these errors were encountered: