嗨即时通讯使用谷歌地图API
https://angular-maps.com/,我想只在按住Ctrl滚动滚轮时进行缩放.阅读文档我发现了这个:
gestureHandling This setting controls how gestures on the map are
handled. Allowed values:‘cooperative’ (Two-finger touch gestures pan and zoom the map.
One-finger touch gestures are not handled by the map.) ‘greedy’ (All
touch gestures pan or zoom the map.) ‘none’ (The map cannot be panned
or zoomed by user gestures.) ‘auto’ [default] (Gesture handling is
either cooperative or greedy,depending on whether the page is
scrollable or not. Type: |||Default value: auto
所以在我的代码中我补充说:
<agm-map [latitude]="lat" [longitude]="lng" [zoom]="zoom" [gestureHandling]="cooperative" [mapTypeControl]="true" [mapTypeControlOptions]="mapType" >
但是没有用,它没有要求我按ctrl来缩放.
解决方法
设置[scrollwheel] =“null”似乎现在有效.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。