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);
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.
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.