diff --git a/apps/maps/calitp_map_utils/__init__.py b/apps/maps/calitp_map_utils/__init__.py index 870de11355..e3f3525cc9 100644 --- a/apps/maps/calitp_map_utils/__init__.py +++ b/apps/maps/calitp_map_utils/__init__.py @@ -58,6 +58,7 @@ class HQTA(BaseModel): # Dict Props just mean properties are an arbitrary dictionary LAYER_FEATURE_TYPES = { LayerType.speedmaps: Feature[Polygon, Speedmap], + LayerType.speed_variation: Feature[Polygon, Dict], LayerType.hqta_areas: Feature[Union[Polygon, MultiPolygon], HQTA], LayerType.hqta_stops: Feature[Point, HQTA], LayerType.state_highway_network: Feature[Union[Polygon, MultiPolygon], Dict], diff --git a/apps/maps/src/routes/+page.svelte b/apps/maps/src/routes/+page.svelte index 161dd996e4..3d0c9397c8 100644 --- a/apps/maps/src/routes/+page.svelte +++ b/apps/maps/src/routes/+page.svelte @@ -189,13 +189,12 @@ } if (layerType === "speed_variation") { - const { route_short_name, fast_slow_ratio, p20_mph, p80_mph, trips_per_hour, shape_id, stop_sequence} = feature.properties; + const { stop_name, stop_id, route_short_name, route_id, fast_slow_ratio, p20_mph, p80_mph, trips_per_hour, shape_id, stop_sequence} = feature.properties; - // TODO: replace route_short_name with actual fields return { html: `

- ${route_short_name ?? 'Non-stop segment'} + ${stop_name ?? 'Non-stop segment'} p80p20 @@ -214,11 +213,11 @@
  • Stop ID
    -
    ${route_short_name ?? '\u2014'}
    +
    ${stop_id ?? '\u2014'}
  • Route ID
    -
    ${route_short_name ?? '\u2014'}
    +
    ${route_id ?? '\u2014'}
  • Trips/Hour
    diff --git a/apps/maps/src/state.ts b/apps/maps/src/state.ts index 7ff713363f..61bca406cc 100644 --- a/apps/maps/src/state.ts +++ b/apps/maps/src/state.ts @@ -5,7 +5,7 @@ /* Do not modify it by hand - just update the pydantic models and then re-run the script */ -export type LayerType = "speedmap" | "hqta_areas" | "hqta_stops" | "state_highway_network"; +export type LayerType = "speedmap" | "speed_variation" | "hqta_areas" | "hqta_stops" | "state_highway_network"; export interface BasemapConfig { url: string;