Topic: Google Maps Ctrl + Zoom not working
krakow47 free asked 4 years ago
When I use the basic example provided of the Google Maps component, the resulting component on the page does not have the "use ctrl + scroll to zoom the map" text. It starts zooming as I scroll over it.
HTML
<agm-map [latitude]="map.lat" [longitude]="map.lng" style="height: 300px">
<agm-marker [latitude]="map.lat" [longitude]="map.lng"></agm-marker>
</agm-map>
TS
import { Component } from '@angular/core';
@Component({
selector: 'map-example',
templateUrl: 'map.html',
})
export class MapComponent {
public map: any = { lat: 51.678418, lng: 7.809007 };
}
Arkadiusz Idzikowski staff answered 4 years ago
Please add a [scrollwheel]="null"
input to the agm-map
component, it should resolve the problem.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 8.8.2
- Device: Desktop
- Browser: Mozilla Firefox
- OS: Windows 10
- Provided sample code: No
- Provided link: No
krakow47 free commented 4 years ago
Some help would be appreciated :)