Hello.
I’m having problems with the SimpleMarkerOverlay. After deleting markers (can be one or all of them) and refreshing the map, the markers are still there. I even tried it with ThinkGEO’s samples, the one called AddSimpleMarker. I added a button to delete all the markers, but they just won’t dissappear from the map until you move the map or interact with it.
I’ve tried many things, like creating the SimpleMarkerOverlay from scratch, setting it to null, removing it from the map control… nothing works.
Can you please help?
private
void
btnDeleteMarkers_Click(
object
sender, EventArgs e)
{
SimpleMarkerOverlay markerOverlay = (SimpleMarkerOverlay)winformsMap1.Overlays[
“MarkerOverlay”
];
markerOverlay.Markers.Clear();
winformsMap1.Refresh();
}
Thanks in advance,
Juan.