答案 0 :(得分:0)
jVectorMap有一个remove
方法(参考:jVectorMap -> JavaScript API -> Map):
/**
* Gracefully remove the map and and all its accessories, unbind event handlers.
*/
remove: function(){
this.tip.remove();
this.container.remove();
jvm.$('body').unbind('mouseup', this.onContainerMouseUp);
}
您可以像这样使用它:
var mapObj = $("#worldMap").vectorMap('get','mapObject');
mapObj.remove();