Dustin Carlino
2fc9010b1e
Fix some clippy warnings
2021-09-17 18:31:30 -07:00
Dustin Carlino
50b8c533bf
Click and drag in the map_editor for intersections, interior road points, and buildings
2021-09-09 09:09:41 -07:00
Dustin Carlino
27a712bcc3
Remove buttons from map_editor map loader -- very slow and not useful
2021-09-07 15:39:55 -07:00
Dustin Carlino
a8645bd9ed
Refactor places setting camera from URL
2021-09-07 11:21:56 -07:00
Dustin Carlino
4068986c58
Refactor URLManager -- on errors, always warn
2021-09-07 11:14:31 -07:00
Dustin Carlino
570cd2de84
Make map_editor more web-friendly:
...
- adjust the panel
- hide some controls on the web
- keep the URL up-to-date with the map and camera
2021-09-07 11:00:27 -07:00
Dustin Carlino
ce23d3c37a
Preserve camera state in map_editor when appropriate -- makes reloading less jarring
2021-09-07 09:46:41 -07:00
Dustin Carlino
d1e60c888a
Handle broken RawMaps, which're more likely to happen in the web
...
deployment, since I'm not planning to version input data.
As part of this, prepare to lift the PopupMsg helper from map_gui to
widgetry, removing dependencies on AppLike.
2021-09-07 09:41:17 -07:00
Dustin Carlino
c8de2ca82d
Make map_editor load initial files using FileLoader, so it works on web
2021-09-06 22:41:20 -07:00
Dustin Carlino
144f2205b2
Add a file loader to map_editor. Clunky UI, but workable.
2021-09-06 21:09:45 -07:00
Dustin Carlino
05d4474926
Deploy the RawMap editor to the web. I want to point to it from the
...
intersection geometry article for a slightly more interactive
experience.
It'll be a bit brittle, because it'll always point at the dev version of
RawMaps. It seems like a huge waste of storage to put RawMaps under
versioning too.
2021-09-06 15:46:33 -07:00
Dustin Carlino
0ad76921fd
Don't crash in map_editor when we encounter overlapping OSM ways; skip that intersection and print loudly.
2021-09-04 10:43:14 -07:00
Dustin Carlino
dcf84d3b10
Rewrite turn restrictions to handle collapsed roads. Lake Wash Blvd / Madison revealed this problem.
...
Regenerating everything now...
2021-08-03 00:07:49 -07:00
Dustin Carlino
163244ace9
Trim dead-end cycleway and service road stubs. Not regenerating yet, but
...
spot checked in Tempe and the UDistrict.
2021-07-27 11:13:47 -07:00
Dustin Carlino
3e26c6489a
Run merging in the map editor, to reproduce the order that'll happen when importing. #654
2021-07-27 09:53:51 -07:00
Dustin Carlino
2538309c76
Automatically look for short roads near traffic signals and opt them into merging! #654
...
Manually invoked heuristic for the moment, and has some issues, but a
start.
2021-07-21 11:34:04 -07:00
Dustin Carlino
6f549e5747
Debug how roads are being ordered around an intersection, and restore map_editor's ability to preview one intersection with the debugging geometry. #654
2021-07-20 10:08:02 -07:00
Dustin Carlino
c28fef1752
By the power of my Mammal Hands, I will figure this out. #654
2021-07-19 15:07:10 -07:00
Dustin Carlino
b925f0c015
Add a button to reload RawMap in editor, effectively making a way to undo a tested merge operation. #654
2021-07-11 12:29:45 -07:00
Dustin Carlino
1539091453
Import Loop 101, adding an option to skip local roads to cut down map
...
size.
2021-07-08 10:25:36 -07:00
Dustin Carlino
175f5d411a
Mark individual road segments as junctions or not in the RawMap editor. The RawMap can be saved temporarily and converted fully, effectively resulting in a local workflow for quickly trying out geometry edits in OSM without upstreaming anything.
2021-05-18 15:23:28 -07:00
Dustin Carlino
27da792df6
cargo fmt
2021-05-15 16:28:50 -07:00
Vinzent Steinberg
9d17faa878
Prefer slices over reference to owned type
2021-05-15 14:24:08 -07:00
Vinzent Steinberg
fd3b0e2a14
Fix compilation failures and most clippy warnings ( #642 )
...
* abstutil: Fix compilation failure
* map_gui: Fix compilation
* traffic_signal_data: Fix compilation failure
* map_model: Fix compilation failure
* abstutil: Fix doctests
* abstio: Fix most clippy warnings
* abstutil: Fix most clippy warnings
* collisions: Fix clippy warning
* convert_osm: Fix clippy warnings
* sim: Fix most clippy warnings
* geom: Fix clippy warnings
* kml: Fix clippy warnings
* map_model: Fix most clippy warnings
* fifteen_min: Fix clippy warnings
* game: Fix many clippy warnings
* Disable some noisy clippy warnings
* headless: Fix clippy warnings
* importer: Fix clippy warnings
* map_editor: Fix clippy warnings
* map_gui: Fix clippy warnings
* osm_viewer: Fix clippy warnings
* parking_mapper: Fix most clippy warnings
* popdat: Fix clippy warnings
* santa: Fix clippy warnings
* sumo: Fix clippy warnings
* traffic_seitan: Fix clippy warning
* updater: Fix clippy warnings
* widgetry: Fix clippy warnings
* tests: Fix some clippy warnings
* Fix compilation on stable Rust
* Simplify unwrapping
* Make use of `Entry` more readable
* Fix formatting
* Fix code that was broken in the refactoring
* Apply cargo +stable fmt
* Fix code that was broken in the refactoring, second try
* Remove `Default` impls that are equivalent to `new`
* Remove obsolete clippy wrapper
* Avoid turbofish
* Prefer `unwrap_or_else` over allowing `clippy::or_fun_call`
* Remove redundant `into_iter`
* Fix typo
* Prefer `&& false` over commenting code out
* Fix some clippy warnings
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2021-05-14 08:32:56 -07:00
Dustin Carlino
2c5e0dae03
Fix static trait object method warning that we're now hitting in Rust 1.52
...
The <dyn ...> syntax is gross, but I don't think there's a way to avoid
this without defining a differently named empty struct and putting the
static method on that
2021-05-11 12:31:58 -07:00
Dustin Carlino
5186957ce4
Store a generic type in the Spinner widget. ( #631 )
2021-04-29 11:35:22 -07:00
Dustin Carlino
bc591c1b5f
Plumb back the widget name in Outcome::Changed
2021-04-22 13:09:32 -07:00
Dustin Carlino
ff039f017a
Let Spinner know its own name
2021-04-22 13:09:32 -07:00
Dustin Carlino
4ef04f5bd1
Change road incline calculations to be stored in RawMap. Previously, the
...
"rise / run" calculation used the trimmed road center-lines, which don't
match up with the elevation at each original intersection point.
Also handle infinity in the output and reduce the resolution of the
query from every 1m to every 5m.
Regenerate all maps due to the map format change. Try bringing in
elevation data for all of Seattle using the LIDAR source, since
the data quality assessed in eldang/elevation_lookups#12 seems to be
similar, and LIDAR is way faster than contours.
2021-03-23 22:47:52 -07:00
Michael Kirk
af079c24e6
rename txt.add -> txt.add_line
2021-03-19 17:48:30 -07:00
Michael Kirk
affd582093
more concise Text
/ tooltip()
2021-03-19 16:48:54 -07:00
Dustin Carlino
df58528d79
Scrape elevation_lookups output, filling out the elevation just at intersections. #82
...
Not regenerating all maps yet.
2021-03-18 17:48:33 -07:00
Dustin Carlino
ffc4f4222d
Remove the old SRTM code, which has always been broken. Remove the elevation from importer config; the new approach will detect the right data source to use automatically using the bbox. #82
2021-03-18 10:14:43 -07:00
Dustin Carlino
65d7bc5c8e
Rename {Text,TextSpan}::draw to into_widget, for consistency. #253
2021-03-09 09:59:30 -08:00
Dustin Carlino
a4a20ce1e5
draw_text renamed to text_widget, for consistency. #253
2021-03-09 09:56:41 -08:00
Dustin Carlino
081819d86b
ATTEMPT: Don't use Bezier curves for right/left turns at tiny
...
intersections. They wind up looping back on themselves in a nonsensical
way, causing vehicles to visually glitch when moving through.
This causes lakeslice and rainier to gridlock, due to the magic of
emergent behavior. I think I upstreamed an OSM fix for lakeslice, but I
need to work on rainier before enabling this code.
2021-03-01 18:30:24 -08:00
Michael Kirk
86799e2832
Remove StyledButtons - instead implement everything on the individual
...
ButtonStyle
2021-02-27 21:08:26 -08:00
Michael Kirk
cee0e5dbbd
Use btn_primary.* methods instead of btn_primary_*
2021-02-27 21:08:26 -08:00
Michael Kirk
87a1a3f027
fix outline for spinner (without crashing!) and cache drawable
2021-02-27 15:29:03 -08:00
Dustin Carlino
603717a560
Remove the separate_cycleways experiment flag. Always import cyclepaths
...
mapped as separate OSM ways in all maps!!! #330
2021-02-26 14:58:57 -08:00
Michael Kirk
4b2f3888ed
replace btn_solid w/ primary/outline as appropriate
2021-02-26 14:05:19 -08:00
Michael Kirk
d774aeae44
rename toggle/checkbox
2021-02-24 14:59:47 -08:00
Michael Kirk
3ab7fc4361
Fix tooltips and hotkey for day-theme ( #528 )
2021-02-24 10:52:57 -08:00
Michael Kirk
e6ed2e67de
Collapse button styles to be theme specified (no visible changes).
...
Button colors are now determined by the color scheme, but for now all
schemes are hardcoded to use the same "night" button colors. Read on for
rationale...
Previously, which button colors to use (dark/light) was specified inline
while building the UI.
Eventually we want to live in a world where color scheme determines:
- panel colors
- button colors
- text colors
The theme could already choose panel colors easily enough, but because
the buttons and text were not determined by theme, choosing anything
other than a black or dark grey panel color makes the buttons and text
unreadable.
This PR tackled the themeable "button colors" portion, but all themes
continue to use the "night" colors for now, because using the actual
"day" colors would still make the text unreadable.
next up: themeable text!
The one intentional regression is within the pregame tutorial,
which has always been styled differently from the rest of the app. An
expeditious hack has caused the prev/next/continue buttons to lose their
visible hover state. I'll restore this upon completing the day theme
work.
2021-02-23 09:52:33 -08:00
Dustin Carlino
f4103cf1fe
Redraw the intersection in map_editor when deleting or creating a road.
...
[rebuild] [release]
2021-02-21 10:17:38 -08:00
Dustin Carlino
add122549f
Modernize map_editor code: EventCtx should always be the first param
2021-02-20 10:03:06 -08:00
Dustin Carlino
1ed5e7c444
Add a toggle in the map_editor to show all intersection geometry or not. Subsumes the confusing previous preview tool.
2021-02-20 09:57:06 -08:00
Dustin Carlino
2c0334a37d
Make the map_editor read .osm directly
2021-02-20 09:31:52 -08:00
Dustin Carlino
15b154aa23
Explicitly draw the OSM boundary in the map_editor, so we can effectively create borders
2021-02-19 17:33:37 -08:00
Dustin Carlino
94c8a34804
More map_editor:
...
- toggle traffic signals / stop signs
- show the direction of a road when editing it, so left/right have
context
2021-02-19 16:54:22 -08:00