aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
Diffstat (limited to 'web/app')
-rw-r--r--web/app/model/Server.js1
-rw-r--r--web/app/store/MapTypes.js3
-rw-r--r--web/app/view/admin/ServerDialog.js4
-rw-r--r--web/app/view/map/Map.js6
4 files changed, 12 insertions, 2 deletions
diff --git a/web/app/model/Server.js b/web/app/model/Server.js
index b7d356226..b21f28299 100644
--- a/web/app/model/Server.js
+++ b/web/app/model/Server.js
@@ -23,6 +23,7 @@ Ext.define('Traccar.model.Server', {
{ name: 'registration', type: 'boolean' },
{ name: 'map', type: 'string' },
{ name: 'bingKey', type: 'string' },
+ { name: 'mapUrl', type: 'string' },
{ name: 'language', type: 'string' },
{ name: 'distanceUnit', type: 'string' },
{ name: 'speedUnit', type: 'string' },
diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js
index ebc45cc8d..fbdc49acc 100644
--- a/web/app/store/MapTypes.js
+++ b/web/app/store/MapTypes.js
@@ -20,6 +20,7 @@ Ext.define('Traccar.store.MapTypes', {
data: [
{'key': 'osm', 'name': strings.mapOsm},
{'key': 'bingRoad', 'name': strings.mapBingRoad},
- {'key': 'bingAerial', 'name': strings.mapBingAerial}
+ {'key': 'bingAerial', 'name': strings.mapBingAerial},
+ {'key': 'custom', 'name': strings.mapCustom},
]
});
diff --git a/web/app/view/admin/ServerDialog.js b/web/app/view/admin/ServerDialog.js
index 7e316c8a6..080e2fcc4 100644
--- a/web/app/view/admin/ServerDialog.js
+++ b/web/app/view/admin/ServerDialog.js
@@ -47,6 +47,10 @@ Ext.define('Traccar.view.admin.ServerDialog', {
name: 'bingKey',
fieldLabel: strings.mapBingKey
}, {
+ xtype: 'textfield',
+ name: 'mapUrl',
+ fieldLabel: strings.mapCustom
+ }, {
xtype: 'combobox',
name: 'distanceUnit',
fieldLabel: strings.settingsDistanceUnit,
diff --git a/web/app/view/map/Map.js b/web/app/view/map/Map.js
index db7dde02e..cdb46342b 100644
--- a/web/app/view/map/Map.js
+++ b/web/app/view/map/Map.js
@@ -38,7 +38,11 @@ Ext.define('Traccar.view.map.Map', {
var bingKey = server.get('bingKey');
- if (mapLayer === 'bingRoad') {
+ if (mapLayer === 'custom') {
+ layer = new ol.layer.Tile({ source: new ol.source.XYZ({
+ url: server.get('mapUrl')
+ })});
+ } else if (mapLayer === 'bingRoad') {
layer = new ol.layer.Tile({ source: new ol.source.BingMaps({
key: bingKey,
imagerySet: 'Road'