aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/map/BaseMap.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-02 12:55:29 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-02 12:55:29 -0800
commitfe47299d6cc02a4e43a1d2f3a788897be8a6f5ce (patch)
tree90cd987766fb51f104b2ad52e45acb67998a5c7a /web/app/view/map/BaseMap.js
parente029756644581346a42f162a6505dda717a8c572 (diff)
downloadtrackermap-web-fe47299d6cc02a4e43a1d2f3a788897be8a6f5ce.tar.gz
trackermap-web-fe47299d6cc02a4e43a1d2f3a788897be8a6f5ce.tar.bz2
trackermap-web-fe47299d6cc02a4e43a1d2f3a788897be8a6f5ce.zip
Fix openlayers upgrade issues (fix #724)
Diffstat (limited to 'web/app/view/map/BaseMap.js')
-rw-r--r--web/app/view/map/BaseMap.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js
index f973fb86..4f0c8d48 100644
--- a/web/app/view/map/BaseMap.js
+++ b/web/app/view/map/BaseMap.js
@@ -30,7 +30,7 @@ Ext.define('Traccar.view.map.BaseMap', {
},
initMap: function () {
- var server, layer, type, bingKey, lat, lon, zoom, maxZoom, target, poiLayer;
+ var server, layer, type, bingKey, lat, lon, zoom, maxZoom, target, poiLayer, self = this;
server = Traccar.app.getServer();
@@ -207,19 +207,19 @@ Ext.define('Traccar.view.map.BaseMap', {
});
this.map.on('click', function (e) {
- var i, features = this.map.getFeaturesAtPixel(e.pixel, {
+ var i, features = self.map.getFeaturesAtPixel(e.pixel, {
layerFilter: function (layer) {
return !layer.get('name');
}
});
if (features) {
for (i = 0; i < features.length; i++) {
- this.fireEvent('selectfeature', features[i]);
+ self.fireEvent('selectfeature', features[i]);
}
} else {
- this.fireEvent('deselectfeature');
+ self.fireEvent('deselectfeature');
}
- }, this);
+ });
},
listeners: {