aboutsummaryrefslogtreecommitdiff
path: root/web/app/view
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view')
-rw-r--r--web/app/view/dialog/Server.js6
-rw-r--r--web/app/view/dialog/User.js6
-rw-r--r--web/app/view/map/BaseMap.js15
3 files changed, 23 insertions, 4 deletions
diff --git a/web/app/view/dialog/Server.js b/web/app/view/dialog/Server.js
index a39408d5..fbfb3c6a 100644
--- a/web/app/view/dialog/Server.js
+++ b/web/app/view/dialog/Server.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2018 Anton Tananaev (anton@traccar.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -82,6 +82,10 @@ Ext.define('Traccar.view.dialog.Server', {
store: 'CoordinateFormats',
displayField: 'name',
valueField: 'key'
+ }, {
+ xtype: 'textfield',
+ name: 'poiLayer',
+ fieldLabel: Strings.mapPoiLayer
}]
}, {
xtype: 'fieldset',
diff --git a/web/app/view/dialog/User.js b/web/app/view/dialog/User.js
index 45ecd6eb..69bbd705 100644
--- a/web/app/view/dialog/User.js
+++ b/web/app/view/dialog/User.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2018 Anton Tananaev (anton@traccar.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -93,6 +93,10 @@ Ext.define('Traccar.view.dialog.User', {
store: 'CoordinateFormats',
displayField: 'name',
valueField: 'key'
+ }, {
+ xtype: 'textfield',
+ name: 'poiLayer',
+ fieldLabel: Strings.mapPoiLayer
}]
}, {
xtype: 'fieldset',
diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js
index c36e71a6..68173a99 100644
--- a/web/app/view/map/BaseMap.js
+++ b/web/app/view/map/BaseMap.js
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2018 Anton Tananaev (anton@traccar.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ Ext.define('Traccar.view.map.BaseMap', {
},
initMap: function () {
- var server, layer, type, bingKey, lat, lon, zoom, maxZoom, target;
+ var server, layer, type, bingKey, lat, lon, zoom, maxZoom, target, poiLayer;
server = Traccar.app.getServer();
@@ -153,6 +153,17 @@ Ext.define('Traccar.view.map.BaseMap', {
view: this.mapView
});
+ poiLayer = Traccar.app.getPreference('poiLayer', null);
+
+ if (poiLayer) {
+ this.map.addLayer(new ol.layer.Vector({
+ source: new ol.source.Vector({
+ url: poiLayer,
+ format: new ol.format.KML()
+ })
+ }));
+ }
+
this.body.dom.tabIndex = 0;
switch (Traccar.app.getAttributePreference('distanceUnit', 'km')) {