From 125ca29a45bfbb4fd4ca950dfa6c1f5513739d56 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 29 Jun 2021 19:25:54 -0700 Subject: Remove broken map types --- web/app/view/map/BaseMap.js | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) (limited to 'web/app/view/map/BaseMap.js') diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js index c089ad0..6891598 100644 --- a/web/app/view/map/BaseMap.js +++ b/web/app/view/map/BaseMap.js @@ -102,38 +102,10 @@ Ext.define('Traccar.view.map.BaseMap', { 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://vec0{1-4}.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://sat0{1-4}.maps.yandex.net/tiles?l=sat&x={x}&y={y}&z={z}', - projection: 'EPSG:3395', - attributions: '© Yandex' - }) - }), - new ol.layer.Tile({ - title: Strings.mapWikimedia, - type: 'base', - visible: type === 'wikimedia', - source: new ol.source.OSM({ - url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png' - }) - }), new ol.layer.Tile({ title: Strings.mapOsm, type: 'base', - visible: type === 'osm' || !type, + visible: type === 'osm' || type === 'yandexMap' || type === 'yandexSat' || type === 'wikimedia' || !type, source: new ol.source.OSM({}) }) ] @@ -232,12 +204,4 @@ Ext.define('Traccar.view.map.BaseMap', { this.map.updateSize(); } } -}, function () { - var projection; - proj4.defs('EPSG:3395', '+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'); - ol.proj.proj4.register(proj4); - projection = ol.proj.get('EPSG:3395'); - if (projection) { - projection.setExtent([-20037508.342789244, -20037508.342789244, 20037508.342789244, 20037508.342789244]); - } }); -- cgit v1.2.3