Skip to content

Commit

Permalink
Add busways
Browse files Browse the repository at this point in the history
  • Loading branch information
ginnyTheCat committed Mar 4, 2024
1 parent 03911a6 commit 1ebe413
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions osm2lanes/src/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub fn get_lane_specs_ltr(tags: &Tags, cfg: &MapConfig) -> Vec<LaneSpec> {
.map(|(i, lane)| {
from_lane(
lane,
traffic_direction(i * 2, lanes.centre_line, cfg.driving_side),
traffic_direction(i as u8 * 2, lanes.centre_line, cfg.driving_side),
)
})
.collect();
Expand All @@ -54,7 +54,7 @@ pub fn get_lane_specs_ltr(tags: &Tags, cfg: &MapConfig) -> Vec<LaneSpec> {
specs
}

fn traffic_direction(position: usize, centre_line: usize, driving_side: DrivingSide) -> Direction {
fn traffic_direction(position: u8, centre_line: u8, driving_side: DrivingSide) -> Direction {
if position + 1 == centre_line {
return Direction::Fwd;
}
Expand Down
1 change: 1 addition & 0 deletions streets_reader/src/extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ impl OsmExtract {
};

if !vec![
"busway",
"cycleway",
"footway",
"living_street",
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"wasm": "wasm-pack build --dev --target web ../osm2streets-js",
"wasm-release": "wasm-pack build --release --target web ../osm2streets-js",
"dev": "vite",
"build": "vite build",
"build": "npm run wasm-release && vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"fmt": "npx prettier --write *.js *.ts *.json *.html src/**",
Expand Down

0 comments on commit 1ebe413

Please sign in to comment.