map.on('click') event disables the double click zoom

المشرف العام

Administrator
طاقم الإدارة
I have a map that has an onclick event fired and displays a marker where the user has clicked. Problem is that this event seems to overrun the double click event. Because of this, when I double click the map, the map puts a marker and doesn't zoom. Anyone has an idea how I can solve this? Thanx!

code: openmap = L.mapbox.map('map', 'julievelghe.nmjoj53p',{doubleClickZoom: true}).setView([49.152969, 6.473007], 5);

//on map click, create a markeropenmap.on('click',function(event){ var coordinates = event.latlng; placeMarker(coordinates); alert("Single click");});

أكثر...
 
أعلى