Hi,
we want to draw our map onto a bitmap.
In the past we’ve used this method:
private static void DrawLayer(Layer layer, GeoCanvas myCanvas, Collection<SimpleCandidate> labelsInAllLayers)
{
layer. Open();
layer. Draw(myCanvas, labelsInAllLayers);
layer. Close();
}
Then we got the message
Please call DrawAsync() instead of Draw().
So we’ve changed out method to this:
private static async Task DrawLayerAsync(Layer layer, GeoCanvas myCanvas, Collection<SimpleCandidate> labelsInAllLayers)
{
LayerAsync layerAsync = (LayerAsync)layer;
await layerAsync.OpenAsync();
await layerAsync.DrawAsync(myCanvas, labelsInAllLayers);
await layerAsync.CloseAsync();
}
But now you’ve deprecated LayerAsync and say
Please use ThinkGeo.Core.AsyncLayer instead.
But how can we convert a Layer
from a map to an AsyncLayer
?
The old cast does not work anymore.
Thank you.
Regards,
Peter