From e3ce12fedfbc37d44b5a47fa523d18f3c6bc0e47 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Sat, 18 Sep 2021 15:51:47 -0500 Subject: Removed unused maps and added extra custom map --- web/app/store/MapTypes.js | 3 +++ web/app/view/map/BaseMap.js | 64 +++++++-------------------------------------- 2 files changed, 12 insertions(+), 55 deletions(-) (limited to 'web') 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 @@ -46,6 +46,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({ @@ -94,34 +76,6 @@ Ext.define('Traccar.view.map.BaseMap', { 'contributors, © CARTO' }) }), - 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: '© Yandex' - }) - }), - 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: '© Yandex' - }) - }), new ol.layer.Tile({ title: Strings.mapOsm, type: 'base', -- cgit v1.2.3