sylon104 commented on 49657fd
Hi, for the life of me i'm trying to clear markers of the oms object from an outside function. I declared the oms variable as a global one. and try to call oms.clearMarkers() within another function to clear those markers but it does not work. Please advise.
(I've added this as an issue, since the comment was unrelated to the commit).
I suspect your problem is that clearMarkers() doesn't do what you think it does. It only removes markers from being tracked and spiderfied. It does not remove them from the map. If you want to remove them from the map, IIRC, you call setMap(null) (provided by the GMaps API) on each marker.
Lots of people have made the same error, so I must add some BIG RED CAPITALS about this to the README somewhere.
Thanks for the reply. I figured that was the case. But hit my head on the desk for a couple of hours. Just put my markers in an array and setmap(null) and poof gone!
Thanks. Great library btw