Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 583 Bytes

File metadata and controls

27 lines (20 loc) · 583 Bytes

💚 This is the latest document.

map.setVisible()

If set false, the map is hidden.

<div class="map" id="map_canvas">
  <span class="smallPanel"><button>current: map.visible = true</button></span>
</div>
var div = document.getElementById("map_canvas");
var map = plugin.google.maps.Map.getMap(div);

var visible = true;
var button = div.getElementsByTagName('button')[0];
button.addEventListener('click', function() {
  visible = !visible;
  map.setVisible(visible);
  button.innerHTML = "current: map.visible = " + visible;
});