From 8429665c4ba061897e5e225792a2ab7350583c40 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 20 Jun 2017 11:08:16 +0500 Subject: Implement zoom map on select --- web/app/view/map/MapMarkerController.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'web/app/view/map/MapMarkerController.js') 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); + } } } -- cgit v1.2.3