diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/app/store/MapTypes.js | 3 | ||||
-rw-r--r-- | web/app/view/map/BaseMap.js | 64 |
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: '© <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: '© <a href="https://yandex.com/maps/">Yandex</a>' - }) - }), - new ol.layer.Tile({ title: Strings.mapOsm, type: 'base', visible: type === 'osm' || type === 'wikimedia' || !type, |