Google maps cordova add event listener - params do not match signature of target


#1

I have a map

    this.map = new GoogleMap(this.mapElement, mapOptions);

And I am trying to attach an event to it

    this.map.on(GoogleMapsEvent.CAMERA_MOVE_END, this.doSomething())

I am referencing this documentation

The error I am receiving is as follows

Supplied parameters do not match any signature of call target.

I understand that I am passing parameters that do not match what the function is looking for, but from the documentation I think I am doing it correctly. What am I doing wrong? Thanks


#2

I also tried this

    this.map = new GoogleMap(this.mapElement, mapOptions);

    this.map.one(GoogleMapsEvent.MAP_READY).then(() => {
      this.map.on(GoogleMapsEvent.MAP_CLICK, function(latLng) {
        console.log("HELLO");
      });
    });
  }

WIth the same error.

I am copying from these docs