Commit bdaad096 authored by Krystyna Milian's avatar Krystyna Milian

Removed Google maps base layers, set Red Cross climate layer to be displayed on default

parent 16275468
......@@ -437,6 +437,7 @@ $(document).ready(function () {
function addLayersToChart(mapChart) {
var redCrossLayer = L.tileLayer.wms("https://shelter-database.org:8443/geoserver/ows?service=wms&version=1.1.1&request=GetCapabilities", {
layers: 'shelters:redcross',
transparent: true,
......@@ -450,50 +451,16 @@ function addLayersToChart(mapChart) {
opacity: 0.5
})
var overlayMaps = {
"Climate simplified classification": redCrossLayer,
"Koeppen-Geiger": koeppenGeigerLayer
};
mapChart._doRender()
var map = mapChart.map()
var googleStreets = L.tileLayer('http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}', {
maxZoom: 20,
subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
attribution: ''
});
var googleHybrid = L.tileLayer('http://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}', {
maxZoom: 20,
subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
attribution: ''
});
var googleSat = L.tileLayer('http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
maxZoom: 20,
subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
attribution: ''
});
var googleTerrain = L.tileLayer('http://{s}.google.com/vt/lyrs=p&x={x}&y={y}&z={z}', {
maxZoom: 20,
subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
attribution: ''
});
var openStreetMap = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
})
var baseLayers = {
"Open Street Map": openStreetMap,
"Google streets": googleStreets,
"Google hybrid": googleHybrid,
"Google satelite": googleSat,
"Google physical": googleTerrain
}
L.control.layers(baseLayers, {
"Climate simplified classification": redCrossLayer,
"Koeppen-Geiger": koeppenGeigerLayer
}).addTo(map);
map.addLayer(redCrossLayer)
L.control.layers(null, overlayMaps).addTo(map);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment