-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[google_maps_flutter] Add support to request map renderer for Android #6619
[google_maps_flutter] Add support to request map renderer for Android #6619
Conversation
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 Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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. |
880e0c5
to
384376d
Compare
As this change seems to affect the integration tests of the main plugin at google_maps_flutter/google_maps_flutter/example this is now converted as first phase of the multi-package PR process. |
@stuartmorgan It is as important to run all google_maps_flutter tests against One option could be to set preferred renderer for tests by setting |
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.
For CI tests, I believe we should be able to make a second driver in google_maps_flutter_android/example/test_driver/
, and have each driver set a different renderer.
packages/google_maps_flutter/google_maps_flutter_android/README.md
Outdated
Show resolved
Hide resolved
...flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
Seems like drivers are not runned at all on for the Android integration tests; instead integration tests are runned with firebase-test-lab which skips test_driver folder totally and runs tests directly from integration_tests file without drivers. Moved tests under integration_test folder. Files in this folder are each build and tested separately so those should have separate application contexts as well. |
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.
@GaryQian Could you review the Java part of this?
packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/README.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/README.md
Outdated
Show resolved
Hide resolved
...ges/google_maps_flutter/google_maps_flutter_android/lib/src/google_map_renderer_android.dart
Outdated
Show resolved
Hide resolved
...ges/google_maps_flutter/google_maps_flutter_android/lib/src/google_map_renderer_android.dart
Outdated
Show resolved
Hide resolved
...ges/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart
Outdated
Show resolved
Hide resolved
...ges/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart
Outdated
Show resolved
Hide resolved
...ges/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart
Outdated
Show resolved
Hide resolved
410db81
to
975f6cc
Compare
(LatLngBounds bounds) => bounds != zeroLatLngBounds) ?? | ||
(LatLngBounds bounds) => | ||
bounds != zeroLatLngBounds && | ||
bounds.northeast != bounds.southwest) ?? |
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.
This change is done, as otherwise test fails with latest renderer, as bounds with zero area is given at start.
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.
This looks good to me from a code standpoint; I'm going to push a change to the branch so that the full Android test suite will run in CI.
I forgot we can't push to org-repo-owned branches; created #6731 instead. |
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.
Sorry for the long delay here; I forgot that this was just waiting for the results of my test run PR (which passed).
* 93a63b36e [google_maps_flutter] Add support to request map renderer for Android (flutter/plugins#6619) * ca3d56973 Roll Flutter from e2fb672 to a570fd2 (15 revisions) (flutter/plugins#6804) * 51434ec83 [google_maps_flutter] Roll cupertino_icons for compatibility with Dart 3 (flutter/plugins#6807)
…#116728) * 93a63b36e [google_maps_flutter] Add support to request map renderer for Android (flutter/plugins#6619) * ca3d56973 Roll Flutter from e2fb672 to a570fd2 (15 revisions) (flutter/plugins#6804) * 51434ec83 [google_maps_flutter] Roll cupertino_icons for compatibility with Dart 3 (flutter/plugins#6807)
…flutter#6619) * [google_maps_flutter] support to request a specific map renderer for android * [google_maps_flutter] Minor fixes to comments and error messages * [google_maps_flutter] fix linting issues
This adds support to prefer map renderer for Android.
Added API method
initializeWithRenderer
forGoogleMapsFlutterAndroid
instance to initialize Google Maps SDK with preferred renderer.Renderer can be initialized only once per Application context and cannot be changed after it is initialized.
New map renderer documentation
Resolves flutter/flutter#114004
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.