After updating to 1.0.2, my custom InfoWindow isn't applied to clustered markers. Everything was working fine in 0.6.2
This code doesn't work
clusterManager = ClusterManager(this, map, markerManager)
clusterManager.renderer = ClusterRenderer(this, map, clusterManager)
map.setOnCameraIdleListener(clusterManager)
map.setOnMarkerClickListener(clusterManager)
map.setInfoWindowAdapter(CustomInfoWindowAdapter(this))
clusterManager.setOnClusterItemInfoWindowClickListener { clusterItem ->
startPlaceActivity(clusterItem.place)
}
What is the "way-to-go" when I want to add a custom InfoWindow for clustered markers in 1.0.2?
@bartekpacia Good question!
You can check out CustomMarkerClusteringDemoActivity in the demo app for the recommended way of setting custom info windows on clusters.
There is also more documentation here about adding an info window for an individual clustered marker:
https://developers.google.com/maps/documentation/android-sdk/utility/marker-clustering#info-window
And here's documentation on customizing the marker clusters, which includes extending the DefaultClusterRenderer and override the onBeforeClusterItemRendered() and onBeforeClusterRendered() methods:
https://developers.google.com/maps/documentation/android-sdk/utility/marker-clustering#custom
See the PersonRenderer within the CustomMarkerClusteringDemoActivity.
Hopefully that should help - I'm going to close out the issue, but please feel free to re-open if it's not clear how to solve this!
@barbeau Unfortunately, I haven't been able to make my custom InfoWindowAdapter work in 1.0.2 release. I read all the resources you provided but none of them explains how to add custom info windows to clustered markers having regard to the changes in the 1.0.2.
I think this issue should be reopened or better documentation should be supplied. I appreciate your work to make this library better but the documentation doesn't feel complete and up-to-date with the newest changes.
@bartekpacia Ok, thanks for the update! I'm re-opening.
We're working on improved documentation for a few things that weren't covered in the initial v1.0 release docs, so we'll take a look at this as part of that (https://github.com/googlemaps/android-maps-utils/issues/686).
I've added a Migration Guide to the README which should clear up some of the confusion from the changes introduced in v1.0.0. If you run into any hiccups or have any suggestions feel free to comment here or open another issue.
I am trying to follow the migration guide, but as soon as I upgrade off of 0.6.2 my custom infowindows no longer work. I am using clustering as well as non-clustered markers, and have tried using MarkerManager as the migration guide suggests with no success. I also cannot find any working examples that have a custom infowindow being used with clustered items.
My custom info window was previously used against a non-clustered marker that was added directly into the map. This worked perfectly in 0.6.2.
Please advise. Thank you!
same here!
@mdurfee @Testator Thanks for the feedback - looks like there is another issue open for this at https://github.com/googlemaps/android-maps-utils/issues/738 with more sample code, so let's continue the discussion there.
Most helpful comment
I am trying to follow the migration guide, but as soon as I upgrade off of 0.6.2 my custom infowindows no longer work. I am using clustering as well as non-clustered markers, and have tried using MarkerManager as the migration guide suggests with no success. I also cannot find any working examples that have a custom infowindow being used with clustered items.
My custom info window was previously used against a non-clustered marker that was added directly into the map. This worked perfectly in 0.6.2.
Please advise. Thank you!