aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-23 22:40:49 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-23 22:40:49 +1200
commit4757c4c9f6bf780ecedbbcb0312712a617070226 (patch)
tree930f6838cc63e53313fb816edbbaa4fb4bfe7f45 /web/app/view
parent3195e708dc18c82f07869267738e43f08bd74696 (diff)
downloadtrackermap-server-4757c4c9f6bf780ecedbbcb0312712a617070226.tar.gz
trackermap-server-4757c4c9f6bf780ecedbbcb0312712a617070226.tar.bz2
trackermap-server-4757c4c9f6bf780ecedbbcb0312712a617070226.zip
Add support for custom maps
Diffstat (limited to 'web/app/view')
-rw-r--r--web/app/view/admin/ServerDialog.js4
-rw-r--r--web/app/view/map/Map.js6
2 files changed, 9 insertions, 1 deletions
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'