I’m facing issue with info_click with cluster maps
My code:
let markerCluster: MarkerCluster = this.map.addMarkerClusterSync({
markers: data,
boundsDraw: false,
icons:
});
let marker: Marker;
markerCluster.on(GoogleMapsEvent.MARKER_CLICK).subscribe((params) => {
marker = params[1];
marker.setTitle(marker.get(“name”));
marker.setSnippet(marker.get(“address”));
marker.showInfoWindow();
marker.one(GoogleMapsEvent.INFO_CLICK).then(()=>{
console.log(‘info click’);
})
});
my package.json:
“dependencies”: {
“@angular/animations”: “5.2.11”,
“@angular/common”: “5.2.11”,
“@angular/compiler”: “5.2.11”,
“@angular/compiler-cli”: “5.2.11”,
“@angular/core”: “5.2.11”,
“@angular/forms”: “5.2.11”,
“@angular/http”: “5.2.11”,
“@angular/platform-browser”: “5.2.11”,
“@angular/platform-browser-dynamic”: “5.2.11”,
“@ionic-native/core”: “^4.18.0”,
“@ionic-native/date-picker”: “^4.18.0”,
“@ionic-native/google-maps”: “^4.15.1”,
“@ionic-native/splash-screen”: “~4.17.0”,
“@ionic-native/status-bar”: “~4.17.0”,
“@ionic/storage”: “2.2.0”,
“cordova-browser”: “5.0.4”,
“cordova-plugin-datepicker”: “0.9.3”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-googlemaps”: “2.4.6”,
“cordova-plugin-ionic-keyboard”: “^2.1.3”,
“cordova-plugin-ionic-webview”: “^2.3.1”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-statusbar”: “^2.4.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“ionic-angular”: “3.9.2”,
“ionic2-rating”: “^1.2.2”,
“ionicons”: “3.0.0”,
“rxjs”: “5.5.11”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.26”
},
“devDependencies”: {
“@ionic/app-scripts”: “3.2.1”,
“typescript”: “~2.6.2”
}
current Behaviour:
Gtting following error
polyfills.js:3 Uncaught Error: Listener for one()/addEventListenerOnce() method is not a function
at Marker.one (BaseClass.js:108)
at map-view.ts:339
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)
at e.invokeTask (polyfills.js:3)
at i.isUsingGlobalCallback.invoke (polyfills.js:3)
at n (polyfills.js:3)
OS: Browser