Our implementation allows the user to configure their basemaps, and the default is "gray". We also render graphic layers with a collection of graphics and graphic layers with a collection of text symbols on top of these basemaps.
On esri 3.x, our graphics and text symbols would always render on top of all basemaps, including type "gray" but also other combinations of tileLayers and vectorTileLayers we might have chosen.
On esri 4.x, it seems like the gray basemap's reference layer is always last in map.allLayers. I am unable to change this with map.reorder, as that is only able to change the map.layers collection. Is there any way to achieve what we had in 3.x, where the graphics and textSymbols would show up on top of the reference layer?
Solved! Go to Solution.
In 4.x you could do this by removing the Basemap's referenceLayers and adding them to the collection of baseLayers instead. Here's an example: https://codepen.io/annefitz/pen/JjxYLvO?editors=1000
In 4.x you could do this by removing the Basemap's referenceLayers and adding them to the collection of baseLayers instead. Here's an example: https://codepen.io/annefitz/pen/JjxYLvO?editors=1000
That worked like a charm, thank you!