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

map markers not getting updated during runtime #10

Closed maheshmnj closed 3 years ago

maheshmnj commented 3 years ago

Thanks for this great package,I am having a weird issue I tried your sample code and it seems to work well but during the runtime when I try to update the list I am getting only 1 Item on the map. e.g I am getting a List<T> items which I am mapping to a List<ClusterItem<T>> kItems and then when I do

_manager.setItems(kItems); /// total kItems length equals 20 here

but when I see the length of markers in _updateMarkers(Set markers) its always 1 rest 19 are null or getting lost It always updates only 1 item from the kItems list and I only see 1 marker on the map

let me know if you need any additional info.

maheshmnj commented 3 years ago

I got it working and clustering does work perfectly fine thanks for this great package

bicho19 commented 3 years ago

@maheshmnj could you tell me how did you got it to update the marker. i tried for two days now, but it seems i can't get it to work yet

maheshmnj commented 3 years ago

make sure your using the latest version of the plugin and you can call _manager.setItems(kItems); to update the markers in runtime let me know if you have any questions on this I would be happy to help :). also I would suggest to try out the example once probably that would help