Problem with L.esri.FeatureLayer and map panes

970
1
Jump to solution
03-04-2020 03:32 PM
Labels (1)
JosephElfelt1
Occasional Contributor

Each Layer I add to my map goes into its own custom pane.  Each custom pane is assigned a zindex starting with 401 so I can control the stacking order.  I  do the following.

1. Add FeatureLayer, pane = "pane_401", zindex = 401

2. Add DynamicMapLayer, pane = "pane_402", zindex = 402

3. Remove the FeatureLayer from the map

4. Add the FeatureLayer, pane = "pane_403", zindex = 403

 

The FeatureLayer should be on top of the DynamicMapLayer but it is not, it is underneath.

If I am only adding/deleting DynamicMapLayers then the stacking order on the map is fine.

Obviously there is something about FeatureLayer that I am not understanding.

Can anyone point me in the right direction?

 

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
JosephElfelt1
Occasional Contributor

Apparently if you have a FeatureServer layer that you:

add to the map

remove from the map

add to the map again

then when you re-add it to the map you *must* use the original pane where you placed the FeatureServer layer.  It is OK to change the zindex to control the stacking order.  But you should not make  a new pane when you add FeatureServer data that you previously added to your map and then deleted.

My map works fine now.

View solution in original post

0 Kudos
1 Reply
JosephElfelt1
Occasional Contributor

Apparently if you have a FeatureServer layer that you:

add to the map

remove from the map

add to the map again

then when you re-add it to the map you *must* use the original pane where you placed the FeatureServer layer.  It is OK to change the zindex to control the stacking order.  But you should not make  a new pane when you add FeatureServer data that you previously added to your map and then deleted.

My map works fine now.

0 Kudos