diff --git a/www/index.html.de b/www/index.html.de index 39542dd..0943ff0 100755 --- a/www/index.html.de +++ b/www/index.html.de @@ -39,7 +39,9 @@ - + + + diff --git a/www/map.js b/www/map.js index a73dd5e..d1e1dfd 100644 --- a/www/map.js +++ b/www/map.js @@ -133,19 +133,18 @@ 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']); - new L.Control.Zoom({ position: 'topright' }).addTo(map); - new L.control.scale({position: 'bottomright', imperial: false}).addTo(map); - + // create baselayer switch ( config['map']['baselayer'] ) { case 'osmde': // add OpenStreetMap.DE tile layer + map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']); L.tileLayer('http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors, CC-BY-SA', }).addTo(map); break; case 'esrigray': // add ESRI Grayscale World Map (neither city nor road names) + map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']); L.tileLayer('//server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}', { attribution: 'Tiles © Esri — Esri, DeLorme, NAVTEQ', @@ -153,18 +152,21 @@ $(document).ready(function() { }).addTo(map); break; case 'aerial': // add ESRI WordImagery tile layer + map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']); L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', { attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community' }).addTo(map); break; case 'komoot': // add OpenStreetMap.DE tile layer + map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']); L.tileLayer('//www.komoot.de/tiles/{s}/{z}/{x}/{y}.png', { attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA | Tiles Courtesy of Komoot', }).addTo(map); break; case 'mapquestgray': // add MapQuestOSM tile layer + map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']); L.tileLayer.grayscale('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg', { subdomains: '1234', @@ -175,14 +177,24 @@ $(document).ready(function() { case 'mapquest': // add MapQuestOSM tile layer null; default: - L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg', - { - subdomains: '1234', - detectRetina: true, - attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA | Tiles Courtesy of MapQuest ', - }).addTo(map); + var mapLayer = MQ.mapLayer(); + map = L.map('map', { + zoomControl: false, + worldCopyJump: true, + layers: mapLayer, + }).setView(config['map']['centerDefault'], config['map']['zoomDefault']); + //L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg', + //{ + //subdomains: '1234', + //detectRetina: true, + //attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA | Tiles Courtesy of MapQuest ', + //}).addTo(map); }; + // add controls + new L.Control.Zoom({ position: 'topright' }).addTo(map); + new L.control.scale({position: 'bottomright', imperial: false}).addTo(map); + // create station and event layer // stationLayer = L.geoJson().addTo(map); stationLayer = new L.MarkerGroup().addTo(map); diff --git a/www/misc.js b/www/misc.js index bd68521..e249cc4 100644 --- a/www/misc.js +++ b/www/misc.js @@ -90,7 +90,7 @@ var eventDetails = {}; var stationTable = {}; var config = { ajax: { - timeout: 10000, // 10 seconds + timeout: 20000, // 20 seconds eventURL: '/fdsnws/event/1/query', dlsvURL: 'dlsv', mseedURL: '/fdsnws/dataselect/1/query',