kopia lustrzana https://github.com/jakecoppinger/safe-cycling-map
Improve safety notice
rodzic
0c13b5b909
commit
0234c6a747
21
README.md
21
README.md
|
@ -1,8 +1,26 @@
|
|||
Safe Cycling Map
|
||||
================
|
||||
|
||||
Work in progress! PRs and forks very welcome :)
|
||||
A map showing how safe a street is for cycling, based on (arbitrary) metrics. See the
|
||||
[key](https://github.com/jakecoppinger/safe-cycling-map/blob/main/key.md) for how street safety is calculated.
|
||||
|
||||
This is a work in progress side project. This data is not guaranteed to be accurate.
|
||||
|
||||
When zoomed in close, individual road and bicycle lanes are shown. When zoomed out, streets are
|
||||
coloured by their safety ratings.
|
||||
|
||||
# Disclaimer
|
||||
Warning: This is an arbitrary rating system. Data is not guaranteed to be accurate.
|
||||
|
||||
This map uses OpenStreetMap data. It is not a complete or accurate map of the world and should not
|
||||
be used in such a manner that deficiencies, omissions, inaccuracies or errors could result in death,
|
||||
loss or injury. The maps are an iterative ongoing work-in-progress and everyone is welcome to
|
||||
contribute editing the OpenStreetMap data if you spot inaccuracies. (warning courtesy of [CyclOSM](https://www.cyclosm.org/))
|
||||
|
||||
# Contributing: Found a mislabelled street? You can fix it!
|
||||
|
||||
Head to https://bikemaps.org/blog/post/improving-bicycling-data-on-openstreetmap for instructions
|
||||
on how to fix OpenStreetMap data.
|
||||
|
||||
![Screenshot of map](img/safe-cycling-map-2022-01-05-v2.jpg)
|
||||
|
||||
|
@ -12,6 +30,7 @@ Uses [osm2streets-vector-tileserver](https://github.com/jakecoppinger/osm2street
|
|||
a vector tileserver I wrote to generate Protobuf GeoJSON vector tiles using the JS bindings to
|
||||
osm2streets (which is written in Rust).
|
||||
|
||||
|
||||
# Local development
|
||||
|
||||
See instructions for setting up the backend tileserve at
|
||||
|
|
|
@ -2,6 +2,15 @@ Safe Cycling Map
|
|||
================
|
||||
Zoom in to see individual lanes, zoom out a little to see street safety.
|
||||
|
||||
Warning: This is an arbitrary rating system. Data is not guaranteed to be accurate.
|
||||
|
||||
This map uses OpenStreetMap data. It is not a complete or accurate map of the world and should not
|
||||
be used in such a manner that deficiencies, omissions, inaccuracies or errors could result in death,
|
||||
loss or injury. The maps are an iterative ongoing work-in-progress and everyone is welcome to
|
||||
contribute editing the OpenStreetMap data if you spot inaccuracies. (warning courtesy of [CyclOSM](https://www.cyclosm.org/))
|
||||
|
||||
See the README at https://github.com/jakecoppinger/safe-cycling-map for how to fix the data (or
|
||||
propose improvments to the safety rating system).
|
||||
|
||||
# Key
|
||||
## Safe streets - green
|
||||
|
@ -20,4 +29,4 @@ Zoom in to see individual lanes, zoom out a little to see street safety.
|
|||
- Road is a residental street with default speed limit (50kph)
|
||||
|
||||
## TODO: Banned streets
|
||||
Currently banned streets (eg. motorways/Sydney Harbour Bridge) are displayed as red.
|
||||
Currently banned streets (eg. motorways/Sydney Harbour Bridge) are currently displayed as red.
|
|
@ -104,7 +104,7 @@ h1 {
|
|||
bottom: 15px;
|
||||
}
|
||||
.mapboxgl-ctrl-top-left {
|
||||
margin-top: 90px;
|
||||
margin-top: 120px;
|
||||
}
|
||||
|
||||
.mapboxgl-ctrl-geocoder--icon.mapboxgl-ctrl-geocoder--icon-search {
|
||||
|
|
22
src/map.tsx
22
src/map.tsx
|
@ -106,7 +106,7 @@ export function Map() {
|
|||
}
|
||||
const zoom = map.getZoom();
|
||||
if (zoom > min_overpass_turbo_zoom) {
|
||||
console.log(`zoom is ${zoom}`);
|
||||
console.log(`zoom is ${zoom}`);
|
||||
debouncedFetchAndDrawMarkers(map, markers, setLoadingStatus);
|
||||
}
|
||||
});
|
||||
|
@ -125,32 +125,26 @@ export function Map() {
|
|||
<div>
|
||||
<div className="sidebar">
|
||||
<label>
|
||||
{" "}
|
||||
{statusText}
|
||||
<span color="red">Warning:</span> Data is open source and not guaranteed to be
|
||||
accurate.
|
||||
<br></br>
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://github.com/jakecoppinger/safe-cycling-map/blob/main/about.md"
|
||||
href="https://github.com/jakecoppinger/safe-cycling-map/blob/main/key.md"
|
||||
>
|
||||
View map key and how safety is calculated
|
||||
</a>
|
||||
<br></br>A work in progress side project by{" "}
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://jakecoppinger.com/"
|
||||
>
|
||||
Jake Coppinger
|
||||
</a>
|
||||
<br></br>Open source on{" "}
|
||||
<br></br>
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://github.com/jakecoppinger/safe-cycling-map"
|
||||
>
|
||||
Github
|
||||
About this map
|
||||
</a>
|
||||
<br></br>
|
||||
{statusText}
|
||||
</label>
|
||||
</div>
|
||||
<div ref={mapContainer} className="map-container" />
|
||||
|
|
Ładowanie…
Reference in New Issue