有没有监听器可以处理地图完全加载?
在我的情况下,我需要从地图中获取范围,所以我是这样做的:
google.maps.event.addListener(this.map, "bounds_changed", this.mapLoaded);
mapLoaded: function() {
google.maps.event.clearListeners(this.map, "bounds_changed");
var bounds = this.map.getBounds();
this.collection.setBounds(bounds.getNorthEast(), bounds.getSouthWest());
this.collection.fetch();
},
有没有非黑客方式?