我需要知道什么时候谷歌地图是完全加载,只有然后启用其他控件。 下一个代码不正确,因为每次移动地图时都会出现“空闲”。所以我需要知道地图只能使用一次。如何检查Google地图是否已完全加载?
google.maps.event.addListenerOnce(map, 'idle', function(){
// do something only the first time the map is loaded
});
这将是不错的下一个代码:
if map.isReady() then map.getBounds()