nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 18aa61e2e64a3e3c6eba1284a5b3f51cef014598
parent 73b4e9e1590bfd93b250453804bef2e1d94c5b67
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed, 29 Jan 2020 10:46:17 +0300

move defaultLocation and defaultZoom to config

Diffstat:
Msrc/App.js | 5+----
Msrc/config.js | 2++
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/App.js b/src/App.js @@ -95,11 +95,8 @@ function setUp() { } }).addTo(map); - const defaultLocation = L.latLng(55.75185, 37.61856); - const defaultZoom = 10; - let {lat, lng, zoom, valid: validPositionInHash} = map.validateState(hashState.getState('m')); - locateControl.moveMapToCurrentLocation(defaultZoom, defaultLocation, + locateControl.moveMapToCurrentLocation(config.defaultZoom, L.latLng(config.defaultLocation), validPositionInHash ? L.latLng(lat, lng) : null, validPositionInHash ? zoom : null); map.enableHashState('m'); diff --git a/src/config.js b/src/config.js @@ -5,6 +5,8 @@ export default { <a href="https://docs.nakarte.me">Documentation</a> | <a href="https://about.nakarte.me">News</a> | <a href="mailto:nakarte@nakarte.me" target="_self">nakarte@nakarte.me</a> `, + defaultLocation: [55.75185, 37.61856], + defaultZoom: 10, googleApiUrl: `https://maps.googleapis.com/maps/api/js?v=3&key=${secrets.google}`, westraDataBaseUrl: 'https://nakarte.me/westraPasses/', CORSProxyUrl: 'https://proxy.nakarte.me/',