Problem in Enable ctr + scrollwheel to zoom in Google Maps Api
See original GitHub issueGesture 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
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:15 (1 by maintainers)
Top Results From Across the Web
Enable the Ctrl + Scroll to Zoom google maps - Stack Overflow
How to enable message ctrl + Scroll zoom message in google map? Map option define below. var mapOptions = { mapTypeId: 'roadmap', center:...
Read more >Setting Map to Zoom With CTRL + Scroll - WP Go Maps
The issue there is that when Mouse Wheel Zoom is enabled you can zoom using only the mouse wheel and it does not...
Read more >Problem in Enable ctr + scrollwheel to zoom in Google Maps Api
Still it is zooming on scroll without press ctrl .
Read more >Controlling Zoom and Pan | Maps JavaScript API
When a user scrolls a page that contains a map, the scrolling action can unintentionally cause the map to zoom. This behavior can...
Read more >How To Control The Zoom Behavior For Your Google Maps ...
Google Maps plugin enables the map functionality on event detail/single page as well. The google map on the event detail page will display ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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>