added mapquest baselayer option
uses API key registered to https://araidne.geophysik.ruhr-uni-bochum.de/map/
This commit is contained in:
parent
ecdeaecfde
commit
2e5e998d8a
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
|
||||
<!-- r20211017.2 (2021-10-17) -->
|
||||
<!-- Version VVVVV -->
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='de' lang='de'>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
||||
@ -36,8 +36,9 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-providers/1.10.1/leaflet-providers.min.js" integrity="sha512-Ifxj89Ujg72gC/psKB9ystryRYiopmDud2EmNTKC9kz192aQwDKVK1FzWsyPc37tgU0UmRQlNnBM++ZnwIXJ9Q==" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/leaflet.browser.print@1.0.5/dist/leaflet.browser.print.min.js" integrity="sha256-1MQvHEnVXSKwR+XIVswRSBla/B5ohkp5+HJtritIkgE=" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script>
|
||||
|
||||
<script src="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest-core.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest-core.css"/>
|
||||
|
||||
<!-- Map, Events & Stations -->
|
||||
<script type="text/javascript" src="misc.js"></script>
|
||||
<script type="text/javascript" src="geolocation.js"></script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
|
||||
<!-- r20211017.2 (2021-10-17) -->
|
||||
<!-- Version VVVVV -->
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='de' lang='de'>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
||||
@ -36,8 +36,9 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-providers/1.10.1/leaflet-providers.min.js" integrity="sha512-Ifxj89Ujg72gC/psKB9ystryRYiopmDud2EmNTKC9kz192aQwDKVK1FzWsyPc37tgU0UmRQlNnBM++ZnwIXJ9Q==" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/leaflet.browser.print@1.0.5/dist/leaflet.browser.print.min.js" integrity="sha256-1MQvHEnVXSKwR+XIVswRSBla/B5ohkp5+HJtritIkgE=" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt"></script>
|
||||
|
||||
<script src="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest-core.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest-core.css"/>
|
||||
|
||||
<!-- Map, Events & Stations -->
|
||||
<script type="text/javascript" src="misc.js"></script>
|
||||
<script type="text/javascript" src="geolocation.js"></script>
|
||||
@ -156,7 +157,9 @@
|
||||
<p class="table-caption">Download as <a id="stations-csv-link" href="link" download="stations.csv">CSV file</a>.</p>
|
||||
</div>
|
||||
<!-- More -->
|
||||
<div class="tab" id="moretab"><!--include virtual="more.html.de" --></div>
|
||||
<div class="tab more_de" id="moretab">
|
||||
<p>Loading text ...</p>
|
||||
</div>
|
||||
<!-- Info -->
|
||||
<div class="tab" id="infotab">
|
||||
<div id="infoaccordion">
|
||||
|
55
www/map.js
55
www/map.js
@ -139,31 +139,38 @@ function initMapLink() {
|
||||
**********************************************************************/
|
||||
$(document).ready(function() {
|
||||
|
||||
// create a map in the "map" div, set the view to a given place and zoom
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
|
||||
// create baselayer
|
||||
switch ( config['map']['baselayer'] ) {
|
||||
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
||||
L.tileLayer.provider('Esri.WorldGrayCanvas').addTo(map);
|
||||
break;
|
||||
case 'aerial': // add ESRI WordImagery tile layer
|
||||
L.tileLayer.provider('Esri.WorldImagery').addTo(map);
|
||||
break;
|
||||
case 'opentopo': // add OpenTopoMap tile layer
|
||||
L.tileLayer.provider('OpenTopoMap').addTo(map);
|
||||
break;
|
||||
case 'mapnik': // add OpenStreetMap.Mapnik tile layer
|
||||
L.tileLayer.provider('OpenStreetMap.Mapnik').addTo(map);
|
||||
break;
|
||||
case 'topplus': // add TopPlus tile layer (https://gdz.bkg.bund.de/index.php/default/webdienste/topplus-produkte/wmts-topplusopen-wmts-topplus-open.html)
|
||||
L.tileLayer('https://sgx.geodatenzentrum.de/wmts_topplus_open/tile/1.0.0/web/default/WEBMERCATOR/{z}/{y}/{x}.png',
|
||||
{attribution: '© Bundesamt für Kartographie und Geodäsie ('+jahr+'), Datenquellen: <a href="http://sg.geodatenzentrum.de/web_public/Datenquellen_TopPlus_Open.pdf">Geodatenzentrum</a>'}).addTo(map);
|
||||
break;
|
||||
default: // use OpenStreetMap.DE as default
|
||||
L.tileLayer.provider('OpenStreetMap.DE').addTo(map);
|
||||
};
|
||||
if ( config['map']['baselayer'] == 'mapquest' ) {
|
||||
L.mapquest.key = 'RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt';
|
||||
map = L.mapquest.map('map', {
|
||||
layers: L.mapquest.tileLayer('map'),
|
||||
zoomControl: false, worldCopyJump: true
|
||||
}).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
} else {
|
||||
// create a map in the "map" div, set the view to a given place and zoom
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
|
||||
// create baselayer
|
||||
switch ( config['map']['baselayer'] ) {
|
||||
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
||||
L.tileLayer.provider('Esri.WorldGrayCanvas').addTo(map);
|
||||
break;
|
||||
case 'aerial': // add ESRI WordImagery tile layer
|
||||
L.tileLayer.provider('Esri.WorldImagery').addTo(map);
|
||||
break;
|
||||
case 'opentopo': // add OpenTopoMap tile layer
|
||||
L.tileLayer.provider('OpenTopoMap').addTo(map);
|
||||
break;
|
||||
case 'mapnik': // add OpenStreetMap.Mapnik tile layer
|
||||
L.tileLayer.provider('OpenStreetMap.Mapnik').addTo(map);
|
||||
break;
|
||||
case 'topplus': // add TopPlus tile layer (https://gdz.bkg.bund.de/index.php/default/webdienste/topplus-produkte/wmts-topplusopen-wmts-topplus-open.html)
|
||||
L.tileLayer('https://sgx.geodatenzentrum.de/wmts_topplus_open/tile/1.0.0/web/default/WEBMERCATOR/{z}/{y}/{x}.png',
|
||||
{attribution: '© Bundesamt für Kartographie und Geodäsie ('+jahr+'), Datenquellen: <a href="http://sg.geodatenzentrum.de/web_public/Datenquellen_TopPlus_Open.pdf">Geodatenzentrum</a>'}).addTo(map);
|
||||
break;
|
||||
default: // use OpenStreetMap.DE as default
|
||||
L.tileLayer.provider('OpenStreetMap.DE').addTo(map);
|
||||
};
|
||||
};
|
||||
// add controls
|
||||
new L.Control.Zoom({ position: 'topright' }).addTo(map);
|
||||
new L.control.scale({position: 'bottomright', imperial: false}).addTo(map);
|
||||
|
@ -139,30 +139,37 @@ function initMapLink() {
|
||||
**********************************************************************/
|
||||
$(document).ready(function() {
|
||||
|
||||
// create a map in the "map" div, set the view to a given place and zoom
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
|
||||
if ( config['map']['baselayer'] == 'mapquest' ) {
|
||||
L.mapquest.key = 'RPOPuz3lA2GGBtVpEU0ugxtVoGba53Dt';
|
||||
map = L.mapquest.map('map', {
|
||||
layers: L.mapquest.tileLayer('map'),
|
||||
zoomControl: false, worldCopyJump: true
|
||||
}).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
} else {
|
||||
// create a map in the "map" div, set the view to a given place and zoom
|
||||
map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']);
|
||||
|
||||
// create baselayer
|
||||
switch ( config['map']['baselayer'] ) {
|
||||
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
||||
L.tileLayer.provider('Esri.WorldGrayCanvas').addTo(map);
|
||||
break;
|
||||
case 'aerial': // add ESRI WordImagery tile layer
|
||||
L.tileLayer.provider('Esri.WorldImagery').addTo(map);
|
||||
break;
|
||||
case 'opentopo': // add OpenTopoMap tile layer
|
||||
L.tileLayer.provider('OpenTopoMap').addTo(map);
|
||||
break;
|
||||
case 'mapnik': // add OpenStreetMap.Mapni tile layer
|
||||
L.tileLayer.provider('OpenStreetMap.Mapnik').addTo(map);
|
||||
break;
|
||||
case 'topplus': // add TopPlus tile layer (https://gdz.bkg.bund.de/index.php/default/webdienste/topplus-produkte/wmts-topplusopen-wmts-topplus-open.html)
|
||||
L.tileLayer('https://sgx.geodatenzentrum.de/wmts_topplus_open/tile/1.0.0/web/default/WEBMERCATOR/{z}/{y}/{x}.png',
|
||||
{attribution: '© Federal Agency for Cartography and Geodesy ('+jahr+'), Datasource: <a href="http://sg.geodatenzentrum.de/web_public/Datenquellen_TopPlus_Open.pdf">Geodatenzentrum</a>'}).addTo(map);
|
||||
break;
|
||||
default: // use OpenStreetMap.DE as default
|
||||
L.tileLayer.provider('OpenStreetMap.DE').addTo(map);
|
||||
// create baselayer
|
||||
switch ( config['map']['baselayer'] ) {
|
||||
case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names)
|
||||
L.tileLayer.provider('Esri.WorldGrayCanvas').addTo(map);
|
||||
break;
|
||||
case 'aerial': // add ESRI WordImagery tile layer
|
||||
L.tileLayer.provider('Esri.WorldImagery').addTo(map);
|
||||
break;
|
||||
case 'opentopo': // add OpenTopoMap tile layer
|
||||
L.tileLayer.provider('OpenTopoMap').addTo(map);
|
||||
break;
|
||||
case 'mapnik': // add OpenStreetMap.Mapnik tile layer
|
||||
L.tileLayer.provider('OpenStreetMap.Mapnik').addTo(map);
|
||||
break;
|
||||
case 'topplus': // add TopPlus tile layer (https://gdz.bkg.bund.de/index.php/default/webdienste/topplus-produkte/wmts-topplusopen-wmts-topplus-open.html)
|
||||
L.tileLayer('https://sgx.geodatenzentrum.de/wmts_topplus_open/tile/1.0.0/web/default/WEBMERCATOR/{z}/{y}/{x}.png',
|
||||
{attribution: '© Federal Agency for Cartography and Geodesy ('+jahr+'), Datasource: <a href="http://sg.geodatenzentrum.de/web_public/Datenquellen_TopPlus_Open.pdf">Geodatenzentrum</a>'}).addTo(map);
|
||||
break;
|
||||
default: // use OpenStreetMap.DE as default
|
||||
L.tileLayer.provider('OpenStreetMap.DE').addTo(map);
|
||||
};
|
||||
};
|
||||
// add controls
|
||||
new L.Control.Zoom({ position: 'topright' }).addTo(map);
|
||||
|
Loading…
Reference in New Issue
Block a user