Increase colors/weights at Robin's request
This commit is contained in:
parent
f90830ff93
commit
1bc68692cc
|
@ -34,13 +34,14 @@
|
|||
// Set up the OpenStreetMap tile layer
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
opacity: 0.6,
|
||||
className: 'grayscale',
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
const CONDITIONS = [
|
||||
{name: "Unknown", color: "gray"},
|
||||
{name: "Clear", color: "green"},
|
||||
{name: "PartiallyCovered", color: "yellow"},
|
||||
{name: "Unknown", color: "#444"},
|
||||
{name: "Clear", color: "#04591b"},
|
||||
{name: "Partially Covered", color: "yellow"},
|
||||
{name: "Covered", color: "red"},
|
||||
];
|
||||
|
||||
|
@ -52,19 +53,19 @@
|
|||
for (let [i, way] of osmData.entries()) {
|
||||
const polyline = L.polyline(way.Geometry, {
|
||||
color: CONDITIONS[way.Condition].color,
|
||||
weight: 5,
|
||||
weight: 10,
|
||||
opacity: 0.7
|
||||
}).addTo(map);
|
||||
|
||||
polyline.on('mouseover', function(e) {
|
||||
e.target.setStyle({
|
||||
weight: 10,
|
||||
weight: 20,
|
||||
opacity: 1,
|
||||
});
|
||||
});
|
||||
polyline.on('mouseout', function(e){
|
||||
e.target.setStyle({
|
||||
weight: 5,
|
||||
weight: 10,
|
||||
opacity: 0.7,
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue