javascript - Leaflet double tap does not zoom in -


leaflet not recognize double tap (but double click zoom ok - open dev tools , choose mobile device see bug) on touch devices in app: https://express-tourism.herokuapp.com/
thought may because have map div inside global wrapper div not case. when typed 'map' in console shows doubleclickzoom enabled
have manually add double tap feature or missing something?

update: @baptiste right - had add custom double tap function:

var tapped=false   $("#map").on("touchstart",function(e){     if(!tapped){ //if tap not set, set single tap       tapped=settimeout(function(){           tapped=null           //insert things want when single tapped       },300);   //wait 300ms run single click code     } else {    //tapped within 300ms of last tap. double tap       cleartimeout(tapped); //stop single tap callback       tapped=null       //insert things want when double tapped       map.zoomin(1)     } }); 

leaflet doesn't zoom double tap on mobile, need 2 fingers. can @ settings http://leafletjs.com/reference-1.2.0.html#map-tap , add them map.


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -