Maps4HTML / HTML-Map-Element-UseCases-Requirements

Use cases and requirements for Maps on the Web
https://maps4html.org/HTML-Map-Element-UseCases-Requirements/
Other
22 stars 12 forks source link

Use case (author / website visitor): Require interaction before allowing pan/zoom #180

Open Malvoz opened 4 years ago

Malvoz commented 4 years ago

This issue is for discussion of the use case “Require interaction before allowing pan/zoom”, its examples & list of required capabilities.


When a user hovers their mouse pointer (even if just briefly) over a map, before wanting to continue scrolling the web page (or panning the screen, on touch devices) map viewers are often panned/zoomed instead, sort of trapping the user from scrolling.

Maybe there should be a way for authors, or perhaps the end-user even, to dictate whether panning/zooming should be allowed before interacting with it, such as tapping/clicking the map.

Of all the reviewed reference tools, Google Maps is the only one to require interaction (see Google Maps' "Cooperative Gesture Handling") before enabling pan/zoom - requiring using 2 fingers to interact with the map on touch devices, or holding ctrl + mouse pointer interaction on desktop (Windows).

(Similar issues could arise from <iframe> already, or any overflowing element, maybe this should be a WHATWG HTML issue instead.)

prushforth commented 4 years ago

When a user hovers their mouse pointer (even if just briefly) over a map, before wanting to continue scrolling the web page (or panning the screen, on touch devices) map viewers are often panned/zoomed instead, sort of trapping the user from scrolling.

This is about the most annoying feature of in-page web maps that I can think of.

Maybe this relates to "static maps" (somehow, just thinking out loud), in that the layers of the map could be designated static, and an event handler could release them. The handler could be on a (visual) control or affordance.

Of all the reviewed reference tools, Google Maps is the only one to require interaction before enabling pan/zoom - requiring using 2 fingers to interact with the map on touch devices, or holding ctrl + mouse pointer interaction on desktop (Windows).

I've read criticism of that, but I don't know why.

Malvoz commented 4 years ago

@prushforth

It may feel unintuitive, and especially awkward using 2 fingers while only holding the device in one hand. But I think it's still better than not requiring interaction first, for the reasons mentioned.

Malvoz commented 4 years ago

Of all the reviewed reference tools, Google Maps is the only one to require interaction

Actually, MapKit does require holding ctrl on Windows desktop to zoom using the mouse wheel, however no interaction is required on Android.

shepazu commented 3 years ago

“3.1.12 Require interaction before allowing pan/zoom (or opt-out of such potentially default behavior)” needs to be reformulated as a use case. it’s currently described in terms of a requirement.

As described, it doesn’t have any capabilities listed (perhaps since it is itself a capability).

zcorpan commented 2 years ago

This section's description doesn't seem to match with the behavior of a Google Maps embed. It's not that there is a requirement of interaction before allowing zooming. It's that there is a modifier (hold ctrl while scrolling, or use two fingers) to zoom, so as to not clash with page scrolling.

The current wording suggests that after you have interacted, you can zoom without the modifier. But that is not the case.

Malvoz commented 2 years ago

@shepazu

it’s currently described in terms of a requirement

The use case is the requirement of an interaction/modifier to allow further interactions with the map. Maybe I'm misunderstanding your comment?

@zcorpan

This section's description doesn't seem to match with the behavior of a Google Maps embed.

I think I didn't want to assume a standardized map viewer would behave exactly like Google Maps. Perhaps the heuristics would be smarter, the Google Maps modifier is sometimes challenging to get past, especially so using TalkBack. I'm happy to change the title, if only by replacing the word "interaction" with "modifier"?

zcorpan commented 2 years ago

@Malvoz sure, I didn't mean the standard should match Google Maps, only that Google Maps seems to solve the same problem but without keying off of "interaction", and that also seems like a valid approach.