aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/map/Map.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/map/Map.js')
-rw-r--r--web/app/view/map/Map.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/web/app/view/map/Map.js b/web/app/view/map/Map.js
index 9d9a92886..cdb46342b 100644
--- a/web/app/view/map/Map.js
+++ b/web/app/view/map/Map.js
@@ -36,16 +36,20 @@ Ext.define('Traccar.view.map.Map', {
var layer;
var mapLayer = user.get('map') || server.get('map');
- var bindKey = 'AseEs0DLJhLlTNoxbNXu7DGsnnH4UoWuGue7-irwKkE3fffaClwc9q_Mr6AyHY8F';
+ 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: bindKey,
+ key: bingKey,
imagerySet: 'Road'
})});
} else if (mapLayer === 'bingAerial') {
layer = new ol.layer.Tile({ source: new ol.source.BingMaps({
- key: bindKey,
+ key: bingKey,
imagerySet: 'Aerial'
})});
} else {