Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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 };
}

krakow47 free commented 4 years ago

Some help would be appreciated :)


Arkadiusz Idzikowski staff answered 4 years ago


Please add a [scrollwheel]="null" input to the agm-map component, it should resolve the problem.


krakow47 free commented 4 years ago

Fantastic, that fixed it! :)



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • 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