Struct map_model::city::City [−][src]
pub struct City { pub name: CityName, pub boundary: Polygon, pub areas: Vec<(AreaType, Polygon)>, pub districts: Vec<(MapName, Polygon)>, }
Expand description
A single city (like Seattle) can be broken down into multiple boundary polygons (udistrict, ballard, downtown, etc). The load map screen uses this struct to display the entire city.
Fields
name: CityName
boundary: Polygon
areas: Vec<(AreaType, Polygon)>
districts: Vec<(MapName, Polygon)>
The individual maps
Implementations
If there’s a single map covering all the smaller maps, use this.
Generate a city from a bunch of smaller, individual maps. The boundaries of those maps may overlap and may have gaps between them.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more