Hi im using Google Maps API https://angular-maps.com/, and i want to zoom only while pressing ctrl + scrolling with the scrollwheel. Reading the documentation I have found this:
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
so in my code i added :
<agm-map
[latitude]="lat"
[longitude]="lng"
[zoom]="zoom"
[gestureHandling]="cooperative"
[mapTypeControl]="true"
[mapTypeControlOptions]="mapType"
>
but is not working, it does not ask me to press ctrl to zoom.
You can change the zoom level of the map using simple steps. Step 1 Go to Add or Edit Map page . Step 2 Select 'Default zoom level' in the 'Map Information section'. Step 3 click save map and see the changes.
The shortcut is simple: just double-tap the maps interface, but instead of lifting your finger after the second tap (the shortcut for zooming in), you leave it touching the screen. Then a swipe up zooms out, and a swipe down zooms in.
Setting [scrollwheel]="null"
seems to work for now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With