<分区>
是否有任何监听器来处理 map 完全加载?
在我的例子中,我需要从 map 中获取边界,所以我这样做了:
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();
},
有什么不黑的方法吗?