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:
+1
-1
@@ -60,7 +60,7 @@ var map = new ol.Map({
|
||||
/**
|
||||
* Add a click handler to the map to render the popup.
|
||||
*/
|
||||
map.on('singleclick', function(evt) {
|
||||
map.on('click', function(evt) {
|
||||
var coordinate = evt.coordinate;
|
||||
var hdms = ol.coordinate.toStringHDMS(ol.proj.transform(
|
||||
coordinate, 'EPSG:3857', 'EPSG:4326'));
|
||||
|
||||
Reference in New Issue
Block a user