Google maps native not draggable


#1

Hey !

I am using the cordova 2.0 implementation for GoogleMaps and I have one last problem. The map doesn’t drag or react to any click event.
This is how I initialize the map:

let mapEle = this.theMap.nativeElement;
    this.map = new plugin.google.maps.Map.getMap(mapEle,
       {
        'mapType': plugin.google.maps.MapTypeId.ROADMAP,
        'controls': {
          'compass': true,
          'myLocationButton': true,
          'indoorPicker': true,
          'zoom': true,
          'clickable': true,
          'draggable': true
        },
        'styles': [
          {
            featureType: "all"
          },{
            featureType: "road.arterial",
            elementType: "geometry"
        },{
          featureType: "poi.business",
          elementType: "labels",
          stylers: [
            { visibility: "off" }
          ]
        }
      ],
      'camera' : {
        target: {
          lat: latLng.latitude,
          lng: latLng.longitude
        },
        zoom: 14
      }
    });
    console.log('Map should be loaded.');

    this.map.one(plugin.google.maps.event.MAP_READY, () => {

      console.log("Map is ready.");
      this.map.setOptions({draggable: true});
      this.map.setClickable(true);


    });

And it works just fine except for the fact that it’s not reactive to any click.
Does anybody know why or how I could fix that ?

Thank you !


#2

I have the same issue!! Did you find the solution??

Cheers.

Manuel.


#3

Hey !

I had an html element going over the map. I just had to make sure there was no overlapping element to it ever (not even a loading screen or a navigator alert).

Good luck :slight_smile: