aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-30 08:51:25 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-30 08:51:25 +0500
commite314abba557cc8b87e67b6399f52b833e7de0751 (patch)
treea40e85a8b1237a881e3ac385dd3f68714108cac4 /web/app
parentff374f3fb794d75b6657421ee1653f810f2ef4b4 (diff)
downloadetbsa-traccar-web-e314abba557cc8b87e67b6399f52b833e7de0751.tar.gz
etbsa-traccar-web-e314abba557cc8b87e67b6399f52b833e7de0751.tar.bz2
etbsa-traccar-web-e314abba557cc8b87e67b6399f52b833e7de0751.zip
Add Max Zoom attribute
Diffstat (limited to 'web/app')
-rw-r--r--web/app/store/CommonUserAttributes.js7
-rw-r--r--web/app/view/map/BaseMap.js5
2 files changed, 10 insertions, 2 deletions
diff --git a/web/app/store/CommonUserAttributes.js b/web/app/store/CommonUserAttributes.js
index 85d652d..d07d955 100644
--- a/web/app/store/CommonUserAttributes.js
+++ b/web/app/store/CommonUserAttributes.js
@@ -32,6 +32,13 @@ Ext.define('Traccar.store.CommonUserAttributes', {
minValue: Traccar.Style.mapDefaultZoom,
maxValue: Traccar.Style.mapMaxZoom
}, {
+ key: 'web.maxZoom',
+ name: Strings.attributeWebMaxZoom,
+ valueType: 'number',
+ allowDecimals: false,
+ minValue: Traccar.Style.mapDefaultZoom,
+ maxValue: Traccar.Style.mapMaxZoom
+ }, {
key: 'ui.disableReport',
name: Strings.attributeUiDisableReport,
valueType: 'boolean'
diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js
index c6eb5b4..a0d346e 100644
--- a/web/app/view/map/BaseMap.js
+++ b/web/app/view/map/BaseMap.js
@@ -30,7 +30,7 @@ Ext.define('Traccar.view.map.BaseMap', {
},
initMap: function () {
- var server, layer, type, bingKey, lat, lon, zoom, target;
+ var server, layer, type, bingKey, lat, lon, zoom, maxZoom, target;
server = Traccar.app.getServer();
@@ -161,11 +161,12 @@ Ext.define('Traccar.view.map.BaseMap', {
lat = Traccar.app.getPreference('latitude', Traccar.Style.mapDefaultLat);
lon = Traccar.app.getPreference('longitude', Traccar.Style.mapDefaultLon);
zoom = Traccar.app.getPreference('zoom', Traccar.Style.mapDefaultZoom);
+ maxZoom = Traccar.app.getAttributePreference('web.maxZoom', Traccar.Style.mapMaxZoom);
this.mapView = new ol.View({
center: ol.proj.fromLonLat([lon, lat]),
zoom: zoom,
- maxZoom: Traccar.Style.mapMaxZoom
+ maxZoom: maxZoom
});
this.map = new ol.Map({