-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[google_maps_flutter_web] Options to disable tilt controls and configure gesture handling #3258
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_web] Options to disable tilt controls and configure gesture handling #3258
Conversation
Thank you for your contribution. It looks like the tests are failing. Before we review the PR, please see what you can do to resolve the test failures. If you are unsure how to proceed, please reach out for help on the #hackers-new channel. |
@reidbaker The actions seem to only be failing due to the required dependency overrides since this PR requires changes to the platform interface. Until we are ready to split out the platform interface changes into their own PR and get that merged, the actions will continue to fail on this PR. |
packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml
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.
Minor comments, but generally this looks good to be at an API level. I'll defer to @ditman on whether we have any better options in terms of how to expose this, but it seemed from the discussion in the previous iteration like we probably can't abstract it.
packages/google_maps_flutter/google_maps_flutter/example/android/app/build.gradle
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/example/android/build.gradle
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart
Show resolved
Hide resolved
...gle_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart
Outdated
Show resolved
Hide resolved
I think these checks are as good as they're getting as long as we have dependency overrides |
Update from triage: This is just waiting for @ditman to have cycles to review it. |
Update from triage: This is still waiting for @ditman to have bandwidth to review maps PRs. |
@ditman @stuartmorgan Can we merge this now? |
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
This just needs a quick final stamp from @ditman to land.
Here's some more web-only parameters incoming: #4553 Before we merge the web implementation of this, let me steer 4553 to create a new "webOptions" object or similar, where we add the 3 options proposed in 4553, and add the 45deg imagery and gesture handling from here, then we'll update the web implementation to read from the new "webOptions" object, instead of directly from the /cc @stuartmorgan |
(Discussed on chat with @stuartmorgan and we decided to go with the PRs as they are, and then maybe do a more thorough refactor of per-platform settings, for example "liteMode" doesn't make sense in the web or iOS either) |
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, let's go!
…d configure gesture handling (flutter/packages#3258)
…d configure gesture handling (flutter/packages#3258)
…d configure gesture handling (flutter/packages#3258)
flutter/packages@8028caf...406eac1 2023-07-25 [email protected] Roll Flutter from d7ed5dc to 9def8f6 (21 revisions) (flutter/packages#4561) 2023-07-25 [email protected] [webview_flutter_android][webview_flutter_wkwebview] Fixes bug where `PlatformWebViewWidget` doesn't rebuild when the controller changes (flutter/packages#4533) 2023-07-24 [email protected] [ci] Enable Android emulator-based tests (flutter/packages#4494) 2023-07-24 [email protected] [google_maps_flutter_web] Options to disable tilt controls and configure gesture handling (flutter/packages#3258) 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@8028caf...406eac1 2023-07-25 [email protected] Roll Flutter from d7ed5dc to 9def8f6 (21 revisions) (flutter/packages#4561) 2023-07-25 [email protected] [webview_flutter_android][webview_flutter_wkwebview] Fixes bug where `PlatformWebViewWidget` doesn't rebuild when the controller changes (flutter/packages#4533) 2023-07-24 [email protected] [ci] Enable Android emulator-based tests (flutter/packages#4494) 2023-07-24 [email protected] [google_maps_flutter_web] Options to disable tilt controls and configure gesture handling (flutter/packages#3258) 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@8028caf...406eac1 2023-07-25 [email protected] Roll Flutter from d7ed5dc to 9def8f6 (21 revisions) (flutter/packages#4561) 2023-07-25 [email protected] [webview_flutter_android][webview_flutter_wkwebview] Fixes bug where `PlatformWebViewWidget` doesn't rebuild when the controller changes (flutter/packages#4533) 2023-07-24 [email protected] [ci] Enable Android emulator-based tests (flutter/packages#4494) 2023-07-24 [email protected] [google_maps_flutter_web] Options to disable tilt controls and configure gesture handling (flutter/packages#3258) 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Transferred from flutter/plugins#4916
tiltControlsEnabled: On web, in satellite view, and at close zoom levels, the map displays tilt controls. This lets you disable them.
gestureHandling: On web, without greedy gesture handling the map can have an overlay saying you can only move the map with two fingers or Cmd+drag. This is not ideal, and greedy gestures lets you make that not happen. I added the other gesture handling options from the Google Maps documentation for completeness.
List which issues are fixed by this PR. You must list at least one issue.
flutter/flutter/#99044
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
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.