Hi
I want to refresh/redraw a single/specific overlay. I have made a method to do so:
private void RefreshFieldPolygonOverlay()
{
Overlay fieldPolygonOverLay = m_Map.Overlays.SingleOrDefault(ol => ol.Name == OverLays.FieldPolygonOverlay);
if (fieldPolygonOverLay != null)
{
m_Map.GeoCanvas.BeginDrawing(m_Map.GetBitmap(m_Map.Width, m_Map.Height), m_Map.CurrentExtent, m_Map.MapUnit);
fieldPolygonOverLay.Refresh(m_Map.GeoCanvas, m_Map.CurrentExtent);
m_Map.GeoCanvas.EndDrawing();
}
}
The method doesn’t complain, but the map doesn’t show the redrawed image. - How to do that?
The reason why I want to refresh that specific layer is that I don’t want my worldlayer (Google or wms) to make a new web-request just to get the exact same image as is all ready retrieved earlier. This happens if I just call m_Map.Refresh().
Best regards
Lars