From f39286e467cab47548de83c03e0f7c3c84fd2a5c Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Sat, 18 Sep 2021 15:57:34 -0500 Subject: Rearranged maps. Two Google Maps layers are now hardcoded --- web/app/store/MapTypes.js | 7 +++++-- web/app/view/map/BaseMap.js | 27 ++++++++++++++++++--------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js index fef19e5..f91f366 100644 --- a/web/app/store/MapTypes.js +++ b/web/app/store/MapTypes.js @@ -47,8 +47,11 @@ Ext.define('Traccar.store.MapTypes', { key: 'custom', name: Strings.mapCustom }, { - key: 'custom2', - name: Strings.mapCustom + ' 2' + key: 'googley', + name: 'Google Maps (satélite)' + }, { + key: 'googlem', + name: 'Google Maps (mapa)' }, { key: 'customArcgis', name: Strings.mapCustomArcgis diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js index fefe4de..507ee7a 100644 --- a/web/app/view/map/BaseMap.js +++ b/web/app/view/map/BaseMap.js @@ -49,15 +49,6 @@ Ext.define('Traccar.view.map.BaseMap', { attributions: '' }) }), - new ol.layer.Tile({ - title: Strings.mapCustom + ' 2', - type: 'base', - 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.mapCustomArcgis, type: 'base', @@ -76,6 +67,24 @@ Ext.define('Traccar.view.map.BaseMap', { 'contributors, © CARTO' }) }), + new ol.layer.Tile({ + title: 'Google Maps (satélite)', + type: 'base', + visible: type === 'googley', + source: new ol.source.XYZ({ + url: 'https://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga', + attributions: '' + }) + }), + new ol.layer.Tile({ + title: 'Google Maps (mapa)', + type: 'base', + visible: type === 'googlem', + 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.mapOsm, type: 'base', -- cgit v1.2.3