From bc22b44fd9c980146d862566e21f6247aafdd807 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 26 May 2018 17:32:14 +1200 Subject: Change map defaults --- web/app/Style.js | 4 ++-- web/app/store/MapTypes.js | 3 +++ web/app/view/map/BaseMap.js | 10 +++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'web/app') diff --git a/web/app/Style.js b/web/app/Style.js index 2724353..f12e9f5 100644 --- a/web/app/Style.js +++ b/web/app/Style.js @@ -42,8 +42,8 @@ Ext.define('Traccar.Style', { columnWidthNormal: 100, - mapDefaultLat: 1.283333, - mapDefaultLon: 103.833333, + mapDefaultLat: 9.933333, + mapDefaultLon: -84.083333, mapDefaultZoom: 4, mapRouteColor: [ diff --git a/web/app/store/MapTypes.js b/web/app/store/MapTypes.js index 77c10eb..3d32243 100644 --- a/web/app/store/MapTypes.js +++ b/web/app/store/MapTypes.js @@ -43,6 +43,9 @@ Ext.define('Traccar.store.MapTypes', { }, { 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 68173a9..e545c30 100644 --- a/web/app/view/map/BaseMap.js +++ b/web/app/view/map/BaseMap.js @@ -130,10 +130,18 @@ Ext.define('Traccar.view.map.BaseMap', { }) }); break; - default: + case 'osm': layer = new ol.layer.Tile({ source: new ol.source.OSM({}) }); + break; + default: + layer = new ol.layer.Tile({ + source: new ol.source.OSM({ + url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png' + }) + }) + break; } lat = Traccar.app.getPreference('latitude', Traccar.Style.mapDefaultLat); -- cgit v1.2.3