Skip to content

Commit

Permalink
pairing session tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
atvaccaro committed Jun 28, 2023
1 parent 5e9399d commit 9159e10
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions apps/maps/calitp_map_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
9 changes: 4 additions & 5 deletions apps/maps/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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: `
<h2 class="has-text-weight-bold has-text-teal-bold">
${route_short_name ?? 'Non-stop segment'}
${stop_name ?? 'Non-stop segment'}
<span class="tag ml-2">
<i class="fas fa-circle mr-2" style="color: rgb(${getColor(feature)})"></i>
<span class="has-text-weight-normal"><sup>p80</sup> &#8260; <sub>p20</sub> </span>
Expand All @@ -214,11 +213,11 @@
</li>
<li class="tooltip-meta-item">
<div class="tooltip-meta-key">Stop ID</div>
<div class="tooltip-meta-value">${route_short_name ?? '\u2014'}</div>
<div class="tooltip-meta-value">${stop_id ?? '\u2014'}</div>
</li>
<li class="tooltip-meta-item">
<div class="tooltip-meta-key">Route ID</div>
<div class="tooltip-meta-value">${route_short_name ?? '\u2014'}</div>
<div class="tooltip-meta-value">${route_id ?? '\u2014'}</div>
</li>
<li class="tooltip-meta-item">
<div class="tooltip-meta-key">Trips/Hour</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/maps/src/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9159e10

Please sign in to comment.