aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-06-29 19:25:54 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-06-29 19:25:54 -0700
commit125ca29a45bfbb4fd4ca950dfa6c1f5513739d56 (patch)
treea720b7d046e4c884cf598e263e37c60a60938289 /web
parent68589b9934637cdaa90b3452d4c16570eb2b0413 (diff)
downloadetbsa-traccar-web-125ca29a45bfbb4fd4ca950dfa6c1f5513739d56.tar.gz
etbsa-traccar-web-125ca29a45bfbb4fd4ca950dfa6c1f5513739d56.tar.bz2
etbsa-traccar-web-125ca29a45bfbb4fd4ca950dfa6c1f5513739d56.zip
Remove broken map types
Diffstat (limited to 'web')
-rw-r--r--web/app/store/MapTypes.js19
-rw-r--r--web/app/view/map/BaseMap.js38
2 files changed, 6 insertions, 51 deletions
diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js
index a768d84..dd889d4 100644
--- a/web/app/store/MapTypes.js
+++ b/web/app/store/MapTypes.js
@@ -20,11 +20,14 @@ Ext.define('Traccar.store.MapTypes', {
fields: ['key', 'name'],
data: [{
+ key: 'osm',
+ name: Strings.mapOsm
+ }, {
key: 'carto',
name: Strings.mapCarto
}, {
- key: 'osm',
- name: Strings.mapOsm
+ key: 'autoNavi',
+ name: Strings.mapAutoNavi
}, {
key: 'bingRoad',
name: Strings.mapBingRoad
@@ -35,18 +38,6 @@ Ext.define('Traccar.store.MapTypes', {
key: 'bingHybrid',
name: Strings.mapBingHybrid
}, {
- key: 'autoNavi',
- name: Strings.mapAutoNavi
- }, {
- key: 'yandexMap',
- name: Strings.mapYandexMap
- }, {
- key: 'yandexSat',
- name: Strings.mapYandexSat
- }, {
- key: 'wikimedia',
- name: Strings.mapWikimedia
- }, {
key: 'custom',
name: Strings.mapCustom
}, {
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
@@ -103,37 +103,9 @@ Ext.define('Traccar.view.map.BaseMap', {
})
}),
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: '&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://sat0{1-4}.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.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]);
- }
});