aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/map/BaseMap.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-08-18 21:09:59 +1200
committerGitHub <noreply@github.com>2017-08-18 21:09:59 +1200
commitcbc90c04da15fe0d57910e6180205351a894166b (patch)
tree51b79ad695e27003119ad95ed354f66a55692277 /web/app/view/map/BaseMap.js
parentb3d3c720f34e12e7af83e6be3bd87e304931bbe1 (diff)
parenta2f24e445ef4c4c06a754b4538d51aec38e1dcbf (diff)
downloadtrackermap-web-cbc90c04da15fe0d57910e6180205351a894166b.tar.gz
trackermap-web-cbc90c04da15fe0d57910e6180205351a894166b.tar.bz2
trackermap-web-cbc90c04da15fe0d57910e6180205351a894166b.zip
Merge pull request #557 from Abyss777/ol_431
Update openlayers to 4.3.1
Diffstat (limited to 'web/app/view/map/BaseMap.js')
-rw-r--r--web/app/view/map/BaseMap.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js
index 5829cac9..91f37841 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');
}