gpt4 book ai didi

google-maps - 启用 Ctrl + 滚动以缩放谷歌地图

转载 作者:行者123 更新时间:2023-12-02 17:14:38 24 4
gpt4 key购买 nike

Enable Ctrl+Scroll option

如何在谷歌地图中启用消息 ctrl + 滚动缩放消息? map 选项定义如下。

 var mapOptions = {
mapTypeId: 'roadmap', center: new google.maps.LatLng(countryLat, countryLon), zoom: countryZoom, gestureHandling: 'cooperative'
};

鼠标滚动时我需要这样的输出: Need map output

最佳答案

使用以下选项来控制此行为:

gestureHandling: 'cooperative'

按照此处提到的说明: Controlling Zoom and Pan (developers.google.com)

关于google-maps - 启用 Ctrl + 滚动以缩放谷歌地图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47131481/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com