packages icon indicating copy to clipboard operation
packages copied to clipboard

[google_maps_flutter_web] Options to disable tilt controls and configure gesture handling

Open Rexios80 opened this issue 1 year ago • 3 comments

Transferred from https://github.com/flutter/plugins/pull/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

  • [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [x] I read the Tree Hygiene wiki page, which explains my responsibilities.
  • [x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • [x] I signed the CLA.
  • [x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • [x] I listed at least one issue that this PR fixes in the description above.
  • [x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • [x] I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • [x] I updated/added relevant documentation (doc comments with ///).
  • [x] I added new tests to check the change I am making, or this PR is test-exempt.
  • [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Rexios80 avatar Feb 22 '23 15:02 Rexios80

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 avatar Mar 02 '23 19:03 reidbaker

@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.

Rexios80 avatar Mar 03 '23 19:03 Rexios80

I think these checks are as good as they're getting as long as we have dependency overrides

Rexios80 avatar Mar 07 '23 23:03 Rexios80

Update from triage: This is just waiting for @ditman to have cycles to review it.

stuartmorgan avatar Apr 04 '23 19:04 stuartmorgan

Update from triage: This is still waiting for @ditman to have bandwidth to review maps PRs.

stuartmorgan avatar May 16 '23 20:05 stuartmorgan

@ditman It looks like this is ready for another look.

stuartmorgan avatar Jul 13 '23 19:07 stuartmorgan

Let's release the platform_interface changes, right? @stuartmorgan My other comments can be applied when the web package is ready for review!

ditman avatar Jul 14 '23 03:07 ditman

Let's release the platform_interface changes, right? @stuartmorgan My other comments can be applied when the web package is ready for review!

If you feel good about the state of the overall PR modulo small tweaks, then yes. @Rexios80 It sounds like we're ready for a sub-PR for the platform interface part!

stuartmorgan avatar Jul 15 '23 11:07 stuartmorgan

@ditman @stuartmorgan #4478

Rexios80 avatar Jul 15 '23 12:07 Rexios80

The actions that are failing are pulling an old version of the platform interface. Is there something I'm supposed to do to fix that?

Rexios80 avatar Jul 18 '23 17:07 Rexios80

The actions that are failing are pulling an old version of the platform interface. Is there something I'm supposed to do to fix that?

See the analyze_downgraded section of https://github.com/flutter/flutter/wiki/Understanding-Packages-tests#specific-tests

stuartmorgan avatar Jul 18 '23 19:07 stuartmorgan

@ditman @stuartmorgan #4521

Rexios80 avatar Jul 19 '23 15:07 Rexios80

@ditman @stuartmorgan Can we merge this now?

Rexios80 avatar Jul 24 '23 14:07 Rexios80

I hope that in the future we won't need any more special web-only config parameters (or that they'll map better to their mobile counterparts if only because of the rendering engines are more similar!)

Here's some more web-only parameters incoming: https://github.com/flutter/packages/pull/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 MapConfiguration.

/cc @stuartmorgan

ditman avatar Jul 24 '23 18:07 ditman

(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)

ditman avatar Jul 24 '23 19:07 ditman