2017/8/16
google 地图api版本升级到了3.30
引用官方消息
16 August 2017
Version 3.30 of the Google Maps JavaScript API is now available as the experimental version. See the guide to API versioning.
Changes:
This version introduces the gestureHandling property for desktop applications that enable user interaction using a mouse scroll wheel or touchpad. To control how users interact with a map, it is recommended that you use the gestureHandling property instead of the scrollwheel, disableDoubleClickZoom, and draggable properties.
地图升级之后,地图的缩放操作需要鼠标滚轮配合ctrl键才可以使用。
对于一部分用户来说是合理了。但是对于一部分用户来说操作变得复杂了。
想要取消组合操作,只需要修改gestureHandling属性即可。
这个属性默认是auto,改为gestureHandling:"greedy",
这样,地图的缩放就回到了3.30版本以前的样式。鼠标滚轮直接操作地图的缩放。
google地图升级3.30 地图缩放
最新推荐文章于 2022-08-24 10:44:27 发布