mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 09:24:26 +03:00
er, dont need parking hints on buildings and areas. also adjust traffic
signal box color; needed updating after changing colors a while ago
This commit is contained in:
parent
4eadcc29f5
commit
0a97482a16
@ -87,19 +87,20 @@ pub fn extract_osm(
|
||||
let pts = map.gps_bounds.forcibly_convert(&gps_pts);
|
||||
let mut tags = tags_to_map(&way.tags);
|
||||
tags.insert(osm::OSM_WAY_ID.to_string(), way.id.to_string());
|
||||
// If there's no parking data in OSM already, then assume no parking and mark that it's
|
||||
// inferred.
|
||||
if !tags.contains_key(osm::PARKING_LEFT)
|
||||
&& !tags.contains_key(osm::PARKING_RIGHT)
|
||||
&& !tags.contains_key(osm::PARKING_BOTH)
|
||||
&& tags.get(osm::HIGHWAY) != Some(&"motorway".to_string())
|
||||
&& tags.get(osm::HIGHWAY) != Some(&"motorway_link".to_string())
|
||||
{
|
||||
tags.insert(osm::PARKING_BOTH.to_string(), "no_parking".to_string());
|
||||
tags.insert(osm::INFERRED_PARKING.to_string(), "true".to_string());
|
||||
}
|
||||
|
||||
if is_road(&tags) {
|
||||
// If there's no parking data in OSM already, then assume no parking and mark that it's
|
||||
// inferred.
|
||||
if !tags.contains_key(osm::PARKING_LEFT)
|
||||
&& !tags.contains_key(osm::PARKING_RIGHT)
|
||||
&& !tags.contains_key(osm::PARKING_BOTH)
|
||||
&& tags.get(osm::HIGHWAY) != Some(&"motorway".to_string())
|
||||
&& tags.get(osm::HIGHWAY) != Some(&"motorway_link".to_string())
|
||||
{
|
||||
tags.insert(osm::PARKING_BOTH.to_string(), "no_parking".to_string());
|
||||
tags.insert(osm::INFERRED_PARKING.to_string(), "true".to_string());
|
||||
}
|
||||
|
||||
roads.push(RawRoad {
|
||||
orig_id: OriginalRoad {
|
||||
osm_way_id: way.id,
|
||||
|
@ -63,7 +63,7 @@ pub fn draw_signal_phase(
|
||||
let percent = time_left.unwrap() / phase.duration;
|
||||
// TODO Tune colors.
|
||||
batch.push(
|
||||
ctx.cs.get_def("traffic signal box", Color::grey(0.2)),
|
||||
ctx.cs.get_def("traffic signal box", Color::grey(0.5)),
|
||||
Polygon::rectangle_topleft(top_left, box_width, box_height),
|
||||
);
|
||||
batch.push(
|
||||
|
Loading…
Reference in New Issue
Block a user