google-maps-ios-utils icon indicating copy to clipboard operation
google-maps-ios-utils copied to clipboard

Implement cluster info window / custom look

Open DDRBoxman opened this issue 10 years ago • 4 comments

googlemaps/google-maps-ios-utils#4

DDRBoxman avatar Oct 16 '14 04:10 DDRBoxman

How to implement the tapping marker event with the cluster manager?

wancheng628 avatar Dec 15 '14 15:12 wancheng628

Yes Ive got the same issue. The GMSMarker info contained in the Spot object is lost when its added to the cluster, therefore when you tap on the marker the title is missing

kyramckenna avatar May 12 '15 12:05 kyramckenna

I have same problem...

When i try show infowindow, i use the method:

  • (BOOL)mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker { _mapView.selectedMarker = marker; return YES; }

    But this not show nothing.

    In debug, i can see that was added the title label and snippet, like imagem below: captura de tela 2015-09-02 as 02 23 44

But when method mapView:didTapMarker is called, this receive a marker only position, without the title and snippet, like image below:

captura de tela 2015-09-02 as 02 25 39

How can show Infowindow?

ghost avatar Sep 02 '15 05:09 ghost

@wancheng628 , @kyramckenna and @tiagoMaua Hey guys, this is the fix for this issue.

Go to GDefaultClusterRenderer.m file, in clustersChanged method, add the following:

marker.title = cluster.marker.title;
marker.snippet = cluster.marker.snippet;

then the title and snippet will show normally.

mumensh avatar Sep 15 '15 12:09 mumensh