Select to view content in your preferred language

Selection displays Above GraphicsOverlay

134
2
2 weeks ago
Labels (1)
JustinTrody
Occasional Contributor

Hello,

I have an app built using ArcGIS Maps SDK for .NET Version 200.3

I am trying to create some graphics, which I would like to display above all layers, including layer selections as below. However, the selection is always drawing at the top. When there is no layer selection, graphics display above all objects.

Any suggestions how I can reorder this? See attachments

 

//Select polygon layer

dmafeatLayer.SelectFeature(dmafeatures[0]);

 

//Create point/text graphics and add to may

_dmPointSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle.Square, color, 18d);

Graphic dmGraphic = new Graphic(feature.Geometry as MapPoint, _dmPointSymbol);

// Create a graphics overlay for the points.
GraphicsOverlay dmGraphicsOverlay = new GraphicsOverlay();

//Add point graphic
dmGraphicsOverlay.Graphics.Add(dmGraphic);

//Add text graphic
Graphic textGraphic = new Graphic(feature.Geometry, _textSymbol);
dmGraphicsOverlay.Graphics.Add(textGraphic);

MyMapView.GraphicsOverlays.Add(dmGraphicsOverlay);

Tags (1)
0 Kudos
2 Replies
dotMorten_esri
Esri Notable Contributor

The behavior you see is by-design. While I agree in this specific scenario it's perhaps not ideal, there are many more cases where selection gets completely obscured by other layers above, making the selection invisible.

0 Kudos
JustinTrody
Occasional Contributor

Thanks for confirming @dotMorten_esri 

I guess a workarou d may be to add object selected also as graphic, instead of selection. I may be able to order with z index.

0 Kudos