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?