Markers Collection

Jan 22, 2009 at 4:45 PM
Can i access the MARKERS collection from the MapControl  ?

Coordinator
Jan 22, 2009 at 7:39 PM
  • AddMarker
  • RemoveMarker
  • ClearAllMarkers
if you need list, you can manage it by yourself, just store what you add or remove ;}
Jan 23, 2009 at 7:39 AM
Well i could do that, but if i have lots of markers im using double the resources, and then whenever i use your AddMarker/RemoveMarker i need to manage my collection too, it just seems duplication.
I am just looking to implement ShowAllToolTips and  HideAllToolTips  from within my form, if it is easy enough, making the collection public i can then do other operations on the markers too.

Thanks,
Coordinator
Jan 23, 2009 at 8:03 AM
not a double, just two lists with the same data, one list for you, one list for control to render markers. Anyway in real application saving data in controls internal list is not the best idea. Internal list is used only for currently used markers, also each marker has property Visible and MarkerTooltipMode. So you set them temporaly hide or visible. But it's best to awoid performance drop, by add/remove marker if you want/don't show it. I don't want to make internal list public because of thread safety, so control can add/remove markers from diff threads. 

added SetCurrentMarkersVisibility: manages currently markers on map visibility
added SetCurrentMarkersTooltipMode: manages currently markers on map tooltip mode
Jan 23, 2009 at 8:05 AM
Agreed, thanks