L.Pather icon indicating copy to clipboard operation
L.Pather copied to clipboard

Mobile (tablet) support?

Open stretchkerr opened this issue 10 years ago • 4 comments

Awesome work on this plugin, but it doesn't seem to work on my tablet (Galaxy Tab S 10.1, Android 5.0.2, Chrome 46.0.2490.76).

I can select any of the four mode buttons, and selecting 'Create' disables map panning, so it seems the plugin in capturing the touch/click event, but it doesn't draw a path on the map.

I see in Issue #1 you were working on mobile support - was mobile support abandoned because of this?

Thanks again.

stretchkerr avatar Oct 28 '15 03:10 stretchkerr

This problem is in the android 5.0 version onwords. As it is working fine with the 4.4 kitkat version.

Any solution for this will be very helpfull

parunandu05 avatar Dec 16 '15 12:12 parunandu05

It doesn't work on Android 5 devices. Is there an update on this issue please?

Thank you in advance on this update.

lolo0209 avatar Feb 11 '16 16:02 lolo0209

Any update on the Android version please ?

lolo0209 avatar Mar 09 '16 13:03 lolo0209

Hey, just a quick note to say how you can easily implement support for multitouch gestures. Add the following method to leaflet-src.js:

isMultitouch: function isMultitouch() {
    if (event.touches.length > 1) {
        return true
    }
},

Then insert an if condition into the mouse event handler functions (all of them), so they only get executed if a single finger touch is detected.

mouseDown: function mouseDown(event) {
    if (this.isMultitouch() !== true) {
        // actual function
    }

Then add the GestureHandling plugin to your project. You can now drag the map and zoom with two fingers without removing Pather completely. One finger touchmove will still yield polylines. Not the most elegant solution but hope it helps someone!

felluksch avatar Jul 31 '19 11:07 felluksch