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 +++++++++- web/l10n/en.json | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/web/app/Style.js b/web/app/Style.js index 27243531..f12e9f53 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 77c10ebd..3d322438 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 68173a99..e545c301 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); diff --git a/web/l10n/en.json b/web/l10n/en.json index e8ac555d..65ee9e4f 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -241,6 +241,7 @@ "mapBaidu": "Baidu", "mapYandexMap": "Yandex Map", "mapYandexSat": "Yandex Satellite", + "mapWikimedia": "Wikimedia", "mapShapePolygon": "Polygon", "mapShapeCircle": "Circle", "mapShapePolyline": "Polyline", -- cgit v1.2.3