DDRBoxman/google-maps-ios-utils

Implement cluster info window / custom look

Opened this issue · 4 comments

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

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

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?

@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.