getFeatureInfo examples: listen to click events

This make the examples works on touch devices.
This commit is contained in:
Frederic Junod committed 2013-05-22 12:30:31 +02:00
1 parent 783e6d33d5
commit db34b37716
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ var map = new ol.Map({
var kml = new ol.parser.KML({
maxDepth: 1, dimension: 2, extractStyles: true, extractAttributes: true});
map.on('mousemove', function(evt) {
map.on(['click', 'mousemove'], function(evt) {
map.getFeatureInfo({
pixel: evt.getPixel(),
layers: [vector],
+1 -1
View File
@@ -41,7 +41,7 @@ var map = new ol.Map({
})
});
map.on('mousemove', function(evt) {
map.on(['click', 'mousemove'], function(evt) {
map.getFeatureInfo({
pixel: evt.getPixel(),
layers: [vector],