Hello,
Doing a map refresh after removing and re-adding a ServerLayerOverlay is not working for us. We are using Map.EditTools functionality for drawing features on the map, and at the same time are saving them in the database using a WCF service call.
Now the problem arises when we try to redraw the corresponding ServerLayerOverlay in the callback function of the service call. The ServerLayerOverlay and Map do get updated, but it does not show the change on the map until we pan the map or do some manual interaction.
void client_RefreshServerLayerCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
UnloadServerOverlay(MapOverlayType.RedLine); // Removes the ServerLayerOverlay from Map.Overlays collection
ShowOrHideOverlay(MapOverlayType.RedLine, true); // fetches the updated ServerLayerOverlay from MapConnector
Map1.Refresh();
}
It sounds funny, but this is what we are dealing with. Any help would be greatly appreciated.
Thanks and Regards,
ankit