basic map
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 4m54s

This commit is contained in:
Nicholas Orlowsky 2026-04-14 22:06:28 -04:00
parent 06cfac4b8e
commit 0698373151
No known key found for this signature in database
GPG key ID: A9F3BA4C0AA7A70B
4 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,4 @@
pub mod index;
pub mod route;
pub mod stop;
pub mod map;

View file

@ -57,6 +57,7 @@ async fn main() -> ::anyhow::Result<()> {
.service(controllers::stop::search_stops_html)
.service(controllers::stop::get_stop_table_html)
.service(controllers::index::get_index_html)
.service(controllers::map::get_map_element_html)
.service(actix_files::Files::new("/assets", "./assets"))
})
.bind(("0.0.0.0", 8080))?

View file

@ -99,6 +99,12 @@ pub struct StopSearchResults {
pub results: Vec<Stop>
}
#[derive(askama::Template)]
#[template(path = "map.html")]
pub struct MapTemplate {
pub locations: Vec<(f64,f64, String)>
}
pub fn build_timetables(directions: Vec<Direction>, trips: Vec<Trip>) -> Vec<TimetableDirection> {
let mut results = Vec::new();