Hi,
I am trying to Save Map using GeoCanvas. But Aircraft image saving as below of the Route.
Please check snapshot.
Code:
private void ExportSatelliteImage()
{
try
{
GeoCanvas myCanvas = null;
Collection labelsInLayers = new Collection();
Bitmap myImage = new Bitmap((int)wfMap.Width, (int)wfMap.Height);
myCanvas = new GdiPlusGeoCanvas();
myCanvas.BeginDrawing(myImage, wfMap.CurrentExtent, wfMap.MapUnit);
int c = 0;
foreach (LayerOverlay layeroverlay in wfMap.Overlays)
{
if (wfMap.Overlays[c].IsVisible)
{
foreach (Layer layer in layeroverlay.Layers)
{
layer.Open();
layer.Draw(myCanvas, labelsInLayers);
layer.Close();
}
}
else
{
c = c + 1;
continue;
}
c = c + 1;
}
myCanvas.EndDrawing();
myImage.Save(@“F:\GlobalSatellite.png”, System.Drawing.Imaging.ImageFormat.Png);
}
catch (Exception ex)
{
}
finally
{
}
}
Aircraft Layer adding in the last, even though it’s not getting top of the image.
I tried with MoveToTop for aircraft overlay top. But not work out.
Please suggest me some logic for resolve this issue.
Thanks,
Riyaz