在Google地图上停用双击左键 [英] Disable double left click on google map
本文介绍了在Google地图上停用双击左键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以知道如何禁用Google地图上的双击,以便双击Google地图时信息窗口不会关闭?可以通过谷歌地图API来完成吗?
可以通过设置以下的来禁用Google地图上的双击缩放功能。 href =https://developers.google.com/maps/documentation/javascript/reference#MapOptions> google.maps.MapOptions对象属性:disableDoubleClickZoom:true
示例代码:
var mapOptions = {
scrollwheel:false,
disableDoubleClickZoom:true,//< ---
panControl:false,
streetViewControl:false,
center:defaultMapCenter
};
May I know how can I disable double click on google map so that the info window will not close when I double click on google map? Can it be done through google map api?
解决方案
You can disable double-click zoom on Google Maps by setting the following google.maps.MapOptions object property:
disableDoubleClickZoom: true
Sample code:
var mapOptions = {
scrollwheel: false,
disableDoubleClickZoom: true, // <---
panControl: false,
streetViewControl: false,
center: defaultMapCenter
};
这篇关于在Google地图上停用双击左键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文