-
Notifications
You must be signed in to change notification settings - Fork 16
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
Consider adding "Gesture Handling" #129
Comments
What might the MapML API for this be? Would it be accessible via attributes, properties or both, or some other means ? |
I'm not sure... anyhow it may be that the GestureHandling plugin is inadequate though, because unlike Google Maps' "cooperative gesture handling", it doesn't allow single finger dragging to pan after the fact that you've used 2 fingers to initialize panning, which makes it kinda awkward because it's impossible to pan the map display without also making it zoom at the same time. |
I worry about adding innovative things like the Google cooperative gesture handling without their being directly involved, for the reason that stuff like that may be patented, and it's hard to tell. Anyway we can keep it here and maybe Google will show up and help us with the implementation. FWIW it looks like it the markup "interface" might be as simple as a boolean attroproperty. |
I was only making a comparison between the 2 implementations; one implementation improves the user experience, and the other one tries to, but makes it worse in some sense (i.e. the suggested plugin is inadequate). There's a more subtle approach which isn't as robust but helps in avoiding users getting trapped in the map when "drive-by" scrolling: https://github.com/CliffCloud/Leaflet.Sleep. I've found that I usually don't get trapped when quickly scrolling over a map with a mouse pointer on desktop, perhaps due to browser heuristics, however on a mobile device it seems that I get scroll captured in the default Leaflet implementation, but not in the Leaflet.Sleep demo. Anyhow, I'm starting to doubt that there should be standardization around "require interaction before allowing pan/zoom", as stated in the UCR issue: this is a problem with iframes too (or any overflowing element that takes up enough space in the viewport). Perhaps developers should just take responsibility and make sure they don't trap their users, unless of course, it is the intention that the map should take up all of the viewport. |
Use case:
https://maps4html.org/HTML-Map-Element-UseCases-Requirements/#use-case-require-interaction
Real-world issue in regards to Leaflet maps, described here:
https://gis.stackexchange.com/questions/200189/cant-continue-scrolling-on-mobile-devices-when-a-map-occupy-all-the-screen
Leaflet plugin:
https://github.com/elmarquis/Leaflet.GestureHandling (see demo).
The text was updated successfully, but these errors were encountered: