angular-google-maps: Problem in Enable ctr + scrollwheel to zoom in Google Maps Api
Gesture handling settings to enable ctr + scrollwheel
to zoom is not working. App using angular version 4.4.4 and agm version is 1.0.0-beta.1. I set the parameters as follows
<agm-map
[latitude]="mapCenter.lat"
[longitude]="mapCenter.lng"
[fitBounds]="latlngBounds"
[styles]="styles"
[zoom]="11"
[gestureHandling]="'cooperative'">
</agm-map>
Still it is zooming on scroll without press ctrl
.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 15 (1 by maintainers)
Commits related to this issue
- chore: lower maps api due to issue with panning see https://github.com/SebastianM/angular-google-maps/issues/1411 — committed to jimmykane/quantified-self by jimmykane 6 years ago
Setting the ‘scrollwheel’ input to undefined/null seemed to work for me.
<agm-map [scrollwheel]=null></agm-map>
Nevermind, just realized I had to use scrollwheel null to get gestureHandling cooperative to work:
<div class="col-12"> <agm-map [latitude]="51.678418" [longitude]="7.809007" [scrollwheel]="null" [gestureHandling]="'cooperative'"> <agm-marker [latitude]="51.678418" [longitude]="7.809007"></agm-marker> </agm-map> </div>
Found the issue:
the 3.32 has a different way of passing options