simplegeo / polymaps

Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.
http://polymaps.org/
Other
1.6k stars 213 forks source link

remove a marker from a map #97

Open daithiw44 opened 13 years ago

daithiw44 commented 13 years ago

If I add a marker(s) via the .url so for example..

map.add(po.geoJson() .url("...") .on(.....)

and each feature has an id... so that gets assigned to the marker inside active scale element.

However how do I use map.remove, not having any joy with markers..

From testing about I can remove the necessary element with something as follows element.parentNode.parentNode.parentNode.parentNode.removeChild(element.parentNode.parentNode.parentNode)

but despite the few+ attempts at map.remove.. I've had no success.

Thanks

Dave

jdhollis commented 12 years ago

I've been saving the result of po.geoJson()… in a variable and then passing that variable to map.remove().