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

Add function to Zoom to Bounds when click in Cluster which has Info Window shown already #10

Open
trietbui85 opened this issue May 2, 2013 · 3 comments

Comments

@trietbui85
Copy link

OK, let me describe step by step how to archive it.

In advanced mode

  1. Cluster click behavior: choose Show Info Window
  2. Cluster Info Window Click behavior: choose Zoom to Bounds
  3. Open the Sample Activity. Click on a cluster, then the Info Window will be shown.
    In this case, if click the Info Window will perform Zoom to Bounds.
  4. I want to have an option, when the Info Window is shown, we can also click on Cluster to perform Zoom to Bounds action. At the moment, click on Cluster when Info Window is shown does nothing.

Thank you for great mapping cluster library.

@carltonwhitehead
Copy link
Contributor

Thanks for the suggestion, @anticafe!

Looking at the Google Maps API docs, it looks like it should be possible to implement this by adding an extra value in Options.ClusterClickBehavior and a check against Marker.isInfoWindowShown(). See https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/Marker#isInfoWindowShown()

Did you want to code this change? You could fork it, code it on your fork, and send a pull request. Let me know so we don't duplicate effort (I like the idea enough to implement it myself when I have time).

carltonwhitehead pushed a commit that referenced this issue May 17, 2013
@carltonwhitehead
Copy link
Contributor

I just tried to implement this (see 13a1c60), but I think I stumbled across a bug in the Google Maps API v2. The problem is the marker.isInfoWindowVisible() returns false when the OnMarkerClickListener calls marker.showInfoWindow() and the onMarkerClick(Marker) returns true, so, even though the Info Window is clearly visible, it is not possible to accurately test its visibility programmatically. I'm going to try to repeat this problem in a more concise example, and then submit a bug report to the Google Maps API v2 bug tracker.

@carltonwhitehead
Copy link
Contributor

Bug filed: https://code.google.com/p/gmaps-api-issues/issues/detail?id=5408 -- @anticafe and anyone else wanting this feature implemented, please star the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants