Leaflet MultipolygonField widget, not receiving touch events

霸气de小男生 提交于 2020-01-05 05:37:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!