getFeatureInfo examples: listen to click events

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

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],