diff options
author | Abyss777 <abyss@fox5.ru> | 2017-06-20 11:08:16 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-06-20 11:08:16 +0500 |
commit | 8429665c4ba061897e5e225792a2ab7350583c40 (patch) | |
tree | b88916492f09fa1d7c0b0625eb4def259faf5cc1 /web/app/view/map | |
parent | 5a6044faac45b377efabe363655ec21790bd955b (diff) | |
download | etbsa-traccar-web-8429665c4ba061897e5e225792a2ab7350583c40.tar.gz etbsa-traccar-web-8429665c4ba061897e5e225792a2ab7350583c40.tar.bz2 etbsa-traccar-web-8429665c4ba061897e5e225792a2ab7350583c40.zip |
Implement zoom map on select
Diffstat (limited to 'web/app/view/map')
-rw-r--r-- | web/app/view/map/MapMarkerController.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web/app/view/map/MapMarkerController.js b/web/app/view/map/MapMarkerController.js index 44067dc..a9732dd 100644 --- a/web/app/view/map/MapMarkerController.js +++ b/web/app/view/map/MapMarkerController.js @@ -74,6 +74,7 @@ Ext.define('Traccar.view.map.MapMarkerController', { this.accuracyCircles = {}; this.liveRoutes = {}; this.liveRouteLength = Traccar.app.getAttributePreference('web.liveRouteLength', 10); + this.selectZoom = Traccar.app.getAttributePreference('web.selectZoom', 0); }, getAreaStyle: function (label, color) { @@ -454,6 +455,9 @@ Ext.define('Traccar.view.map.MapMarkerController', { marker.changed(); if (center) { this.getView().getMapView().setCenter(marker.getGeometry().getCoordinates()); + if (this.selectZoom !== 0 && this.selectZoom > this.getView().getMapView().getZoom()) { + this.getView().getMapView().setZoom(this.selectZoom); + } } } |