Updating the map to show an added overlay

Topics: Windows Forms
Mar 15, 2013 at 3:59 PM
Hi,

I am having trouble getting my map to update instantly when an overlay is added.

I am adding the overlay when the user selects an item in a CheckboxList
map.Overlays.Add(overlays[checkedListBox1.SelectedIndex]);
When the item is selected the overlay is not visible, I have to click on the map and drag it slightly in order to get it to update.

Any suggestions in getting the map to update immediately ?

I have tried map.update(), map.Refresh() ...

Thanks!
Dan.
Coordinator
Mar 15, 2013 at 5:52 PM
well usually overlays are added on the start, current code doesn't update the objects on that event, i guess i need to add that, until that you can add all overlays and just change IsVisible property
Mar 15, 2013 at 7:39 PM
Thanks very much for the swift response. I have achieved the desired result with the IsVisible property.

Thanks again!
Dan.