Add click event as responsive alternative to singleclick

The singleclick event makes the application feel slow because
of the 250 ms delay that is used to rule out a dblclick.
This commit is contained in:
ahocevar
2014-03-24 20:03:26 +01:00
parent f4af416aa8
commit 7bfa15c0fd
16 changed files with 32 additions and 21 deletions

View File

@@ -64,7 +64,7 @@ var popup = new ol.Overlay({
map.addOverlay(popup);
// display popup on click
map.on('singleclick', function(evt) {
map.on('click', function(evt) {
var feature = map.forEachFeatureAtPixel(evt.pixel,
function(feature, layer) {
return feature;