-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[google_maps_flutter] Marker clustering support #6752
[google_maps_flutter] Marker clustering support #6752
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some high level notes/questions on the Dart parts; I'll leave primary review of the platform implementations to the platform-specific owners.
...maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cluster.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cluster.dart
Outdated
Show resolved
Hide resolved
...oogle_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cluster_manager.dart
Outdated
Show resolved
Hide resolved
...es/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/info_window.dart
Outdated
Show resolved
Hide resolved
...oogle_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cluster_manager.dart
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart
Outdated
Show resolved
Hide resolved
...ges/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart
Outdated
Show resolved
Hide resolved
@jokerttu FYI one of the change requested was not marked as resolved but it was |
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/ClusterManagersController.h
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/ClusterManagersController.h
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/ClusterManagersController.m
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/ClusterManagersController.m
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/ClusterManagersController.m
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/ClusterManagersController.m
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/ClusterManagersController.m
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.h
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for creating this PR! I looked at the iOS code it mostly looks good! I left some nits.
packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml
Show resolved
Hide resolved
...es/google_maps_flutter/google_maps_flutter_android/lib/src/google_map_inspector_android.dart
Show resolved
Hide resolved
...maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart
Show resolved
Hide resolved
...maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/cluster_manager.dart
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I re-reviewed the cross-platform parts of this; one question above, but otherwise those aspects look good to me.
* Adds initial marker clustering support for Android, iOS and Web
4d99d2c
to
a8efc71
Compare
…s for iOS * Rename init method * Improvements * Combine marker handling * Add documentation for cluster tap and consume click * Improve on cluster tap handling * Improve how markers are added or removed from cluster * Remove public methods for single add, delete and change * Add ref for integral zoom * Move marker and cluster manager id handling to category * Fix headers for podspec
All pending CRs have been now fixed. |
I think my approval counts for Android |
@jokerttu we're using your PR right now and encountered that we cannot define a custom Cluster-Icon...will this also be available with this PR? For Android for example you'll find here the implementation: https://github.com/googlemaps/android-maps-utils/blob/main/library/src/main/java/com/google/maps/android/clustering/view/DefaultClusterRenderer.java#L81 |
We've just completed the migration of the plugin code to the flutter/packages repository, as described in https://flutter.dev/go/flutter-plugins-repo-migration, and this repository is now being archived. Unfortunately that means that all in-progress PRs here must be moved to flutter/packages. Please see our instructions for an explanation of how to move your PR, and if you have any issues moving your PR please don't hesitate to reach out in the #hackers-ecosystem channel in Discord. Our apologies that your PR was caught in this one-time transition. We're aware that it's disruptive in the short term, and appreciate your help in getting us to a better long-term state! |
Adds the initial support for the marker clustering for Android, iOS and Web platforms.
Clustering is implemented using native google maps utils libraries for Android, iOS and Web.
Android:

iOS:

Web:

Resolves flutter/flutter#26863
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.