aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2021-09-18 15:51:47 -0500
committerIván Ávalos <avalos@disroot.org>2021-09-18 15:51:47 -0500
commite3ce12fedfbc37d44b5a47fa523d18f3c6bc0e47 (patch)
tree352df3526fa1b4b0fd5e3eb53b06790a0ae21dc5 /web
parent6b58d35990013b22774fea1f268a82b474ac7194 (diff)
downloadetbsa-traccar-web-e3ce12fedfbc37d44b5a47fa523d18f3c6bc0e47.tar.gz
etbsa-traccar-web-e3ce12fedfbc37d44b5a47fa523d18f3c6bc0e47.tar.bz2
etbsa-traccar-web-e3ce12fedfbc37d44b5a47fa523d18f3c6bc0e47.zip
Removed unused maps and added extra custom map
Diffstat (limited to 'web')
-rw-r--r--web/app/store/MapTypes.js3
-rw-r--r--web/app/view/map/BaseMap.js64
2 files changed, 12 insertions, 55 deletions
diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js
index 9cca525..fef19e5 100644
--- a/web/app/store/MapTypes.js
+++ b/web/app/store/MapTypes.js
@@ -47,6 +47,9 @@ Ext.define('Traccar.store.MapTypes', {
key: 'custom',
name: Strings.mapCustom
}, {
+ key: 'custom2',
+ name: Strings.mapCustom + ' 2'
+ }, {
key: 'customArcgis',
name: Strings.mapCustomArcgis
}]
diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js
index efd0502..fefe4de 100644
--- a/web/app/view/map/BaseMap.js
+++ b/web/app/view/map/BaseMap.js
@@ -50,38 +50,20 @@ Ext.define('Traccar.view.map.BaseMap', {
})
}),
new ol.layer.Tile({
- title: Strings.mapCustomArcgis,
- type: 'base',
- visible: type === 'customArcgis',
- source: new ol.source.TileArcGISRest({
- url: Ext.String.htmlDecode(server.get('mapUrl'))
- })
- }),
- new ol.layer.Tile({
- title: Strings.mapBingRoad,
+ title: Strings.mapCustom + ' 2',
type: 'base',
- visible: type === 'bingRoad',
- source: new ol.source.BingMaps({
- key: bingKey,
- imagerySet: 'Road'
- })
- }),
- new ol.layer.Tile({
- title: Strings.mapBingAerial,
- type: 'base',
- visible: type === 'bingAerial',
- source: new ol.source.BingMaps({
- key: bingKey,
- imagerySet: 'Aerial'
+ visible: type === 'custom2',
+ source: new ol.source.XYZ({
+ url: 'https://mt0.google.com/vt/lyrs=m&hl=en&x={x}&y={y}&z={z}&s=Ga',
+ attributions: ''
})
}),
new ol.layer.Tile({
- title: Strings.mapBingHybrid,
+ title: Strings.mapCustomArcgis,
type: 'base',
- visible: type === 'bingHybrid',
- source: new ol.source.BingMaps({
- key: bingKey,
- imagerySet: 'AerialWithLabels'
+ visible: type === 'customArcgis',
+ source: new ol.source.TileArcGISRest({
+ url: Ext.String.htmlDecode(server.get('mapUrl'))
})
}),
new ol.layer.Tile({
@@ -95,34 +77,6 @@ Ext.define('Traccar.view.map.BaseMap', {
})
}),
new ol.layer.Tile({
- title: Strings.mapAutoNavi,
- type: 'base',
- visible: type === 'autoNavi' || type === 'baidu',
- source: new ol.source.OSM({
- url: 'https://webrd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}'
- })
- }),
- new ol.layer.Tile({
- title: Strings.mapYandexMap,
- type: 'base',
- visible: type === 'yandexMap',
- source: new ol.source.XYZ({
- url: 'https://core-renderer-tiles.maps.yandex.net/tiles?l=map&x={x}&y={y}&z={z}',
- projection: 'EPSG:3395',
- attributions: '&copy; <a href="https://yandex.com/maps/">Yandex</a>'
- })
- }),
- new ol.layer.Tile({
- title: Strings.mapYandexSat,
- type: 'base',
- visible: type === 'yandexSat',
- source: new ol.source.XYZ({
- url: 'https://core-sat.maps.yandex.net/tiles?l=sat&x={x}&y={y}&z={z}',
- projection: 'EPSG:3395',
- attributions: '&copy; <a href="https://yandex.com/maps/">Yandex</a>'
- })
- }),
- new ol.layer.Tile({
title: Strings.mapOsm,
type: 'base',
visible: type === 'osm' || type === 'wikimedia' || !type,