我想知道我的 gmap 何时加载。我在文档和网络上没有看到任何回调方法。
我正在使用这个插件: http: //gmap3.net/en/catalog/
任何提示?谢谢
问候
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
});
它似乎没有记录,但地图对象上有一个回调属性
$('#map_canvas').gmap3(
{
map: {
options: {
zoom: 9,
center: [view.lat, view.lng]
},
callback: function (e) {
alert("loaded");
}
}
});