ensure clicks on country overlay pass through ok

This commit is contained in:
Dave Conway-Jones 2018-10-22 22:51:18 +01:00
parent 6838038c66
commit 71f868bcff
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -443,6 +443,9 @@ map.on('overlayadd', function(e) {
if (e.name == "satellite") {
overlays["satellite"].bringToBack();
}
if (e.name == "countries") {
overlays["countries"].bringToBack();
}
if (e.name == "heatmap") { // show heatmap button when it's layer is added.
clrHeat.addTo(map);
}
@ -688,7 +691,7 @@ basemaps["Watercolor"] = new L.StamenTileLayer('watercolor');
// Now add the overlays
// Add the countries (world-110m) for offline use
var customTopoLayer = L.geoJson(null, {style: {color:"blue", weight:2, fillColor:"#cf6", fillOpacity:0.04}});
var customTopoLayer = L.geoJson(null, {clickable:false, style: {color:"blue", weight:2, fillColor:"#cf6", fillOpacity:0.04}});
layers["_countries"] = omnivore.topojson('images/world-50m-flat.json',null,customTopoLayer);
overlays["countries"] = layers["_countries"];