- Fixed visibility of mapkey.
- Changed https to http request for openstreetmap (https not supported)
This commit is contained in:
parent
7bae1d37b4
commit
cb29b26052
Notes:
subgit
2018-03-07 17:58:40 +01:00
r491 www/trunk
@ -71,9 +71,9 @@ function init(showGoogle, showStations, showQuakes, noFrils) {
|
||||
var osmde_map_layer = new OpenLayers.Layer.OSM(
|
||||
'OpenStreetMap (DE)',
|
||||
[
|
||||
"https://a.tile.openstreetmap.de/tiles/osmde/${z}/${x}/${y}.png",
|
||||
"https://b.tile.openstreetmap.de/tiles/osmde/${z}/${x}/${y}.png",
|
||||
"https://c.tile.openstreetmap.de/tiles/osmde/${z}/${x}/${y}.png"
|
||||
"http://a.tile.openstreetmap.de/tiles/osmde/${z}/${x}/${y}.png",
|
||||
"http://b.tile.openstreetmap.de/tiles/osmde/${z}/${x}/${y}.png",
|
||||
"http://c.tile.openstreetmap.de/tiles/osmde/${z}/${x}/${y}.png"
|
||||
],
|
||||
{
|
||||
attribution: 'Geobasisdaten: Copyright © 2013 <a href="http://www.openstreetmap.org/">OpenStreetMap</a> und Mitwirkende;' +
|
||||
@ -126,7 +126,8 @@ function init(showGoogle, showStations, showQuakes, noFrils) {
|
||||
|
||||
// Show quakes
|
||||
quakes_layer = loadKML(OpenLayers.i18n("Events"), 'quakes.kml', false, true);
|
||||
quakes_layer.events.on({'visibilitychanged': toggleQuakesMapkey});
|
||||
quakes_layer.events.on({'loadend': setQuakesMapkeyVisibility});
|
||||
quakes_layer.events.on({'visibilitychanged': setQuakesMapkeyVisibility});
|
||||
map.addLayer(quakes_layer);
|
||||
quakes_layer.setVisibility(showQuakes);
|
||||
|
||||
@ -219,9 +220,9 @@ function init(showGoogle, showStations, showQuakes, noFrils) {
|
||||
}
|
||||
|
||||
// Enable animated zoom
|
||||
for (var i=map.layers.length-1; i>=0; --i) {
|
||||
map.layers[i].animationEnabled = true;
|
||||
}
|
||||
// for (var i=map.layers.length-1; i>=0; --i) {
|
||||
// map.layers[i].animationEnabled = true;
|
||||
//}
|
||||
|
||||
// Show description
|
||||
select = new OpenLayers.Control.SelectFeature([quakes_layer, stations_layer]);
|
||||
@ -336,12 +337,14 @@ function onFeatureUnselect(event) {
|
||||
}
|
||||
|
||||
/* Function to activate map legend */
|
||||
function toggleQuakesMapkey() {
|
||||
function setQuakesMapkeyVisibility() {
|
||||
var mapkey_div = document.getElementById('mapkey');
|
||||
var quakes_visibility = quakes_layer.getVisibility();
|
||||
if (quakes_visibility) {
|
||||
mapkey_div.style.display = "block";
|
||||
mapkey_div.style.visibility = "visible";
|
||||
} else {
|
||||
mapkey_div.style.display = "none";
|
||||
mapkey_div.style.visibility = "hidden";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user