Leaflet taphold to set markers -
I want to set a marker on a sheet map. To achieve this, I tried with little success. In this way I integrate it:
$ (map) .off ('taphold'); $ (Map) .bund ('taphold', function (e, option) {... something ...});
It works on the desktop but not on the mobile. 'Map' is an L. map object. The other problem that is associated with it is that I can not get the option. Start and Options. I need this to make a difference to keep a long pole and a marker to pan the map. Does anyone know of this solution?
There is actually a systematic implementation of the actual letter written for this:
< Code> map.on ('contextmenu', function (e) {.. do something ...});
The problem is that clicking on the right on the desktop is also triggered.
Edit: You can call it if (event.button == 2) {...}
Comments
Post a Comment