google map loading according to location code example
Example: google maps js on map load
google.maps.event.addListenerOnce(map, 'idle', function(){
// do something only the first time the map is loaded
});
google.maps.event.addListenerOnce(map, 'idle', function(){
// do something only the first time the map is loaded
});