Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After removing marker cluster by map.clear() newly added marker cluster not bind markers click callback fn on Android #1701

Closed
lpikora opened this issue Sep 1, 2017 · 3 comments

Comments

@lpikora
Copy link

lpikora commented Sep 1, 2017

I'm submitting a ... (check one with "x")
[ ] question
[x] any problem or bug report
[ ] feature request

The plugin version: (check one with "x")
[ ] 1.4.x
[x] 2.0.0-beta3

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

cordova information: (run $> cordova plugin list)

cordova-plugin-console 1.0.7 "Console"
cordova-plugin-googlemaps 2.0.0-beta3-20170831-1824 "cordova-plugin-googlemaps"
cordova-plugin-whitelist 1.3.2 "Whitelist"

Current behavior:
When marker cluster is removed from map calling map.clear(), all marker clusteres added to map after that not bind marker clicks callback function.

Expected behavior:
When marker cluster is removed from map by map.clear(), newly added marker clusters should bind marker click callbacks.

Steps to reproduce:
Add marker cluster using map.addMarkerCluster() and put markers click event to it callback function:

markerCluster.on(plugin.google.maps.event.MARKER_CLICK, function (position, marker) {
  alert('marker click');
});

run map.clear()

Add add new marker cluster with the same code above.

Marker click event not firing callback function.

Screen capture or video record:
https://www.youtube.com/watch?v=4aCpI8tHtU8

Related code, data or error log (please format your code or data):

https://github.com/lpikora/cluster_test

@lpikora
Copy link
Author

lpikora commented Sep 2, 2017

JS console outputs -----> This is remained cluster icon : markercluster_69040575 after click on marker. Click events callback is not fired. It happens only, when cluster is removed and then added to map again - with the same marker options array in markes property. Tested with 5692f3d commit

wf9a5m75 added a commit that referenced this issue Sep 5, 2017
…ker cluster not bind markers click callback fn #1701
@wf9a5m75
Copy link
Member

wf9a5m75 commented Sep 5, 2017

Fixed.
1701_compressed

@lpikora
Copy link
Author

lpikora commented Sep 5, 2017

thank you

@lpikora lpikora closed this as completed Sep 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants