Wildhoney / Leaflet.FreeDraw

:earth_asia: FreeDraw allows the free-hand drawing of shapes on your Leaflet.js map layer – providing an intuitive and familiar UX for creating geospatial boundaries similar to Zoopla and others. Included out-of-the-box is the concaving of polygons, polygon merging and simplifying, as well as the ability to add edges and modify existing shapes.
https://freedraw.herokuapp.com/
MIT License
542 stars 103 forks source link

Add mobile support #3

Open Wildhoney opened 10 years ago

pztrick commented 10 years ago

I hope to find the time to look into mobile tomorrow. Have you identified any obstacles in particular? edit: Or is this something you have strong feelings about implementation?

Wildhoney commented 10 years ago

That would be great! Thanks.

I don't have any feelings about the implementation, but I've added Hammer.js as that's what I'm familiar with. Happy for you to choose another framework though – or to go it alone!

Wildhoney commented 9 years ago

@pztrick Did you have any luck in supporting mobile?

pztrick commented 9 years ago

@Wildhoney No, I never made the time, unfortunately.

nmccready commented 9 years ago

Anyway some peeps can work together? https://github.com/Leaflet/Leaflet.draw/pull/285

pztrick commented 9 years ago

@nmccready: As someone that uses the Leaflet.draw fork that added mobile support, I definitely think it would be cool for these two projects to figure out mobile together. It's been over a year since I implemented touch in my last project and I'm much too time-poor to be the one that dives in unfortunately. :(

So... here is my :+1:.

nmccready commented 9 years ago

Yeah I know how that goes. Well by looking at the above ticket.. I need to pound out a 1.X leaflet branch on angular-leaflet-directive

Yago commented 7 years ago

@Wildhoney you are my hero 😍 !!!

Last week, I did a lot of research and tests about map free draw on touch devices and I was so sad to not find a good solution. Even yours, the far better Leaflet (that I love) module doesn't... I come back today and see the v2 release which support touch devices pretty damn well :scream: Perfect timing !

Our client don't want to negotiate that feature, you totally save my life. Thank you so much for your work !

Wildhoney commented 7 years ago

Hahaha... That's good! You're more than welcome 👍

I think it still needs some work for mobiles, but at least it's better than how it was.

srtonz commented 7 years ago

After reading through this issue and particularly @Yago's comment:

I come back today and see the v2 release which support touch devices pretty damn well

I'm not sure if touch is supposed to work or not? So far I'm not having any luck when trying to use this on mobile, but might have missed a setting somewhere?

JackGod001 commented 7 years ago

Hello friends, recently do a similar function, but I want to use other maps, I am a beginner, hoping to get guidance. Mainly want to know the painting and get the painting after the corner of the problem, hope to get your Thanks for the help

Wildhoney commented 7 years ago

@BaiShaojie123123 I'm not sure what you're asking. Please clarify?

dgautsch commented 6 years ago

Is mobile still unsupported? I can't seem to get it to work.

ineeve commented 5 years ago

It does not seem to work on mobile yet ...

lukszi commented 5 years ago

As a workaround I tried to use https://stackoverflow.com/questions/1517924/javascript-mapping-touch-events-to-mouse-events, but this solution has some problems

limiting the above solution to only the viewport didn't do any good to unlock the buttons either.

alessiogaronzi commented 4 years ago

@lukszi Hi your workaround work for mobile in Chrome?

yellerkaleb commented 4 years ago

Does anyone have a solution or alternative to this issue?

yellerkaleb commented 4 years ago

this works, from lukszi above (however you may have to manually type in the link):

https://stackoverflow.com/questions/1517924/javascript-mapping-touch-events-to-mouse-events

FluorescentHallucinogen commented 4 years ago

Looking forward for touch support.

Just found https://github.com/bozdoz/leaflet-freehandshapes (https://bozdoz.github.io/leaflet-freehandshapes/), works on Android like a charm!