0

I would like to know when my gmap is loaded. I didn't see any callback method in the documentation and around the web.

I'm using this plugin: http://gmap3.net/en/catalog/

Any tip? Thx

Regards

Syl
  • 2,232
  • 8
  • 34
  • 45

2 Answers2

1

I think you will have to revert and use the google maps native function. The answer toyour question is outlined in this question: How can I check whether Google Maps is fully loaded?

and it looks like the best answer is given with this code snippet:

google.maps.event.addListenerOnce(map, 'idle', function(){
    // do something only the first time the map is loaded
});
Community
  • 1
  • 1
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
0

it doesn't seem to be documented but there is a callback property on the map object

  $('#map_canvas').gmap3(
  {
    map: {
      options: {
        zoom: 9,
        center: [view.lat, view.lng]
      },
      callback: function (e) {
         alert("loaded");
      }
    }
  });
BFK
  • 69
  • 2
  • 7