-
Notifications
You must be signed in to change notification settings - Fork 394
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
show window info when did tap cluster #63
Comments
This is actually a great request and should be on top of our list. Thanks. |
FWIW: you can make markers that were added via the cluster library show their infoWindow. But it seems like you need to set the necessary marker properties before the marker gets rendered. I was able to make cluster markers show the default info window, when I set their - (void)renderer:(id<GMUClusterRenderer>)renderer willRenderMarker:(GMSMarker *)marker {
if ([[[marker.userData class] description] isEqualToString:@"POIItem"]) {
POIItem *poiItem = marker.userData;
marker.title = poiItem.name;
marker.icon = [UIImage imageNamed:@"custom_marker_icon"]; // it’s also handy to specify a custom marker icon for all markers
}
} Please note that this code might not work well for copy-pasting. I only wanted to give a hint on how to achieve showing default infoWindows. Adjust accordingly. id<GMUClusterRenderer> renderer = [[GMUDefaultClusterRenderer alloc] initWithMapView:_mapView clusterIconGenerator:iconGenerator];
((GMUDefaultClusterRenderer *)renderer).delegate = self; |
Hi all, |
Any update about this issue? I am unable to do it using the approach explained before. |
We are in the process of pushing out 2.0.0 so stay tuned. Probably sometime next week if everything goes smoothly! |
@mountainvat any update on the issue as of now ? |
Hi @hiteshwork , 2.0.0 is out so please update your pod. The clusterManagerDelegate events (https://github.com/googlemaps/google-maps-ios-utils/blob/master/src/Clustering/GMUClusterManager.h#L40) now return a BOOL. Return NO to pass the event to the default handler (i.e showing info window). |
@mountainvat returning NO still doesn't show the info window when tapping on the marker in the cluster. What is the proper way to show the info window then? |
Ok, in combination with |
Hello Guys,
[self.clusterManager setDelegate:self mapDelegate:self]; I added code like this. |
In case anyone is looking for the swift version of the renderer:
|
I want to show window info when click cluster like when click maker, but how i don't know implement. Please, help me.
The text was updated successfully, but these errors were encountered: