Skip to content

[google_maps_flutter] Add marker clustering support - android implementation - #6185

Merged
jokerttu merged 6 commits into
flutter:mainfrom
CodemateLtd:feature/google_maps_flutter_android_marker_clustering
Apr 30, 2024
Merged

[google_maps_flutter] Add marker clustering support - android implementation#6185
jokerttu merged 6 commits into
flutter:mainfrom
CodemateLtd:feature/google_maps_flutter_android_marker_clustering

Conversation

@jokerttu

@jokerttujokerttu commented Feb 23, 2024

Copy link
Copy Markdown
Contributor

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.

@jokerttujokerttu changed the title [google_maps_flutter_android] Add marker clustering support[google_maps_flutter] Add marker clustering support - android implementationFeb 29, 2024
@jokerttu
jokerttuforce-pushed the feature/google_maps_flutter_android_marker_clustering branch 2 times, most recently from 1410d4e to 8608e82CompareMarch 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 ownerMarch 1, 2024 07:23
@jokerttu
jokerttuforce-pushed the feature/google_maps_flutter_android_marker_clustering branch 2 times, most recently from 9444aa9 to cb542bfCompareMarch 7, 2024 10:01
@reidbakerreidbaker reopened this Mar 15, 2024
@reidbaker

Copy link
Copy Markdown
Contributor

Did not mean to close.

@jokerttu
jokerttuforce-pushed the feature/google_maps_flutter_android_marker_clustering branch from cb542bf to 78f9a40CompareApril 3, 2024 12:11
@reidbaker
reidbaker requested a review from a teamApril 3, 2024 16:59

@reidbakerreidbaker left a comment

Copy link
Copy Markdown
Contributor

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.

@camsim99camsim99 left a comment

Copy link
Copy Markdown
Contributor

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
jokerttuforce-pushed the feature/google_maps_flutter_android_marker_clustering branch 4 times, most recently from b67ab37 to 1e71fb3CompareApril 8, 2024 08:01

Copy link
Copy Markdown
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

@jokerttujokerttuApr 12, 2024

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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?

@jokerttujokerttuApr 30, 2024

Copy link
Copy Markdown
ContributorAuthor

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
jokerttuforce-pushed the feature/google_maps_flutter_android_marker_clustering branch from 4c3ecb0 to ff0ce89CompareApril 15, 2024 06:20

@camsim99camsim99 left a comment

Copy link
Copy Markdown
Contributor

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
jokerttuforce-pushed the feature/google_maps_flutter_android_marker_clustering branch from e2df683 to 51d1517CompareApril 24, 2024 13:07
@jokerttu
jokerttu requested a review from camsim99April 24, 2024 17:35

@camsim99camsim99 left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
jokerttuforce-pushed the feature/google_maps_flutter_android_marker_clustering branch from 51d1517 to 8bec3deCompareApril 30, 2024 06:29
@jokerttu
jokerttu merged commit bc6c186 into flutter:mainApr 30, 2024
auto-submitBot pushed a commit to flutter/flutter that referenced this pull request Apr 30, 2024
flutter/packages@87a7c51...cc47b06
2024-04-30 joonas.kerttula@codemate.com [google_maps_flutter_web] Add marker clustering support (flutter/packages#6187)
2024-04-30 joonas.kerttula@codemate.com [google_maps_flutter_android] Add marker clustering support (flutter/packages#6185)
2024-04-29 32538273+ValentinVignal@users.noreply.github.com [go_router] Don't log if `hierarchicalLoggingEnabled` is `true` (flutter/packages#6019)
2024-04-29 43054281+camsim99@users.noreply.github.com [file_selector_android] Update `LICENSE` file to include newly added licensed code (flutter/packages#6626)
2024-04-29 43054281+camsim99@users.noreply.github.com [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 flutter-ecosystem@google.com,rmistry@google.com 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
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…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
bisor0627 pushed a commit to bisor0627/packages that referenced this pull request Jun 19, 2026
…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
Sign up for freeto 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

@jokerttu@reidbaker@stuartmorgan-g@camsim99