单击标记时防止地图重新定位(Google Map v3) [英] Prevent map from repositioning when clicking a marker (Google Map v3)
本文介绍了单击标记时防止地图重新定位(Google Map v3)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
标记会打开一个包含几个文本段落的窗口.当用户单击标记时,地图会重新定位自身(通常将地图向北移动)以显示弹出窗口.
Markers open a window containing a couple paragraphs of text. When users click a marker, the map repositions itself (typically shifting the map north) to display the pop-up.
是否有防止这种重新定位动作的方法?
Is there a method for preventing this repositioning action?
推荐答案
设置disableAutoPan选项:
Set the disableAutoPan option:
infowindow.setOptions({disableAutoPan: true});
这篇关于单击标记时防止地图重新定位(Google Map v3)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文