我使用的是GeoComplete jQuery插件:https://github.com/ubilabs/geocomplete/blob/master/jquery.geocomplete.js
我按照本例中的方式对它进行了初始化,它工作得很好:http://ubilabs.github.com/geocomplete/examples/draggable.html
我希望能够访问创建的谷歌地图实例,以便有更多的控制,例如,在拖动标记后显示InfoWindow,等等。
在geocomplete脚本中,地图的初始化方式如下:
...
this.map = new google.maps.Map(
$(this.options.map)[0],
this.options.mapOptions
);
...我可以从我的脚本中访问this.map对象吗?
谢谢。
发布于 2013-03-05 07:24:22
$("#selector").geocomplete('map')....returns the google.maps.Map-instance
https://stackoverflow.com/questions/15212970
复制相似问题