aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/app/store/ServerAttributes.js7
-rw-r--r--web/app/store/UserAttributes.js7
-rw-r--r--web/app/view/map/MapMarkerController.js4
-rw-r--r--web/l10n/en.json1
4 files changed, 19 insertions, 0 deletions
diff --git a/web/app/store/ServerAttributes.js b/web/app/store/ServerAttributes.js
index 64bac24..05002f1 100644
--- a/web/app/store/ServerAttributes.js
+++ b/web/app/store/ServerAttributes.js
@@ -40,5 +40,12 @@ Ext.define('Traccar.store.ServerAttributes', {
name: Strings.attributeWebLiveRouteLength,
valueType: 'number',
allowDecimals: false
+ }, {
+ key: 'web.selectZoom',
+ name: Strings.attributeWebSelectZoom,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: Traccar.Style.mapDefaultZoom,
+ maxValue: Traccar.Style.mapMaxZoom
}]
});
diff --git a/web/app/store/UserAttributes.js b/web/app/store/UserAttributes.js
index da05d5c..91a54d0 100644
--- a/web/app/store/UserAttributes.js
+++ b/web/app/store/UserAttributes.js
@@ -72,5 +72,12 @@ Ext.define('Traccar.store.UserAttributes', {
name: Strings.attributeWebLiveRouteLength,
valueType: 'number',
allowDecimals: false
+ }, {
+ key: 'web.selectZoom',
+ name: Strings.attributeWebSelectZoom,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: Traccar.Style.mapDefaultZoom,
+ maxValue: Traccar.Style.mapMaxZoom
}]
});
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);
+ }
}
}
diff --git a/web/l10n/en.json b/web/l10n/en.json
index f8ac447..1c10c13 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -74,6 +74,7 @@
"attributeProcessingCopyAttributes": "Processing: Copy Attributes",
"attributeColor": "Color",
"attributeWebLiveRouteLength": "Web: Live Route Length",
+ "attributeWebSelectZoom": "Web: Zoom On Select",
"attributeMailSmtpHost": "Mail: SMTP Host",
"attributeMailSmtpPort": "Mail: SMTP Port",
"attributeMailSmtpStarttlsEnable": "Mail: SMTP STARTTLS Enable",