Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[google_maps_flutter] Marker clustering support #4319

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jokerttu
Copy link
Contributor

@jokerttu jokerttu commented Jun 27, 2023

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.

The Google Maps Utils libraries provides the capability for future additions of features available under these libraries to the google_maps_flutter plugin, such as heatmaps, although they are not included in this PR.

This PR is created from previous PR: flutter/plugins#6752

Resolves flutter/flutter#26863

Android:
image

iOS:
image

Web:
image

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@Hixie
Copy link
Contributor

Hixie commented Aug 22, 2023

@jokerttu Is this still something you are interested in working on? How can we help you?

@thedalelakes
Copy link

@jokerttu is this still something you're working on?

@jokerttu
Copy link
Contributor Author

@jokerttu is this still something you're working on?

Yes, I am scheduled to work on this issue next week and will update the PR accordingly in the near future. The recent architectural changes in the google_maps_flutter_web implementation have affected the integration tests, which I am addressing. Additionally, some new methods introduced in this PR will likely require updates to the native unit tests.

@jokerttu jokerttu force-pushed the google_maps_flutter_cluster_support branch 5 times, most recently from b44d05a to e052a4c Compare October 26, 2023 12:33
@jokerttu jokerttu marked this pull request as ready for review October 27, 2023 14:52
@wangela
Copy link

wangela commented Oct 30, 2023

@stuartmorgan this is ready for review. We inspected the logs for the failing web platform tests and it seems to be reporting based on Android?

@jokerttu
Copy link
Contributor Author

jokerttu commented Oct 31, 2023

Note: that the original PR was reviewed at plugins repository at flutter/plugins#6752
Implementation parts have been mainly same, but small fixes and changes has been done to fix conflicts.
Web tests are rewritten because of changes on the web implementation (web plugin was endorsed).
iOS Google Maps Utils library version is now pinned to 4.1.0 as newer versions do not support iOS platform versions 11 and 12

@stuartmorgan
Copy link
Contributor

@stuartmorgan this is ready for review. We inspected the logs for the failing web platform tests and it seems to be reporting based on Android?

This is because there is a weird circular dependency in the tests where google_maps_flutter_web's example depends on google_maps, which then is depending on a non-overridden version of google_maps_flutter_android so things no longer match. Adding a dependency override for _android in google_maps_flutter_web/example/pubspec.yaml should allow the tests to run.

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience on this; I've finished reviewing the platform interface, and since the overall structure was already reviewed in the previous PR you are good to split that out into the first prequel PR. I've left some comments that you can either address here before splitting, or just address in the new PR.

I should have the rest of the re-review done later today but I wanted to get this part out first so you could work on that in parallel.

@stuartmorgan
Copy link
Contributor

@ditman Looks like the original never got your review for web; if you could take a look here when you get a chance that would be great.

@@ -7,6 +7,7 @@
<title>Browser Tests</title>
<!-- This API key comes from: go/flutter-maps-web-tests-api-key (GCP project: flutter-infra) -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAa9cRBkhuxGq3Xw3HPz8SPwaVOhRmm7kk&libraries=geometry"></script>
<script src="https://unpkg.com/@googlemaps/markerclusterer@2.5.0/dist/index.min.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(If there's any change based on my comment on the app-facing package, we should make sure to make it here as well.)

@apackin
Copy link

apackin commented Jan 16, 2024

Any progress updates on when we can expect this to come out?

@hellohuanlin
Copy link
Contributor

@jokerttu is this ready for another review?

@jokerttu
Copy link
Contributor Author

jokerttu commented Jan 18, 2024

@hellohuanlin

@jokerttu is this ready for another review?

