Hide some details from the zoomed view in the LTN tool: driveways, crossings, stop signs. Most are flat-out incorrect, especially in the UK.

This commit is contained in:
Dustin Carlino 2022-05-26 13:01:21 +01:00
parent a89834af49
commit 988a602342
3 changed files with 20 additions and 0 deletions

View File

@ -57,6 +57,14 @@ struct Args {
fn run(mut settings: Settings) {
let mut opts = map_gui::options::Options::load_or_default();
opts.color_scheme = map_gui::colors::ColorSchemeChoice::LTN;
opts.show_building_driveways = false;
// TODO Ideally we would have a better map model in the first place. The next best thing would
// be to change these settings based on the map's country, but that's a bit tricky to do early
// enough (before map_switched). So for now, assume primary use of this tool is in the UK,
// where these settings are most appropriate.
opts.show_stop_signs = false;
opts.show_crosswalks = false;
let args = Args::from_iter(abstutil::cli_args());
args.app_args.override_options(&mut opts);

View File

@ -34,6 +34,10 @@ pub struct Options {
pub camera_angle: CameraAngle,
/// Draw building driveways.
pub show_building_driveways: bool,
/// Draw stop signs.
pub show_stop_signs: bool,
/// Draw crosswalks and unmarked crossings.
pub show_crosswalks: bool,
/// When making a screen recording, enable this option to hide some UI elements
pub minimal_controls: bool,
@ -79,6 +83,8 @@ impl Options {
toggle_day_night_colors: false,
camera_angle: CameraAngle::TopDown,
show_building_driveways: true,
show_stop_signs: true,
show_crosswalks: true,
time_increment: Duration::minutes(10),
dont_draw_time_warp: false,

View File

@ -55,6 +55,9 @@ impl DrawIntersection {
}
for turn in &i.turns {
if !app.opts().show_crosswalks {
break;
}
if turn.turn_type.pedestrian_crossing() {
make_crosswalk(&mut default_geom, turn, map, app.cs());
}
@ -76,6 +79,9 @@ impl DrawIntersection {
}
IntersectionType::StopSign => {
for ss in map.get_stop_sign(i.id).roads.values() {
if !app.opts().show_stop_signs {
break;
}
if ss.must_stop {
if let Some((octagon, pole, angle)) =
DrawIntersection::stop_sign_geom(ss, map)