question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem in Enable ctr + scrollwheel to zoom in Google Maps Api

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
PaulDLWcommented, Aug 22, 2018

Setting the ‘scrollwheel’ input to undefined/null seemed to work for me.

<agm-map [scrollwheel]=null></agm-map>

6reactions
n0minalcommented, Sep 26, 2018

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>

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found