aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorEdward Valley <ed.valley@yandex.com>2019-07-12 23:53:29 -0400
committerEdward Valley <ed.valley@yandex.com>2019-07-12 23:53:29 -0400
commite6013751d88cbfaac6c03a070d88cfd5c3e16921 (patch)
tree1b509acddae033e38f699de01b5803e63d380008 /web
parent74045badac73aae991301e65d119109ee7d5d46e (diff)
downloadetbsa-traccar-web-e6013751d88cbfaac6c03a070d88cfd5c3e16921.tar.gz
etbsa-traccar-web-e6013751d88cbfaac6c03a070d88cfd5c3e16921.tar.bz2
etbsa-traccar-web-e6013751d88cbfaac6c03a070d88cfd5c3e16921.zip
Add support for ArcGIS REST map services
Diffstat (limited to 'web')
-rw-r--r--web/app/store/MapTypes.js7
-rw-r--r--web/app/view/map/BaseMap.js9
-rw-r--r--web/l10n/en.json4
3 files changed, 16 insertions, 4 deletions
diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js
index 3d32243..211cc81 100644
--- a/web/app/store/MapTypes.js
+++ b/web/app/store/MapTypes.js
@@ -47,7 +47,10 @@ Ext.define('Traccar.store.MapTypes', {
key: 'wikimedia',
name: Strings.mapWikimedia
}, {
- key: 'custom',
- name: Strings.mapCustom
+ key: 'customXyzFormat',
+ name: Strings.mapCustomXyzFormat
+ }, {
+ key: 'customArcgisRest',
+ name: Strings.mapCustomArcgisRest
}]
});
diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js
index 4f0c8d4..0b39ae3 100644
--- a/web/app/view/map/BaseMap.js
+++ b/web/app/view/map/BaseMap.js
@@ -38,7 +38,7 @@ Ext.define('Traccar.view.map.BaseMap', {
bingKey = server.get('bingKey');
switch (type) {
- case 'custom':
+ case 'customXyzFormat':
layer = new ol.layer.Tile({
source: new ol.source.XYZ({
url: Ext.String.htmlDecode(server.get('mapUrl')),
@@ -46,6 +46,13 @@ Ext.define('Traccar.view.map.BaseMap', {
})
});
break;
+ case 'customArcgisRest':
+ layer = new ol.layer.Tile({
+ source: new ol.source.TileArcGISRest({
+ url: Ext.String.htmlDecode(server.get('mapUrl'))
+ })
+ });
+ break;
case 'bingRoad':
layer = new ol.layer.Tile({
source: new ol.source.BingMaps({
diff --git a/web/l10n/en.json b/web/l10n/en.json
index 69f3fed..07e7609 100644
--- a/web/l10n/en.json
+++ b/web/l10n/en.json
@@ -232,6 +232,8 @@
"mapTitle": "Map",
"mapLayer": "Map Layer",
"mapCustom": "Custom Map",
+ "mapCustomXyzFormat": "Custom (XYZ)",
+ "mapCustomArcgisRest": "Custom (ArcGIS REST)",
"mapCarto": "Carto Basemaps",
"mapOsm": "Open Street Map",
"mapBingKey": "Bing Maps Key",
@@ -427,4 +429,4 @@
"categoryScooter": "Scooter",
"maintenanceStart": "Start",
"maintenancePeriod": "Period"
-} \ No newline at end of file
+}