0

我想知道我的 gmap 何时加载。我在文档和网络上没有看到任何回调方法。

我正在使用这个插件: http: //gmap3.net/en/catalog/

任何提示?谢谢

问候

4

2 回答 2

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
});
于 2013-02-06T15:42:47.267 回答
0

它似乎没有记录,但地图对象上有一个回调属性

  $('#map_canvas').gmap3(
  {
    map: {
      options: {
        zoom: 9,
        center: [view.lat, view.lng]
      },
      callback: function (e) {
         alert("loaded");
      }
    }
  });
于 2015-03-19T17:12:05.963 回答