GoogleMaps.getPlugin(…).HtmlInfoWindow is not a constructor


#1

Hi there!

I use cordova-plugin-googlemaps in my app. https://ionicframework.com/docs/native/google-maps/

When I try to use

this.map.one(GoogleMapsEvent.MAP_READY).then(() => {
    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 ?


#2

In the source, HTMLInfoWindow is marked as @hidden, which I would take to mean that app code should not be interacting with it at all.


#3

So how I am supposed to create custom InfoWindows without it?
Also, there is docs showing how to use it.


#4

You say you “use the latest plugin”. Are you sure it’s a version after this change?


#5

Yes it is.
New project initiated this week.

My package.json dependencies:

"dependencies": {
        "@angular/common": "4.1.3",
        "@angular/compiler": "4.1.3",
        "@angular/compiler-cli": "4.1.3",
        "@angular/core": "4.1.3",
        "@angular/forms": "4.1.3",
        "@angular/http": "4.1.3",
        "@angular/platform-browser": "4.1.3",
        "@angular/platform-browser-dynamic": "4.1.3",
        "@ionic-native/core": "3.12.1",
        "@ionic-native/google-maps": "^4.1.0",
        "@ionic-native/launch-navigator": "^4.1.0",
        "@ionic-native/network": "^4.1.0",
        "@ionic-native/splash-screen": "3.12.1",
        "@ionic-native/status-bar": "3.12.1",
        "@ionic/storage": "2.0.1",
        "angular2-signaturepad": "^2.6.0",
        "cordova-android": "^6.2.3",
        "cordova-plugin-actionsheet": "^2.3.3",
        "cordova-plugin-camera": "^2.4.1",
        "cordova-plugin-compat": "^1.1.0",
        "cordova-plugin-console": "^1.0.5",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-dialogs": "^1.3.3",
        "cordova-plugin-geolocation": "^2.4.3",
        "cordova-plugin-network-information": "^1.3.3",
        "cordova-plugin-screen-orientation": "^2.0.1",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.2",
        "cordova-plugin-whitelist": "^1.3.1",
        "cordova-sqlite-storage": "^2.0.4",
        "cordova.plugins.diagnostic": "^3.6.5",
        "es6-promise-plugin": "git+https://github.com/vstirbu/PromisesPlugin.git",
        "ionic-angular": "3.5.3",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionic2-input-mask": "^0.18.6",
        "ionicons": "3.0.0",
        "rxjs": "5.4.0",
        "sw-toolbox": "3.6.0",
        "uk.co.workingedge.phonegap.plugin.launchnavigator": "4",
        "zone.js": "0.8.12",
        "com.googlemaps.ios": "https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk",
        "cordova-plugin-googlemaps": "https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps"
    },
    "devDependencies": {
        "@ionic-native/camera": "^4.1.0",
        "@ionic-native/diagnostic": "^4.1.0",
        "@ionic-native/geolocation": "^4.1.0",
        "@ionic-native/screen-orientation": "^4.1.0",
        "@ionic/app-scripts": "2.0.2",
        "@ionic/cli-plugin-cordova": "1.6.2",
        "@ionic/cli-plugin-ionic-angular": "1.4.1",
        "ionic": "3.7.0",
        "typescript": "2.3.4"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {},
            "cordova-plugin-network-information": {},
            "cordova-sqlite-storage": {},
            "cordova-plugin-screen-orientation": {},
            "cordova-plugin-camera": {},
            "cordova-plugin-geolocation": {},
            "uk.co.workingedge.phonegap.plugin.launchnavigator": {},
            "cordova.plugins.diagnostic": {},
            "com.googlemaps.ios": {},
            "cordova-plugin-googlemaps": {
                "API_KEY_FOR_ANDROID": "KEY"
            }
        }
    }

#6

Hi,
Is there any news about the availability of HtmlInfoWindow? or does anyone know any alternative to customize the info window?

Thanks


#7

Hi,
Not a single alternative was given to me.


#8

any news on htmlInfowindow?


#9

npm install @ionic-native/core @ionic-native/google-maps

ionic cordova plugin add c

rdova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="…" --variable API_KEY_FOR_IOS="…"