aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/app/view/map/BaseMap.js11
-rw-r--r--web/load.js2
2 files changed, 7 insertions, 6 deletions
diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js
index 5829cac..91f3784 100644
--- a/web/app/view/map/BaseMap.js
+++ b/web/app/view/map/BaseMap.js
@@ -182,14 +182,15 @@ Ext.define('Traccar.view.map.BaseMap', {
});
this.map.on('click', function (e) {
- if (this.map.hasFeatureAtPixel(e.pixel, {
+ var i, features = this.map.getFeaturesAtPixel(e.pixel, {
layerFilter: function (layer) {
return !layer.get('name');
}
- })) {
- this.map.forEachFeatureAtPixel(e.pixel, function (feature) {
- this.fireEvent('selectfeature', feature);
- }.bind(this));
+ });
+ if (features) {
+ for (i = 0; i < features.length; i++) {
+ this.fireEvent('selectfeature', features[i]);
+ }
} else {
this.fireEvent('deselectfeature');
}
diff --git a/web/load.js b/web/load.js
index 1845cd1..8577280 100644
--- a/web/load.js
+++ b/web/load.js
@@ -136,7 +136,7 @@
extjsVersion = '6.2.0';
fontAwesomeVersion = '4.7.0';
- olVersion = '4.2.0';
+ olVersion = '4.3.1';
proj4jsVersion = '2.4.3';
if (debugMode) {