ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native
Other
221 stars 125 forks source link

GoogleMapsEvent.INFO_CLICK not fired #149

Closed eugenioNovas closed 5 years ago

eugenioNovas commented 5 years ago

I'm submitting a ... (check one with "x")

If you choose 'problem or bug report', please select OS: (check one with "x")

cordova information: (run $> cordova plugin list)

cordova-plugin-advanced-http 2.0.2 "Advanced HTTP plugin"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-googlemaps 2.4.6 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.3 "SocialSharing"
cordova-sqlite-storage 2.5.2 "Cordova sqlite storage plugin"
cordova-support-google-services 1.1.0 "cordova-support-google-services"
es6-promise-plugin 4.2.2 "Promise"
phonegap-plugin-barcodescanner 8.0.1 "BarcodeScanner"
phonegap-plugin-multidex 1.0.0 "Multidex"
phonegap-plugin-push 2.2.3 "PushPlugin"

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly) "@ionic-native/core": "4.18.0", "@ionic-native/google-maps": "^4.15.1", Current behavior:

Event GoogleMapsEvent.INFO_CLICK is never fired. By clicking on our Marker, I show the InfoWindow as follows:

markerCluster.on(GoogleMapsEvent.MARKER_CLICK).subscribe((params) => {
     const marker: Marker = params[1];

       marker.setTitle('Title');
       marker.setSnippet('demo');
       marker.showInfoWindow();
   });

Then, I try to capture the event as follows:

markerCluster.on(GoogleMapsEvent.INFO_CLICK)
     .subscribe(params => {
       console.log('InfoClick');
     });

And this functions is never called. Any suggestions? How can I do to fix this problem?

wf9a5m75 commented 5 years ago

Try alert() instead of console.log

wf9a5m75 commented 5 years ago

This is already fixed.