JamesLMilner / terra-draw

A library for drawing on maps that supports Mapbox, MapLibre, Google Maps, OpenLayers and Leaflet out the box
https://terradraw.io
MIT License
446 stars 50 forks source link

[Documentation] Document which modes work on touch devices #107

Closed JamesLMilner closed 1 month ago

JamesLMilner commented 10 months ago

At the moment it is not clear that certain modes do not work on mobile/touch devices - we should look to document this. I would have to double check which modes do not work out the box, but at least Circle mode is not supported (see #106). I would assume rectangle mode suffers the same fate.

dob9601 commented 8 months ago

Expanding on this, drawing lines/points/polygons doesn't seem to work in Chrome on touch devices - but do in Firefox

JamesLMilner commented 8 months ago

Hey @dob9601 thanks for sharing your experience. Could you potentially share more information about this as it doesn't sound intended! I am able to draw points lines and polygons on terradraw.io on Chrome on Android.

Can you share your exact device, OS and browser version so I can investigate? Also which adapter are you using Terra Draw with?

dob9601 commented 8 months ago

Hey, A friend and I came across the behaviour when looking at the demo hosted on the terradraw docs (https://terradraw.io/). On both devices, the behaviour was identical with it working on Firefox (Android) but not Chrome (also Android).

I'm running Chrome 120.0.6099.144 on Android 14 (Pixel 7). Just checked and my friend was also running the same version of chrome.

dob9601 commented 8 months ago

https://github.com/JamesLMilner/terra-draw/assets/24723950/8a54e63e-7dea-4e7f-ad73-69c57dbec99f

I've recorded a quick demo just in case I'm missing something

JamesLMilner commented 8 months ago

@dob9601 this is strange! Thank you for the info and the video, very helpful. I am also running Chrome 120 on Android and not seeing this issue weirdly. Let me do some more digging and get back to you. If you have any additional information you may help to debug please feel free to share in the meantime :)

dob9601 commented 8 months ago

@dob9601 this is strange! Thank you for the info and the video, very helpful. I am also running Chrome 120 on Android and not seeing this issue weirdly. Let me do some more digging and get back to you. If you have any additional information you may help to debug please feel free to share in the meantime :)

Not a problem! Feel free to reach out if you need any specific debug information

JamesLMilner commented 8 months ago

@dob9601 going to move this out a separate dedicated issue :) #153

JamesLMilner commented 8 months ago

I've looked into this and it appears that Great Circle and Freehand are not supported on mobile. Also Rectangle and Circle mode, although working, do not have as nice a UX as when using a mouse. I think supporting Great Circle shouldn't be too complicated, however freehand may require more thought. We could also potentially think about how we improve the UX for Rectangle and Circle mode going forward.

nickbearman commented 1 month ago

Currently on Android 13, only Select, Point, Line and Polygon are visible / working. Rectangle, Freehand and Circle are not available / working, based on using terradraw.io. I will add some notes to the Guides to this effect.