aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/BaseMap.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-12-29 16:31:11 +0500
committerAbyss777 <abyss@fox5.ru>2016-12-29 16:31:11 +0500
commitd9be85d9928a9c511335a3a2eb231dcfd1fb1d5a (patch)
tree990756691ce721cc865918b983c20a96ce4c5561 /web/app/view/BaseMap.js
parent3362bc6315a7711b40649ee3a07fbfc8b0ff4ef8 (diff)
downloadtrackermap-web-d9be85d9928a9c511335a3a2eb231dcfd1fb1d5a.tar.gz
trackermap-web-d9be85d9928a9c511335a3a2eb231dcfd1fb1d5a.tar.bz2
trackermap-web-d9be85d9928a9c511335a3a2eb231dcfd1fb1d5a.zip
Deselect markers
Diffstat (limited to 'web/app/view/BaseMap.js')
-rw-r--r--web/app/view/BaseMap.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/web/app/view/BaseMap.js b/web/app/view/BaseMap.js
index f0d51d52..d7309e76 100644
--- a/web/app/view/BaseMap.js
+++ b/web/app/view/BaseMap.js
@@ -120,9 +120,16 @@ Ext.define('Traccar.view.BaseMap', {
});
this.map.on('click', function (e) {
- this.map.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
- this.fireEvent('selectfeature', feature);
- }.bind(this));
+ if (this.map.hasFeatureAtPixel(e.pixel, {
+ layerFilter: function (layer) {
+ return layer.get('name') !== 'geofencesLayer';
+ }})) {
+ this.map.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
+ this.fireEvent('selectfeature', feature);
+ }.bind(this));
+ } else {
+ this.fireEvent('deselectfeature');
+ }
}, this);
},