Station Types
Customize station behavior and catchment areas
The stations API lets you create station types with different catchment areas, transfer radii, and other behaviors.
Register a Station Type#
window.SubwayBuilderAPI.stations.registerStationType({
id: 'bus-hub',
name: 'Bus Connection Hub',
description: 'Station with bus connections extending catchment area',
catchmentMultiplier: 2.0, // 2x walking radius for origin/destination
transferRadiusMultiplier: 3.0, // 3x transfer walking radius
walkSpeedMultiplier: 1.5, // People walk faster
dwellTime: 30, // 30 seconds stop time
icon: 'Bus', // Curated Lucide icon name
color: '#22c55e' // Hex color for map marker
});Station Type Properties#
| Property | Type | Default | Description |
|---|---|---|---|
id | string | required | Unique identifier |
name | string | required | Display name |
description | string | optional | Tooltip description |
catchmentMultiplier | number | 1.0 | Multiplier for walking radius (base: 30 min) |
transferRadiusMultiplier | number | 1.0 | Multiplier for transfer radius (base: 10 min) |
walkSpeedMultiplier | number | 1.0 | Multiplier for walking speed (base: 1 m/s) |
dwellTime | number | 20 | Train stop time in seconds |
catchmentOverride | number | optional | Absolute catchment in seconds |
transferRadiusOverride | number | optional | Absolute transfer radius in seconds |
walkSpeedOverride | number | optional | Absolute walk speed in m/s |
icon | string | optional | Curated Lucide icon name for map marker (see UI Components guide) |
color | string | optional | Hex color for map marker |
Modify Existing Station Type#
window.SubwayBuilderAPI.stations.modifyStationType('standard', {
catchmentMultiplier: 1.5,
dwellTime: 25
});Get Station Types#
// Get all station types
const allTypes = window.SubwayBuilderAPI.stations.getStationTypes();
console.log(Object.keys(allTypes));
// Get specific station type
const busHub = window.SubwayBuilderAPI.stations.getStationType('bus-hub');
console.log(busHub.catchmentMultiplier); // 2.0Example Station Types#
Park and Ride#
Large catchment area for stations where people drive to.
window.SubwayBuilderAPI.stations.registerStationType({
id: 'park-and-ride',
name: 'Park & Ride',
description: 'Station with parking lot - serves wider suburban area',
catchmentMultiplier: 5.0, // 5x catchment (people drive here)
transferRadiusMultiplier: 1.0,
walkSpeedMultiplier: 1.0,
dwellTime: 25,
color: '#3b82f6'
});Express Station#
Minimal dwell time for express service.
window.SubwayBuilderAPI.stations.registerStationType({
id: 'express',
name: 'Express Station',
description: 'Limited stop station with faster boarding',
catchmentMultiplier: 0.8, // Smaller catchment
transferRadiusMultiplier: 1.0,
walkSpeedMultiplier: 1.0,
dwellTime: 10, // Quick 10 second stop
color: '#ef4444'
});Airport Terminal#
Slow walking but large catchment.
window.SubwayBuilderAPI.stations.registerStationType({
id: 'airport',
name: 'Airport Terminal',
description: 'Airport station with extended walking times',
catchmentMultiplier: 3.0,
transferRadiusMultiplier: 2.0,
walkSpeedMultiplier: 0.5, // Slow walking with luggage
dwellTime: 45, // Long dwell for luggage loading
color: '#0ea5e9'
});Transit Center#
Major transfer hub.
window.SubwayBuilderAPI.stations.registerStationType({
id: 'transit-center',
name: 'Transit Center',
description: 'Major hub with multiple transit connections',
catchmentMultiplier: 2.5,
transferRadiusMultiplier: 4.0, // Huge transfer radius
walkSpeedMultiplier: 1.2, // Motivated commuters
dwellTime: 35,
icon: 'building-2',
color: '#8b5cf6'
});Assigning Station Types#
Station types are assigned per-station in the station details panel. When multiple station types are registered, a dropdown selector appears allowing players to change each station's type.
Note: Changing a station's type immediately affects pathfinding calculations. The RAPTOR algorithm uses the new catchment/transfer radius values for routing.
How Catchment Works#
The catchment area determines how far passengers will walk to use a station:
- Base catchment: 1800 seconds (30 minutes) walking radius
- Base transfer radius: 600 seconds (10 minutes) for station-to-station transfers
- Base walk speed: 1 m/s
With catchmentMultiplier: 2.0, passengers will walk up to 60 minutes to reach this station.
With transferRadiusMultiplier: 3.0, passengers will walk up to 30 minutes to transfer at this station.