diff options
Diffstat (limited to 'web/app/view/Map.js')
-rw-r--r-- | web/app/view/Map.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/app/view/Map.js b/web/app/view/Map.js index 2c73f4cc5..b6c8cf815 100644 --- a/web/app/view/Map.js +++ b/web/app/view/Map.js @@ -95,6 +95,12 @@ Ext.define('Traccar.view.Map', { layers: [layer, vectorLayer], view: this.mapView }); + + this.map.on("click", function(e) { + this.map.forEachFeatureAtPixel(e.pixel, function (feature, layer) { + this.fireEvent('selectFeature', feature); + }, this); + }, this); }, resize: function () { |