Is there anyway to set layers or graphics priorities? With priorities I mean that in case of overlapping, set a priority of being on top to some certain type of graphics / layers?
Solved! Go to Solution.
Hi Gonzalo,
The `GraphicsOverlays` collection also has methods to manage the order of the `GraphicsOverlays` it contains (Add, Insert, Move, Remove, etc.).
Within a `GraphicsOverlay`, you can also set a z-index property on individual graphics. A larger z-index means the graphic is higher in the draw order (for graphics in the same overlay).
bottomGraphic.ZIndex = 0;
topGraphic.ZIndex = 1;
Note: Graphics overlays *always* draw on top of layers in the map.
Thad
With Layers it is based on order added to the Layers collection, last in is on top. So index zero is on top, I would assume GraphcsOverlay is the same but I have never had a case of overlap with graphics to confirm that. OperationalLayers has an Insert method, so you put layers in a specific order instead of just using Add
Hi Gonzalo,
The `GraphicsOverlays` collection also has methods to manage the order of the `GraphicsOverlays` it contains (Add, Insert, Move, Remove, etc.).
Within a `GraphicsOverlay`, you can also set a z-index property on individual graphics. A larger z-index means the graphic is higher in the draw order (for graphics in the same overlay).
bottomGraphic.ZIndex = 0;
topGraphic.ZIndex = 1;
Note: Graphics overlays *always* draw on top of layers in the map.
Thad