Hi Dustin,
You can override the SimpleMarkerOverlay to acheive this, here the code,
public partial class DisplayASimpleMap : UserControl
{
public DisplayASimpleMap()
{
InitializeComponent();
}
void DisplayASimpleMap_Loaded(object sender, RoutedEventArgs e)
{
Map1.MapUnit = GeographyUnit.DecimalDegree;
MyMarkerOverlay overlay = new MyMarkerOverlay();
overlay.Markers.Add(new Marker(0, 0) { ImageRotationAngle = 30 });
MyMarkerOverlay overlay1 = new MyMarkerOverlay();
overlay1.Markers.Add(new Marker(0, 0));
Map1.Overlays.Add(overlay);
Map1.Overlays.Add(overlay1);
overlay1.ZIndex = 101;
overlay.ZIndex = 100;
Map1.CurrentExtent = new RectangleShape(-135.7, 83.6, 113.5, -53);
}
}
class MyMarkerOverlay : SimpleMarkerOverlay
{
private int zIndex;
public new int ZIndex
{
get { return zIndex; }
set { zIndex = value; }
}
protected override void DrawCore(RectangleShape worldExtent)
{
base.DrawCore(worldExtent);
Canvas canvas = ((Canvas)OverlayElement);
canvas.SetValue(Canvas.ZIndexProperty, zIndex);
}
}
The ZIndex will work properly in this way.
Regards,
Edgar