diff --git a/docs/about.md b/docs/about.md new file mode 100644 index 0000000..18a570d --- /dev/null +++ b/docs/about.md @@ -0,0 +1,23 @@ +Safe Cycling Map +================ +Zoom in to see individual lanes, zoom out a little to see street safety. + + +# Key +## Safe streets - green +- Speed is less than or equal to 30kph +- Is a [living street](https://wiki.openstreetmap.org/wiki/Tag:highway%3Dliving_street) +- Is a separated cycleway +- Is a cycle lane separated from the road +- Is a shared path (bikes + pedestrians allowed) + +## More dangerous streets +- Road has a speed limit less than 40kph and greater than 30kmh +- Has an on road, painted (non-separated) bike lane + +## Dangerous streets +- Speed is higher than 40kmh +- 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. \ No newline at end of file diff --git a/src/App.css b/src/App.css index aef29c0..a0d35cb 100644 --- a/src/App.css +++ b/src/App.css @@ -104,7 +104,7 @@ h1 { bottom: 15px; } .mapboxgl-ctrl-top-left { - margin-top: 70px; + margin-top: 90px; } .mapboxgl-ctrl-geocoder--icon.mapboxgl-ctrl-geocoder--icon-search { diff --git a/src/drawing.ts b/src/drawing.ts index 7a251d1..33cee27 100644 --- a/src/drawing.ts +++ b/src/drawing.ts @@ -57,20 +57,20 @@ export function removeMarkers(markers: mapboxgl.Marker[]): void { } export function removeStreetLayers(map: mapboxgl.Map): void { try { - if (map.isSourceLoaded('greenRoads')) { - console.log("Removing sources..."); - map.removeLayer('greenRoadsId'); - map.removeLayer('redRoadsId'); - map.removeLayer('orangeRoadsId'); + // if (map.isSourceLoaded('greenRoads')) { + console.log("Removing sources..."); + map.removeLayer('greenRoadsId'); + map.removeLayer('redRoadsId'); + map.removeLayer('orangeRoadsId'); - map.removeSource('greenRoads'); - map.removeSource('redRoads'); - map.removeSource('orangeRoads'); + map.removeSource('greenRoads'); + map.removeSource('redRoads'); + map.removeSource('orangeRoads'); - } else { + // } else { - console.log("NOT Removing sources."); - } + // console.log("NOT Removing sources."); + // } } catch (e) { @@ -144,7 +144,7 @@ export function addStreetLayers(map: mapboxgl.Map, geoJson: FeatureCollection