Hey All,
I have a map that I am adding a number of layers to dynamically.
These layers are MapImageLayers, GraphicsLayers and FeatureLayers - from either MapServers or FeatureServer.
On the GraphicsLayer, I am displaying things such as the current user location with a simple graphic, as well as other graphics that facilitate user interactions. I want these graphics to be above all other map layers.
I have tried the reorder method as documented here Map | ArcGIS API for JavaScript 4.14
And I can see that when console logging the map object, the layer order is changing, but it is not actually reflected on the map. What am I doing wrong?
Any help would be greatly appreciated.
Which version of the API are you using? Have you tested in 4.14?
Hi Ben,
Yes. I should also add that I am using esri-loader with angular, in case that is relevant.
Try adding the graphics layer to the map last (after you add all the other layers). If that doesn't fix the issue, you could try creating a client side feature layer instead of a graphics layer. Here is a sample for creating a client side feature layer: https://codepen.io/benesri/pen/gOpJxpL
I'm having a similar issue: I'm adding a graphic to my map, but it is not being placed above the labels.
If you go to this pen: https://codepen.io/ghoti143/pen/XWRBmOL?editors=1010 you can see that when clicking on the map, the black star shows up on top of everything except the numeric labels.
The labels are defined in a AGOL portal map. I even tried using a client side feature layer as suggested, but to no avail.
Thanks!
Mike
We're running 4.16 and we have the same issue. We are also not able to reorder local FeatureLayer above GraphicsLayer. Does anyone know if this has been fixed?