Compare commits

..

No commits in common. "1bc68692ccc694a2696bf08172d803c81c4801ae" and "ee147fea3c76b89d5325360360b7d72daf4fe2a5" have entirely different histories.

2 changed files with 6 additions and 11 deletions

View file

@ -57,7 +57,6 @@ func main() {
})
http.HandleFunc("GET /api/sidewalks", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(sidewalks)
})

View file

@ -14,9 +14,6 @@
width: 100%;
background-color: black;
}
.grayscale {
filter: saturate(0.4);
}
</style>
<!-- TODO: self-host -->
<link rel="stylesheet" href="https://mfhsieh.github.io/leaflet-simple-locate/examples/demo.css" />
@ -34,14 +31,13 @@
// Set up the OpenStreetMap tile layer
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
opacity: 0.6,
className: 'grayscale',
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
const CONDITIONS = [
{name: "Unknown", color: "#444"},
{name: "Clear", color: "#04591b"},
{name: "Partially Covered", color: "yellow"},
{name: "Unknown", color: "gray"},
{name: "Clear", color: "green"},
{name: "PartiallyCovered", color: "yellow"},
{name: "Covered", color: "red"},
];
@ -53,19 +49,19 @@
for (let [i, way] of osmData.entries()) {
const polyline = L.polyline(way.Geometry, {
color: CONDITIONS[way.Condition].color,
weight: 10,
weight: 5,
opacity: 0.7
}).addTo(map);
polyline.on('mouseover', function(e) {
e.target.setStyle({
weight: 20,
weight: 10,
opacity: 1,
});
});
polyline.on('mouseout', function(e){
e.target.setStyle({
weight: 10,
weight: 5,
opacity: 0.7,
});
});