Skip to content

Loading…

Destroy Map? #12

Closed
sonicparke opened this Issue · 3 comments

4 participants

@sonicparke

Is there a way to destroy a map using and event handler? I'd like to be able to dynamically load a map based on user click.

@ferengi

I need this too, i want to reload a new map with ajax.

is this possible ?

@ferengi

my first solution...

first reload wirh ajax
jQuery.ajax({
data: {'elid': el, 'typ':'getmap'},
success: function(data){
jQuery('#vmap').html(data);

}
})

after this you have a new map....but the lable text is the old. Too fix this i have change

var mapData = WorldMap.maps[params.map]; ---> mapData = WorldMap.maps[params.map];

....now i have the problem that after hover the color don't switch back.

@okendoken

Everytime you need to update you map you can replace your element hard way :)

$('#vector-map').replaceWith("<div id='vector-map'></div>");
        var $map = $('#vector-map');
        $map.width("100%").height("100%").vectorMap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.