Posts

Showing posts from March, 2021

How to Cluster Markers on Google Maps using Flutter

Image
  Map Clusters If you’re using Google Maps to display markers on your Flutter app, I’m sure that you will eventually need to cluster those markers. You don’t want users to zoom out and see hundreds of markers spamming the map right? Well, as I’m sure you know by now, that feature isn’t supported yet by the official Google Maps package. Check this issue to know more. Rest assured though because I’ve got a solution that might work for you. Fluster Package Comes to the Rescue In your search for solutions, you probably bumped into the Fluster package. This package uses a Dart port of supercluster and works really well, but how do you use it on your Flutter project? The readme is very brief, doesn’t explain much and the example isn’t even a Flutter project. This makes the package very easy to overlook unless you find this demo project by the package author, but even with this code, you will struggle to understand how to use it in your project. At least I did. Again, there ...