-
Notifications
You must be signed in to change notification settings - Fork 3k
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] Custom marker size improvements #4055
[google_maps_flutter] Custom marker size improvements #4055
Conversation
packages/google_maps_flutter/google_maps_flutter/example/integration_test/google_maps_test.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/example/lib/custom_marker_icon.dart
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart
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/GoogleMapMarkerController.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/GoogleMapMarkerController.m
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m
Outdated
Show resolved
Hide resolved
Any update on when this will be merged? |
616895e
to
1fc2e5b
Compare
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/GoogleMapMarkerController.m
Outdated
Show resolved
Hide resolved
...google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m
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.
A few minor nits, on the cross-platform parts, but generally they look good, and the native test coverage looks good now from a high level, so this should be ready for full platform reviews by @cyanglaz, @ditman, and @reidbaker.
...aps_flutter/google_maps_flutter_ios/example/ios11/ios/RunnerTests/ExtractIconFromDataTests.m
Outdated
Show resolved
Hide resolved
...aps_flutter/google_maps_flutter_ios/example/ios13/ios/RunnerTests/ExtractIconFromDataTests.m
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart
Outdated
Show resolved
Hide resolved
@cyanglaz, @ditman, @reidbaker: ping on the platform portions of this review. |
...google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java
Outdated
Show resolved
Hide resolved
...google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java
Outdated
Show resolved
Hide resolved
...google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java
Outdated
Show resolved
Hide resolved
...google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java
Outdated
Show resolved
Hide resolved
...le_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java
Outdated
Show resolved
Hide resolved
...le_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java
Outdated
Show resolved
Hide resolved
...le_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java
Outdated
Show resolved
Hide resolved
...utter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java
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.
A few comments about the web, and a small rant about the _json-backed BitmapDescriptor in Dart (which I'd love to see gone if possible :))
packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart
Outdated
Show resolved
Hide resolved
@jokerttu It looks like there are still some outstanding comments on this PR, is this something you are still actively working on? |
Converted as draft to avoid unnecessary reviews on this PR before platform implementations are landed. This PR will be updated and marked ready for review with only app-facing plugin changes after the platform impls are landed. |
#6826) Platform implementations portion of : #4055 Adds platform handling for new BitmapDescriptor classes `AssetMapBitmap` and `BytesMapBitmap` introduced in #6687 Containing only changes to packages * `google_maps_flutter_android` * `google_maps_flutter_ios` * `google_maps_flutter_web` Follow up PR will hold the app-facing plugin implementations. Linked issue: flutter/flutter#34657
f497251
to
7357325
Compare
This PR now contains only the app-facing api changes in google_maps_flutter package. @stuartmorgan what would be correct process to deprecate the old methods under BitmapDescriptor class. |
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.
LGTM!
You can send me a PR to re-deprecate the other bitmap constructors, and we'll land that after landing this one. (It should be safe to land before this too, but I think it's less confusing if have already re-exported the new types.)
7357325
to
bce83cd
Compare
flutter/packages@11e192a...586faa6 2024-06-05 [email protected] [google_sign_in_web] Update button_tester to use web_only library. (flutter/packages#6868) 2024-06-05 [email protected] Roll Flutter from c246ecd to 27e0656 (17 revisions) (flutter/packages#6875) 2024-06-05 [email protected] [path_provider] Skip verifying sample file on macOS (flutter/packages#6874) 2024-06-05 [email protected] [google_maps_flutter] Custom marker size improvements (flutter/packages#4055) 2024-06-05 [email protected] [rfw] Material slider widget (flutter/packages#6610) 2024-06-04 [email protected] [ci] Manual roll Flutter to c246ecd (84 revisions) + fixes (flutter/packages#6863) 2024-06-04 [email protected] Correcting the typo of Flutter in projects (flutter/packages#6850) 2024-06-04 [email protected] [google_maps_flutter] Custom marker size improvements - platform impls (flutter/packages#6826) 2024-06-04 [email protected] Avoid cumbersome formatter workaround (flutter/packages#6573) 2024-06-04 [email protected] Clean Xcode project before analyzing and testing (flutter/packages#6842) 2024-06-03 [email protected] [pigeon] Kotlin/Java method overloading for the `setUp` method (flutter/packages#6843) 2024-06-03 [email protected] [url_launcher] Add support for setting show title on Chrome Custom Tabs (flutter/packages#6097) 2024-06-03 [email protected] Revert "Roll Flutter from c85fa6a to 7eebe29 (#6836)" (flutter/packages#6860) 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
…scriptor API (flutter#6687) This PR adds improvements to BitmapDescriptor API for google_maps_flutter_platform_interface * Adds better support for marker size and scaling behaviour with `AssetMapBitmap` and `BytesMapBitmap`. * Deprecates `BitmapDescriptor.fromAssetImage` in favor of `BitmapDescriptor.asset` and `AssetMapBitmap.create`. * Deprecates `BitmapDescriptor.fromBytes` in favor of `BitmapDescriptor.bytes` and `BytesMapBitmap` This is prequel PR for: flutter#4055 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#34657
flutter#6826) Platform implementations portion of : flutter#4055 Adds platform handling for new BitmapDescriptor classes `AssetMapBitmap` and `BytesMapBitmap` introduced in flutter#6687 Containing only changes to packages * `google_maps_flutter_android` * `google_maps_flutter_ios` * `google_maps_flutter_web` Follow up PR will hold the app-facing plugin implementations. Linked issue: flutter/flutter#34657
This PR adds and improves marker scaling support for Android, iOS and Web. With this change, custom marker icons are drawn with same logical size on all platforms, keeping the visual style as close as possible. This PR is created from previous PR: flutter/plugins#6805 To avoid breaking change, this PR makes the following changes while keeping the old behavior intact: - Deprecates BitmapDescriptor.fromAssetImage in favor of BitmapDescriptor.asset and AssetMapBitmap - Deprecates BitmapDescriptor.fromBytes in favor of BitmapDescriptor.bytes and BytesMapBitmap **Android:** <img width="350" alt="Android Screenshot" src="https://github.com/flutter/packages/assets/5219613/a5b9d57b-5f6e-4c17-8f60-f397b2cf21f4"> **iOS:** <img width="350" alt="iOS Screenshot" src="https://github.com/flutter/packages/assets/5219613/5edf9fc8-91c7-4927-a158-e71ab3081b96"> **Web:** <img width="350" alt="Web Screenshot" src="https://github.com/flutter/packages/assets/5219613/74fb2ea0-deff-4bc7-94b3-fa4aa5d6bfd5"> Resolves flutter/flutter#34657
Deprecates `BitmapDescriptor.fromAssetImage` in favor of `BitmapDescriptor.asset` and `AssetMapBitmap.create`. Deprecates `BitmapDescriptor.fromBytes` in favor of `BitmapDescriptor.bytes` and `BytesMapBitmap` This is part of the implementation of the following federated plugin PR: #4055 Related to issue: flutter/flutter#34657
This PR adds and improves marker scaling support for Android, iOS and Web.
With this change, custom marker icons are drawn with same logical size on all platforms, keeping the visual style as close as possible.
This PR is created from previous PR: flutter/plugins#6805
To avoid breaking change, this PR makes the following changes while keeping the old behavior intact:
Android:
iOS:
Web:
Resolves flutter/flutter#34657
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.