Select to view content in your preferred language

What logic is used for drawing order?

1071
1
05-22-2020 03:20 PM
MitchellOttesen1
Occasional Contributor

In 3.x API, whether a webmapid is used to create the map object or not, layers in the map seem to be ordered by what type of Map Service they are. No matter what order they're added to the map object.

This is the order, top to bottom, based on my observations:

  • Feature Layers (whether they are in the web map or not)
  • Dynamic Map Service
  • Tiled Map Services / Vector Tile Layers
  • WMS layers
  • Basemap in Web Map (if webmapid was used to create map object)

With 4.x API, I'm not seeing the same logic, it's like it creates a Web Map sandwich:

  • Feature Layers in Web Map
  • WMS Layer in Web Map
  • Dynamic Map layer (not in web map)
  • Feature Layers (not in web map)
  • Tiled Map Services / Vector Tile Layers  (not in web map)
  • Basemap in Web Map (if webmapid was used to create map)

What I'm hoping for is that dynamic map services and/or feature layers not in the web map would be able to draw on top, but they aren't. They're getting covered up by the WMS Web Map layer. Again, this regardless of what order they're added to the map.

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Mitchell,

  I am not sure on the order portion of the question but you can always reorder the way you want :

https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#reorder 

0 Kudos