Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 471 Bytes

File metadata and controls

24 lines (18 loc) · 471 Bytes

map.remove()

Destroy a map completely.

<div class="map" id="map_canvas">
    <span class="smallPanel"><button>Click here</button></span>
</div>
var div = document.getElementById("map_canvas");
var map = plugin.google.maps.Map.getMap(div);
map.one(plugin.google.maps.event.MAP_READY, function() {

  var button = div.getElementsByTagName('button')[0];
  button.addEventListener('click', function() {
    map.remove();
  });

});