angular – 如何启用ctr scrollwheel以放大Google Maps Api

嗨即时通讯使用谷歌地图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”似乎现在有效.

相关文章

ANGULAR.JS:NG-SELECTANDNG-OPTIONSPS:其实看英文文档比看中...
AngularJS中使用Chart.js制折线图与饼图实例  Chart.js 是...
IE浏览器兼容性后续前言 继续尝试解决IE浏览器兼容性问题,...
Angular实现下拉菜单多选写这篇文章时,引用文章地址如下:h...
在AngularJS应用中集成科大讯飞语音输入功能前言 根据项目...
Angular数据更新不及时问题探讨前言 在修复控制角标正确变...