Is there an issue with the Legend order for FeatureLayers vs MapService layers?
esri/dijit/Legend
It seems that FeatureLayers are always brought to the top of the legend regardless of the z-Index of the layer.
Maybe AGOL feature layers are treated differently than AGS Feature layers?
Solved! Go to Solution.
FeatureLayers are inherited from GraphicsLayers which (in JS 3.x) are always on top of Map Service layers
Graphics layers can be reordered within the group of graphics layers. However, the graphics layer in Map.graphics is always on top. Also, all graphics layers are always on top of TiledMapServiceLayers and DynamicMapServiceLayers.
FeatureLayers are inherited from GraphicsLayers which (in JS 3.x) are always on top of Map Service layers
Graphics layers can be reordered within the group of graphics layers. However, the graphics layer in Map.graphics is always on top. Also, all graphics layers are always on top of TiledMapServiceLayers and DynamicMapServiceLayers.
Have you seen a way to over write this?
Same concept in JS 4.X?
It's not possible in 3.x. However, 4.x does not have this limitation.