Is there a way to show/hide all the UI controls from google map after initialised?
问题 There is an option on Google Maps disableDefaultUI set to false before loading google Maps. function initMap(){ var mapVar = new google.maps.Map(document.getElementById('map'), { zoom: 4, center: {lat: -33, lng: 151}, disableDefaultUI: true }); } Is there any way to hide all the controls using my mapVar variable once the map is rendered? Removing all controls from a google map - This question is about hiding the map on load. 回答1: There is a method to hide controls dynamically. mapVar