Skip to content

Conversation

@jokerttu
Copy link
Contributor

@jokerttu jokerttu commented Feb 23, 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

Pre-launch Checklist

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

@jokerttu jokerttu changed the title [google_maps_flutter_android] Add marker clustering support [google_maps_flutter] Add marker clustering support - android implementation Feb 29, 2024
@jokerttu jokerttu force-pushed the feature/google_maps_flutter_android_marker_clustering branch 2 times, most recently from 1410d4e to 8608e82 Compare March 1, 2024 06:47
@jokerttu jokerttu marked this pull request as ready for review March 1, 2024 07:23
@jokerttu jokerttu requested a review from reidbaker as a code owner March 1, 2024 07:23
@jokerttu jokerttu force-pushed the feature/google_maps_flutter_android_marker_clustering branch 2 times, most recently from 9444aa9 to cb542bf Compare March 7, 2024 10:01
@reidbaker reidbaker closed this Mar 15, 2024
@reidbaker reidbaker reopened this Mar 15, 2024
@reidbaker
Copy link
Contributor

Did not mean to close.

@jokerttu jokerttu force-pushed the feature/google_maps_flutter_android_marker_clustering branch from cb542bf to 78f9a40 Compare April 3, 2024 12:11
@reidbaker reidbaker requested a review from a team April 3, 2024 16:59
Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

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

Partial review. Sorry you waited so long this slipped though my radar. Will continue the review tomorrow.

Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

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

Looks great! Just left some comments about nits, tests, and naming :) Would not merge until @reidbaker gives a second review though

@jokerttu jokerttu force-pushed the feature/google_maps_flutter_android_marker_clustering branch 4 times, most recently from b67ab37 to 1e71fb3 Compare April 8, 2024 08:01
Copy link
Contributor

Choose a reason for hiding this comment

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

Document/test the behavior here if onClusterTap is called with an invalid mapId

Copy link
Contributor Author

@jokerttu jokerttu Apr 12, 2024

Choose a reason for hiding this comment

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

Please check how this _events method is used elsewhere in the file.
_events function just creates event matcher that matches the mapId, and creating stream with invalid mapId will just create stream that does not match any events ever.
The stream is created for the current mapId and I don't see case where the mapId could be invalid.
Testing this method would test mostly the dart Stream functionality. Not sure how this should be tested.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok so what you are saying is that an invalid map id is a user error and is safe to call?

Copy link
Contributor Author

@jokerttu jokerttu Apr 30, 2024

Choose a reason for hiding this comment

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

Yes it is. The app facing plugin implementation is also hiding the map id from the developer interface.
If anyone uses these plarform interface implementations directly, it is user error to listen wron mapId.
Note that this whole multiplexing behaviour will be removed when this plugin is transformed to use pigeon messaging.

This comment was marked as outdated.

@jokerttu jokerttu requested review from camsim99 and reidbaker April 12, 2024 14:36
@jokerttu jokerttu force-pushed the feature/google_maps_flutter_android_marker_clustering branch from 4c3ecb0 to ff0ce89 Compare April 15, 2024 06:20
Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

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

Left some nits but all of my comments have been addressed! Looks good :)

@jokerttu jokerttu force-pushed the feature/google_maps_flutter_android_marker_clustering branch from e2df683 to 51d1517 Compare April 24, 2024 13:07
@jokerttu jokerttu requested a review from camsim99 April 24, 2024 17:35
Copy link
Contributor

@camsim99 camsim99 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 fixing my nits! @reidbaker for second review

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok so what you are saying is that an invalid map id is a user error and is safe to call?

@jokerttu jokerttu force-pushed the feature/google_maps_flutter_android_marker_clustering branch from 51d1517 to 8bec3de Compare April 30, 2024 06:29
@jokerttu jokerttu merged commit bc6c186 into flutter:main Apr 30, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 30, 2024
flutter/packages@87a7c51...cc47b06

2024-04-30 [email protected] [google_maps_flutter_web] Add marker clustering support (flutter/packages#6187)
2024-04-30 [email protected] [google_maps_flutter_android] Add marker clustering support (flutter/packages#6185)
2024-04-29 [email protected] [go_router] Don't log if `hierarchicalLoggingEnabled` is `true`  (flutter/packages#6019)
2024-04-29 [email protected] [file_selector_android] Update `LICENSE` file to include newly added licensed code (flutter/packages#6626)
2024-04-29 [email protected] [file_selector_android] Modifies `getDirectoryPath`, `openFile`, `openFiles` to return file/directory paths instead of URIs (flutter/packages#6438)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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
@jokerttu jokerttu deleted the feature/google_maps_flutter_android_marker_clustering branch September 9, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants