Ionic: use HtmlInfoWindow in native cordova-plugin-googlemaps

I use cordova-plugin-googlemaps in my app.

My code:

 loadMap() {

    var element: HTMLElement = document.getElementById('map');
    var map: GoogleMap = this.googleMaps.create(element); => {

      var ionic: LatLng = new LatLng(50.5279314,30.2317489);

      var position: CameraPosition = {
        target: ionic,
        zoom: 10,

      var htmlInfoWindow = new HtmlInfoWindow();

        position: new LatLng(50.5279314,30.2317489),
      }).then((marker: Marker) => {
        marker.on(GoogleMapsEvent.MARKER_CLICK).subscribe(() => {



When I try to open HtmlInfoWindow, i get errors. Help, please:

console.error: Unhandled Promise rejection: marker.bindTo is not a function. (In ‘marker.bindTo(“infoWindowAnchor”, self)’, ‘marker.bindTo’ is undefined) ; Zone: ; Task: null ; Value: [object Object] fromLatLngToPoint@ open@ t@ tryNativePromise@ __tryOrUnsub@ next@ _next@ next@ listener@ dispatchEvent@[native code] trigger@ _onMarkerEvent@ nativeCallback@ nativeCallback@[native code] dispatchEvent@[native code] fireDocumentEvent@ global code@

This pull request should fix this issue.

The pull request has been accepted. Please reinstall the plugin.

When I try to use => {
    var htmlInfoWindow = new HtmlInfoWindow();

I got this error message: GoogleMaps.getPlugin(…).HtmlInfoWindow is not a constructor

I use the lastest plugin and every package is up to date

An idea of ​​why ?

1 Like

I am getting the same error.

Go to this URL

There is a new version of Google-Maps-Sdk without the ionic wrapper. I didn’t test it but try your luck


Here is current (@ionic-native/google-maps@4.4.2) way.