Vector examples display feature info on click again
This commit is contained in:
@@ -82,9 +82,7 @@ info.tooltip({
|
||||
trigger: 'manual'
|
||||
});
|
||||
|
||||
// FIXME support touch devices
|
||||
$(map.getViewport()).on('mousemove', function(evt) {
|
||||
var pixel = map.getEventPixel(evt.originalEvent);
|
||||
var displayFeatureInfo = function(pixel) {
|
||||
info.css({
|
||||
left: pixel[0] + 'px',
|
||||
top: (pixel[1] - 15) + 'px'
|
||||
@@ -104,4 +102,14 @@ $(map.getViewport()).on('mousemove', function(evt) {
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$(map.getViewport()).on('mousemove', function(evt) {
|
||||
var pixel = map.getEventPixel(evt.originalEvent);
|
||||
displayFeatureInfo(pixel);
|
||||
});
|
||||
|
||||
map.on('click', function(evt) {
|
||||
var pixel = evt.getPixel();
|
||||
displayFeatureInfo(pixel);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user