Not yet, most of the issues @stuartmorgan pointed out are fixed, but there are still few that are not yet done.
Also, before this can be finalized, we need also some resolution to this question waiting review from @ditman: (#4319 (comment))

@jokerttu
Copy link
Contributor Author

@stuartmorgan

It looks like this still hasn't been split out?

The review comments were resolved in this PR before splitting so that the platform-specific implementations would not stretch too far in time after the platform interface update.

Here is the first prequel PR for google_maps_flutter_platform_interface: #6158

@stuartmorgan
Copy link
Contributor

However, a few discussions remain open, and I'm actively seeking further input on those.

Was there anything other than web-specific questions? I looked back through the comments and didn't find any unresolved discussions with questions other than the web ones, but I may have missed something.

@jokerttu
Copy link
Contributor Author

jokerttu commented Feb 21, 2024

@stuartmorgan

However, a few discussions remain open, and I'm actively seeking further input on those.

Was there anything other than web-specific questions? I looked back through the comments and didn't find any unresolved discussions with questions other than the web ones, but I may have missed something.

Yes, checked and only web-specific discussions are still open.

@jokerttu
Copy link
Contributor Author

@stuartmorgan added prequel PR:s for platforms as well as draft, as the platform_interface (#6158) PR has not yet landed:
Android: #6185
iOS: #6186
Web: #6187 (@ditman)

auto-submit bot pushed a commit that referenced this pull request Feb 29, 2024
…terface (#6158)

This PR introduces support for marker clustering

This is prequel PR for: #4319
Containing only changes to `google_maps_flutter_platform_interface` package.

Follow up PR:s will hold the platform and app-facing plugin implementations.

Linked issue: flutter/flutter#26863
@jokerttu jokerttu force-pushed the google_maps_flutter_cluster_support branch from 5083248 to 0dcab77 Compare March 1, 2024 11:43
@jokerttu jokerttu force-pushed the google_maps_flutter_cluster_support branch from 0dcab77 to d012215 Compare March 1, 2024 12:10
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@jokerttu jokerttu marked this pull request as draft March 1, 2024 13:44
@jokerttu
Copy link
Contributor Author

jokerttu commented Mar 1, 2024

Converted to draft to avoid unnecessary reviews before the platform implementations are landed.

LouiseHsu pushed a commit to LouiseHsu/packages that referenced this pull request Mar 7, 2024
…terface (flutter#6158)

This PR introduces support for marker clustering

This is prequel PR for: flutter#4319
Containing only changes to `google_maps_flutter_platform_interface` package.

Follow up PR:s will hold the platform and app-facing plugin implementations.

Linked issue: flutter/flutter#26863
@jokerttu jokerttu force-pushed the google_maps_flutter_cluster_support branch from d012215 to 0bd74d3 Compare March 7, 2024 13:09
@cyanglaz cyanglaz removed their request for review March 19, 2024 21:42
@jokerttu jokerttu force-pushed the google_maps_flutter_cluster_support branch from 0bd74d3 to 04070f9 Compare April 3, 2024 12:13
@ParkBud
Copy link

ParkBud commented Apr 4, 2024

@jokerttu any updates on this 🥺 Really looking forward to it. Really appreciate you for taking this on!

@jokerttu
Copy link
Contributor Author

jokerttu commented Apr 5, 2024

@jokerttu any updates on this 🥺 Really looking forward to it. Really appreciate you for taking this on!

The work is ongoing on platform implementation PR:s
#6185 (merged)
#6186
#6187 (merged)

jokerttu added a commit that referenced this pull request Apr 30, 2024
This PR introduces support for marker clustering for Android platform

An example usage is available in the example application at
`./packages/google_maps_flutter/google_maps_flutter_android/example` on
the page `Manage clustering`

This is prequel PR for: #4319
and sequel PR for: #6158

Containing only changes to `google_maps_flutter_android` package.

Follow up PR will hold the app-facing plugin implementation.

Linked issue: flutter/flutter#26863
jokerttu added a commit that referenced this pull request Apr 30, 2024
This PR introduces support for marker clustering for Web platform

This is prequel PR for: #4319
and sequel PR for: #6158

Containing only changes to `google_maps_flutter_web` package.

Follow up PR will hold the app-facing plugin implementation.

Linked issue: flutter/flutter#26863

---------

Co-authored-by: David Iglesias Teixeira <ditman@gmail.com>
@jokerttu jokerttu force-pushed the google_maps_flutter_cluster_support branch from 04070f9 to 850bf1e Compare April 30, 2024 12:41
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
…6185)

This PR introduces support for marker clustering for Android platform

An example usage is available in the example application at
`./packages/google_maps_flutter/google_maps_flutter_android/example` on
the page `Manage clustering`

This is prequel PR for: flutter#4319
and sequel PR for: flutter#6158

Containing only changes to `google_maps_flutter_android` package.

Follow up PR will hold the app-facing plugin implementation.

Linked issue: flutter/flutter#26863
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
This PR introduces support for marker clustering for Web platform

This is prequel PR for: flutter#4319
and sequel PR for: flutter#6158

Containing only changes to `google_maps_flutter_web` package.

Follow up PR will hold the app-facing plugin implementation.

Linked issue: flutter/flutter#26863

---------

Co-authored-by: David Iglesias Teixeira <ditman@gmail.com>
@stuartmorgan
Copy link
Contributor

Status update from triage: Blocked on landing the iOS platform implementation, which is turn blocked on Google Maps SDK-level issues.

@stuartmorgan stuartmorgan added the federated: all_changes PR that contains changes for all packages for a federated plugin change label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
federated: all_changes PR that contains changes for all packages for a federated plugin change p: google_maps_flutter platform-web
Projects
None yet
10 participants