bpillon / google_maps_cluster_manager

Simple Flutter clustering library for Google Maps
https://pub.dev/packages/google_maps_cluster_manager
MIT License
119 stars 94 forks source link

Define custom method to define MarkerId #5

Closed fvisticot closed 3 years ago

fvisticot commented 4 years ago

I need to use the mapController.showMarkerInfoWindow(MarkerId(selectedMarker.getId())); My pb is that the function used to set MarkerId in the cluster manager is private. It would be nice to define our own method to define the markerId and use the same function to open the Info window.

bpillon commented 3 years ago

Hello @fvisticot. You are already able to define custom MarkerId, the simplest method I see to do it is to subclass Cluster and override getId() method. Or you can just make a custom Future<Marker> Function(Cluster<T>) markerBuilder method.