sebholstein / angular-google-maps

Angular 2+ Google Maps Components
https://angular-maps.com/
MIT License
2.03k stars 817 forks source link

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

Closed sshyamprasath closed 5 years ago

sshyamprasath commented 6 years ago

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.

jimmykane commented 6 years ago

Same here. This broke after the https://github.com/SebastianM/angular-google-maps/releases/tag/1.0.0-beta.3

@SebastianM

jimmykane commented 6 years ago

Found the issue:

AgmCoreModule.forRoot({
      apiKey: '-bQ',
      apiVersion: '3.31'
    }),

the 3.32 has a different way of passing options

attilaferencz commented 6 years ago

When we can expect fixing this major issue? Version 3.31 has other major bugs, at least with agm. Also (not related to scroll) but to agm-snazzy-info-window, with v 3.32 and @agm/snazzy-info-window: "^1.0.0-beta.3" width of window can not be set like before:

<agm-snazzy-info-window maxWidth="1000" [maxHeight]="1000" [closeWhenOthersOpen]="true">

Any suggestions?

sebholstein commented 6 years ago

@sshyamprasath We need more specific information. I believe that it need to get fixed in the google maps api because there are no breaking changes.

attilaferencz commented 6 years ago

I sent you email on June 13 (to your email address according to https://github.com/SebastianM) with explanations. Sent you also link to download a simple demo project, which showcases the bug. Please check also in Spam and please confirm the receiving.

jkildedal commented 6 years ago

@SebastianM will this be fixed in the next release?

Thanks a lot!

PepeBel4 commented 6 years ago

@SebastianM We also experience the issue. Will there be any update soon? Thanks in advance. Regards.

aventic commented 6 years ago

The suggested comment above from @jimmykane, setting apiVersion to 3.31 worked for a while, but Google have retired that version (https://issuetracker.google.com/issues/112519576) and it's not working anymore.

jkildedal commented 6 years ago

Yes, I also noticed a few days ago that my maps started zooming again when people are trying to scroll past them.

@SebastianM: Are you planning to implement a fix for this in the near future?

Thanks.

PaulDLW commented 6 years ago

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

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

n0minal commented 6 years ago

I still have this issue, I tried to use " apiVersion: '3.31' " but I still can't get it to work unfortunately, anyone has a solution for it?

gestureHandling cooperative seems to not work

@SebastianM

n0minal commented 6 years ago

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>

PaulDLW commented 6 years ago

You should be able to remove the specific API version now also.

attilaferencz commented 6 years ago

Great! Thank you PaulDLW for finding the solution: [scrollwheel]=null

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.