aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/Map.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-08 13:47:26 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-08 13:47:26 +1300
commitcdd83e0d13961c3465c7faf554ea8c709bd761b3 (patch)
tree8188ec2385a38a8939298aed526f87054be8c26a /web/app/view/Map.js
parentea38e23c5c19f953d5db5107a56d697d31deef95 (diff)
downloadtrackermap-server-cdd83e0d13961c3465c7faf554ea8c709bd761b3.tar.gz
trackermap-server-cdd83e0d13961c3465c7faf554ea8c709bd761b3.tar.bz2
trackermap-server-cdd83e0d13961c3465c7faf554ea8c709bd761b3.zip
Add map feature selection event
Diffstat (limited to 'web/app/view/Map.js')
-rw-r--r--web/app/view/Map.js6
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 () {