remove a marker from a map #97

Open
daithiw44 opened this Issue Aug 29, 2011 · 1 comment

Projects

None yet

2 participants

@daithiw44

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment