ArcGIS JS Legend order for FeatureLayers

275
3
Jump to solution
05-07-2020 11:36 AM
MichaelCrouch
New Contributor

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?

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Honored Contributor

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.

View solution in original post

3 Replies
KenBuja
MVP Honored Contributor

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.

View solution in original post

MichaelCrouch
New Contributor

Have you seen a way to over write this?

Same concept in JS 4.X?

0 Kudos
KenBuja
MVP Honored Contributor

It's not possible in 3.x. However, 4.x does not have this limitation.