Relationship between ZIndex in difference graphicoverlays

926
3
05-17-2017 09:49 AM
DavidHope
New Contributor III

Lets take this example. I have 3 GraphicOverlays

- Overlay 1 contains a filled polygon

- Overlay 2 contains a polyline

- Overlay 3 contains a number of points

The polygon has a ZIndex of 10

the polyline and the points have ZIndexs of 20

Should it always draw the polyline and the points on top of the filled polygon?

0 Kudos
3 Replies
dotMorten_esri
Esri Notable Contributor

Zindex only applies within an overlay. You'd need to order your overlays so the polygon overlay is at the  bottom. 

0 Kudos
DavidHope
New Contributor III

So, it appears that the "bottom" of the list is the last item added to the overlay list, is that correct?

0 Kudos
dotMorten_esri
Esri Notable Contributor

"Bottom" is the first item added, ie index 0, similar to how XAML in general composes visual elements as well.

0 Kudos