jvectormap leaks labels #16

taybin opened this Issue Mar 21, 2012 · 3 comments


None yet

2 participants

taybin commented Mar 21, 2012

If I add a jvectormap to the DOM, mouseover it, and then remove it, it leaves behind the label it used for the hover text.

It creates a new label for each jvectormap created and doesn't remove any of them.

bjornd commented Mar 22, 2012

How do you remove jvectormap map? Probably there should be a specific method for removing map which would care about labels too.

taybin commented Mar 22, 2012

Say I have:

<div id="map_wrapper">

and called:

$("#map_wrapper div").vectorMap();

and then:


This is a simplified example, of course.

I think the proper fix is to parent the label to the element that has the map. Not the body. Then when the map element, whatever that is, is removed, the label will be removed too.

bjornd commented Mar 22, 2012

@taybin Ok, I got it. I think this could be possible to move label inside of the map container. Thank you for proper description.

@bjornd bjornd closed this in 2175602 Sep 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment