Route GuidesRoutes City GuidesCities Map Log in

Touchscreen bugs?

3 Nov 2021
Find a better bike route. Try our map & route-planner »

Become a supporter

I find that when using the site on a mobile device (android, iPad) it often seems to interpret a released touch as still being active, such that attempting to drag an existing point, for example, evokes a “pinch zoom” gesture instead. Not sure if this is a known problem.



Wed 3 Nov 2021, 09:18

Somewhat orthogonal, but if the route-in-progress was kept - perhaps in localStorage - then it could potentially be fairly unobtrusive to refresh the page in case of incidents like this. That would also help with another situation I’ve encountered when following an unsaved route where mobile browsers free memory from open tabs and reload the page when showing it again.

Wed 3 Nov 2021, 10:25

Leaflet (the mapping library that uses) isn’t great at handling touch-screen gestures, I’m afraid. I’d be interested to know, on the iPad especially, if there are any particular circumstances where the pinch zoom happens – it’s not something I’ve encountered. Hopefully that might be fixable. 

But ultimately I think the solution here is a native app which isn’t encumbered by Leaflet or browser restrictions, and can do things like offline mapping and turn-by-turn directions too. I’m working on an iOS app at the moment and will be looking at Android after that.

Wed 3 Nov 2021, 16:52

In the mean time I appreciate very mch the mobile version. It is very helpful, even though there might be many things a native app could improve upon.

Wed 10 Nov 2021, 12:04

Thanks for the quick response - only just noticed it. I do indeed appreciate the mobile version - I've yet to find a mapping / routing app I don't have significant problems with of some sort and greatly appreciate the excellent work you're doing.

I remember seeing that you were working on an iOS-first app and wish you luck with that & subsequent work on Android.

I just briefly tried using it on my iPad to see if I could provide a more useful set of steps to reproduce, and seem to be seeing somewhat different behaviour today - after a few interactions, there was no response to any interaction with the map at all (although the buttons to select map layer etc were still working).

The main thing that seems to generally cause the zoom problem is attempting to drag markers, but while I was testing this just now, I seem to experience inconsistent behaviour: a few minutes ago, it seemed that pretty much as soon as I dragged a marker, it wouldn't register the touch-up event and would be stuck in the zooming state when I tried to interact again. I then tried a sequence of alternating between tapping to add points, zooming and panning (but not dragging any points), which was working fine. Then it was even working for quite a large number of point-drag interactions, but at some point, a point-drag caused it to get into the "stuck-zooming" state.

Right now, after another refresh, I've deliberately tried adding another touch while dragging a point to pan/zoom the map while already dragging a point, and it seems to be managing to cope with that ok - the logic (probably from Leaflet) seems to be to stop dragging the point once the other gesture is invoked, which seems reasonable.

I did a few tests in a row where I would set a start & end, then "add via point" somewhere along the route, and try to reposition it. On a couple of occassions, it caused the zoom bug. Once, it caused the bug where it stopped responding to any input. Now, I have had several tries in a row where it has been fine.

If I get around to it, I'll look into testing the above with another Leaflet based site (and probably look a bit more into Leaflet itself for my own interest).