added leaflet subdomains to the environment variables, which are used now for initializing a leaflet map
All checks were successful
default-pipeline default-pipeline #182

This commit is contained in:
Balázs Vigh 2021-05-08 18:20:54 +02:00
parent 430b32d0c6
commit e6819b6dd3
3 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ DB_NAME=mapguesser
GOOGLE_MAPS_SERVER_API_KEY=your_google_maps_server_api_key GOOGLE_MAPS_SERVER_API_KEY=your_google_maps_server_api_key
GOOGLE_MAPS_JS_API_KEY=your_google_maps_js_api_key GOOGLE_MAPS_JS_API_KEY=your_google_maps_js_api_key
LEAFLET_TILESERVER_URL=a_leaflet_compatible_tileserver_url LEAFLET_TILESERVER_URL=a_leaflet_compatible_tileserver_url
LEAFLET_TILESERVER_SUBDOMAINS=list_of_subdomains_for_the_tileserver_without_separators
LEAFLET_TILESERVER_ATTRIBUTION=attribution_to_be_shown_for_tiles LEAFLET_TILESERVER_ATTRIBUTION=attribution_to_be_shown_for_tiles
STATIC_ROOT=/static STATIC_ROOT=/static
MAIL_FROM=mapguesser@mapguesser-dev.ch MAIL_FROM=mapguesser@mapguesser-dev.ch

View File

@ -382,7 +382,7 @@
L.tileLayer(tileUrl, { L.tileLayer(tileUrl, {
attribution: tileAttribution, attribution: tileAttribution,
subdomains: '1234', subdomains: tileSubdomains,
ppi: highResData.ppi, ppi: highResData.ppi,
tileSize: highResData.tileSize, tileSize: highResData.tileSize,
zoomOffset: highResData.zoomOffset, zoomOffset: highResData.zoomOffset,

View File

@ -94,6 +94,7 @@
@section(pageScript) @section(pageScript)
<script> <script>
var tileUrl = '<?= $_ENV['LEAFLET_TILESERVER_URL'] ?>'; var tileUrl = '<?= $_ENV['LEAFLET_TILESERVER_URL'] ?>';
var tileSubdomains = '<?= $_ENV['LEAFLET_TILESERVER_SUBDOMAINS'] ?>';
var tileAttribution = '<?= $_ENV['LEAFLET_TILESERVER_ATTRIBUTION'] ?>'; var tileAttribution = '<?= $_ENV['LEAFLET_TILESERVER_ATTRIBUTION'] ?>';
var mapId = <?= $mapId ?>; var mapId = <?= $mapId ?>;
var mapBounds = <?= json_encode($bounds) ?>; var mapBounds = <?= json_encode($bounds) ?>;