Is there any listener to handle map completely loaded?
In my case, I need to get bounds from map, so I've done it this way:
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();
},
Is there any not-hacking way?
Try something like:
google.maps.event.addListenerOnce(map, 'idle', function(){
//loaded fully
});
How about the tilesloaded
event?
google.maps.event.addListener(map, 'tilesloaded', function() {
// Visible tiles loaded!
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With