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] Add marker clustering support - iOS implementation #6186

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jokerttu
Copy link
Contributor

@jokerttu jokerttu commented Feb 23, 2024

This PR introduces support for marker clustering for iOS platform

An example usabe is available in the example application at ./packages/google_maps_flutter/google_maps_flutter_ios/example/ios12 on the page Manage clustering

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

Containing only changes to google_maps_flutter_ios 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_ios] Add marker clustering support [google_maps_flutter] Add marker clustering support - iOS implementation Feb 29, 2024
@jokerttu jokerttu force-pushed the feature/google_maps_flutter_ios_marker_clustering branch 3 times, most recently from cc42eb1 to 0f29034 Compare March 1, 2024 10:19
@jokerttu jokerttu marked this pull request as ready for review March 1, 2024 10:35
Copy link
Contributor

@hellohuanlin hellohuanlin left a comment

Choose a reason for hiding this comment

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

The code looks quite clean. But I feel I don't know enough about clusters to stamp it just yet. Could you also invite the reviewers from your previous PR?

@jokerttu jokerttu force-pushed the feature/google_maps_flutter_ios_marker_clustering branch 2 times, most recently from 00b59e4 to 1669b76 Compare March 7, 2024 12:22
Copy link
Contributor

@hellohuanlin hellohuanlin left a comment

Choose a reason for hiding this comment

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

can you add some unit tests on native side?

@jokerttu jokerttu force-pushed the feature/google_maps_flutter_ios_marker_clustering branch 2 times, most recently from b0e9ada to b4eaeba Compare April 3, 2024 12:09
@jokerttu
Copy link
Contributor Author

jokerttu commented Apr 3, 2024

@hellohuanlin

can you add some unit tests on native side?

Added some native unit tests

@jokerttu jokerttu force-pushed the feature/google_maps_flutter_ios_marker_clustering branch from b4eaeba to 2c326e8 Compare April 8, 2024 08:12
@jokerttu jokerttu requested a review from cbracken as a code owner April 8, 2024 08:12
Copy link
Contributor

@hellohuanlin hellohuanlin 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 adding those tests. The overall code looks clean.

@cbracken feel free to give it another pass (if you see fit) since you are the new owner. Otherwise I think it's good to land.

@@ -22,8 +22,15 @@ Downloaded by pub (not CocoaPods).
# has been confirmed to be compatible via an example in examples/. See discussion
# in https://github.com/flutter/flutter/issues/86820 for why this is so broad.
s.dependency 'GoogleMaps', '< 9.0'
# Once the plugin requires iOS version 13+, this should be updated.
Copy link
Contributor

Choose a reason for hiding this comment

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

This day has come :) We now require iOS 14+.

Copy link
Contributor Author

@jokerttu jokerttu Apr 25, 2024

Choose a reason for hiding this comment

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

Updating Google-Maps-iOS-Utils library seems to cause problems.

https://github.com/googlemaps/google-maps-ios-utils/blob/0e7ed81f1bbd9d29e4529c40ae39b0791b0a0eb8/Google-Maps-iOS-Utils.podspec#L24

Output after updating the version:

[!] CocoaPods could not find compatible versions for pod "GoogleMaps":
  In Podfile:
    google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) was resolved to 0.0.1, which depends on
      Google-Maps-iOS-Utils (= 4.2.2) was resolved to 4.2.2, which depends on
        GoogleMaps (~> 7.3)

    google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) was resolved to 0.0.1, which depends on
      GoogleMaps (< 9.0, >= 8.4)

Version 4.1.0 does not work anymore either:
Throwing "User-Defined Issue (Xcode): Unsupported Swift architecture" issue on build phase

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds like this is blocked on googlemaps/google-maps-ios-utils#456 then.

I would image that will be fixed soon, because Google Maps 7.3 isn't compliant with the upcoming App Store privacy requirements, so the current version of Google-Maps-iOS-Utils will become essentially unshippable once enforcement of those requirements starts.

@jokerttu jokerttu force-pushed the feature/google_maps_flutter_ios_marker_clustering branch from a3d8522 to e382d51 Compare April 25, 2024 12:18
@jokerttu jokerttu force-pushed the feature/google_maps_flutter_ios_marker_clustering branch from e382d51 to 9cc025d Compare April 25, 2024 12:39
@jmagman
Copy link
Member

jmagman commented May 8, 2024

@jokerttu is this ready for re-review?

@jokerttu
Copy link
Contributor Author

@jokerttu is this ready for re-review?

@jmagman not yet, this is waiting new release of Google-Maps-iOS-Utils library to have support latest Google Maps SDK versions. See discussion here: #6186 (comment)

@stuartmorgan
Copy link
Contributor

FYI I have raised the blocking issue internally with the Google Maps team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants