问题
On my desktop using Django-1.9 admin, on Firefox, the django-leaflet MultipolygonField widget works as expected.
However, on a Samsung tablet using either Chrome or Firefox or the native browser, although I can select the tool to start drawing the polygon, by touching it, it is impossible to place any point on the map.
It seems like the widget does not respond to any touch/hit/punch event.
Is anybody else experiencing something like that? I have posted a relevant question in django-leaflet and I am still waiting for a hint.
回答1:
Leaflet-draw 0.2.4, which is used to enable drawing in django-leaflet, doesn't support touch yet.
Leaflet-draw 0.3.0 adds touch support, and a pull request exists to update it in django-leaflet. Not much activity there though.
You should be able to override the file by downloading the new version of leaflet-draw and add that to a directory static/leaflet/draw/ in your Django app.
来源:https://stackoverflow.com/questions/37896208/leaflet-multipolygonfield-widget-not-receiving-touch-events