Architecture
βββββββββββββββ HTTPS/JSON ββββββββββββββββ
β 511 Ontario ββββββββββββββββββββββΊβ β
β 511 Quebec β GeoJSON / Open511 β FeedManager ββββΊ Core Data βββΊ MapView (CoT pins)
β DriveBC ββββββββββββββββββββββΊβ (polling) β β
β 511 Alberta β β β βΌ
β Alert Ready β Atom + GeoRSS β (filtering) β Push Notification
β NRCAN Fires β GeoJSON / WFS β β (new incidents)
β ADSB.lol β JSON ββββββββββββββββ
βββββββββββββββ
ββββββββββββββββ
βββββββββββββββ MKTileOverlay XYZ β WeatherMgr ββββΊ MapView (tile overlay)
β ECCC GeoMet ββββββββββββββββββββββΊβ (tile cache β
β RainViewer β β 10 min TTL)β
β OpenWeather β ββββββββββββββββ
βββββββββββββββ
ββββββββββββββββ
βββββββββββββββ HTTPS/JSON β CameraManagerββββΊ MapView (camera pins)
β ON/AB/BC/QC ββββββββββββββββββββββΊβ (per-prov. ββββΊ CameraViewerSheet
β 511 cameras β β cache) β (still / video)
βββββββββββββββ ββββββββββββββββ
511 road incidents (ON, QC, BC, AB), Alert Ready emergency alerts, active wildfires, earthquakes, hurricanes, and severe weather alerts. No account, no API key, no subscription.
ADS-B aircraft tracking, AIS vessel tracking, weather radar overlays, and highway traffic cameras. Requires an active Live Data monthly or yearly subscription.
Feed Sources
| Feed | Tier | API | Format | Data |
|---|---|---|---|---|
| Ontario 511 | Free | 511on.ca/api/v2 | JSON | Road incidents, closures, construction |
| Quebec 511 | Free | transports.gouv.qc.ca | GeoJSON (WFS) | Road incidents |
| British Columbia | Free | api.open511.gov.bc.ca | Open511 JSON | Road incidents with full event details |
| Alberta 511 | Free | 511.alberta.ca/api/v2 | JSON | Road incidents |
| Alert Ready | Free | rss.naad-adna.pelmorex.com | Atom + GeoRSS | Amber alerts, severe weather, wildfires, evacuations, earthquake EEW |
| Active Wildfires | Free | cwfis.cfs.nrcan.gc.ca | GeoJSON (WFS) | Canadian wildfire hotspots |
| ADS-B Aircraft | Live Data | api.adsb.lol | JSON | Live aircraft positions, registration, type, operator, route |
| AIS Vessels | Live Data | aisstream.io | WebSocket | Live ship positions worldwide, name, MMSI, heading, speed, destination |
| Weather Radar (ECCC) | Live Data | geo.weather.gc.ca/geomet | XYZ tiles (WMS) | Radar precipitation, snow, satellite |
| Weather Radar (RainViewer) | Live Data | api.rainviewer.com | XYZ tiles | Global radar precipitation |
| Weather Radar (OpenWeatherMap) | Live Data | tile.openweathermap.org | XYZ tiles | Precipitation, wind, temp, pressure |
| Traffic Cameras (ON) | Live Data | 511on.ca | JSON + JPEG/video | Highway cameras with still image and video playback |
| Traffic Cameras (AB) | Live Data | 511.alberta.ca | JSON + JPEG/video | Highway cameras |
| Traffic Cameras (BC) | Live Data | api.open511.gov.bc.ca | Open511 JSON | Highway cameras |
| Traffic Cameras (QC) | Live Data | Quebec 511 API | JSON + JPEG/video | Highway cameras with multi-angle support |
βοΈ ADS-B Aircraft Tracking Live Data
Live aircraft positions are fetched from ADSB.lol at a configurable interval (default 10 seconds). Each aircraft appears as a CoT marker on the map with a directional icon that rotates with heading.
Flight Enrichment
For each aircraft, two additional lookups run concurrently:
- Basic info (
/v2/hex/{icao24}) β registration, ICAO type code, model description, and operator/airline name - Route info (
/api/0/route/{callsign}) β origin and destination IATA codes, airport names, and coordinates
Results are cached for the lifetime of the app session. Tap an aircraft to see the "Flight Info" card in the detail sheet.
π’ AIS Vessel Tracking Live Data
Live ship positions are streamed from AISStream.io via WebSocket. Requires an active Live Data subscription. Vessels appear as CoT markers on the map with a ship icon that rotates with heading.
- Worldwide coverage β the bounding box follows your map view. Pan anywhere in the world to see ships in that area.
- Vessel watchlist β star β any vessel to track it globally regardless of your map position (up to 50 MMSIs).
- Search by name or MMSI β find any vessel that's appeared on screen and add it to your watchlist.
- Aircraft & Vessel list β searchable, filterable list in Map Filter with last-updated timestamps.
- Two modes β direct WebSocket (built-in, just an API key) or poll a vessel-monitor Docker service for server-side caching.
π Subscriptions & API Keys
Free feeds require no account or API key. Live Data feeds are unlocked by a Live Data subscription β no per-feed API key setup required.
| Feature | Tier | Access |
|---|---|---|
| 511 Road Incidents | Free | No account needed |
| Alert Ready | Free | No account needed |
| Active Wildfires | Free | No account needed |
| ADS-B Aircraft | Live Data | Live Data subscription |
| AIS Vessel Tracking | Live Data | Live Data subscription |
| Weather Radar (all backends) | Live Data | Live Data subscription |
| Traffic Cameras (all provinces) | Live Data | Live Data subscription |
Map Overlays on Selection
- Heading projection β cyan dashed line showing predicted position at 15-minute intervals for the next 2 hours based on current speed and heading
- Route arc β faint geodesic great-circle arc between origin and destination airports when route data is available
- Pinnable routes β pin button keeps both overlays visible after deselecting the aircraft
Map Filters
- Altitude range (min/max, respects user altitude unit preference)
- Per-type toggles: fixed-wing, helicopter, UAV, glider, balloon
π§οΈ Weather Radar Overlay Live Data
Precipitation tiles are fetched as a standard MKTileOverlay and composited directly on the map. Tiles are cached in memory for 10 minutes to avoid redundant network requests.
Backends
| Backend | Key Required | Available Layers |
|---|---|---|
| ECCC GeoMet | None | Radar precipitation, snow, satellite (GOES), surface analysis |
| RainViewer | None | Global radar precipitation (infrared) |
| OpenWeatherMap | Optional (free tier) | Precipitation, wind speed, temperature, pressure |
Backend and layer are selected in the Overlay Manager. Opacity is adjustable. Radar can be toggled independently of other overlays.
π· Traffic Cameras Live Data
Highway camera locations are loaded from provincial 511 APIs and rendered as green pins on the map. Tap any pin to open the camera viewer.
Camera Viewer
- Still image mode β JPEG snapshot with manual refresh
- Video mode β native AVPlayer video stream where available
- Multi-angle cameras β segmented picker shows all available directions (Ontario
Views[], Quebec cameras grouped by ID)
Province Coverage
| Province | Source | Notes |
|---|---|---|
| Ontario | 511on.ca | Multi-direction via Views[] |
| Alberta | 511.alberta.ca | JPEG still + video URL |
| British Columbia | api.open511.gov.bc.ca | Open511 format |
| Quebec | Quebec 511 | GetImage.ashx (JPEG) + camera.ashx?format=mp4 (video); grouped by NumeroCamera |
CoT Type Mapping
Each feed incident is converted to a CoT marker with an appropriate type and icon:
| Incident Type | CoT Type | Icon |
|---|---|---|
| Road Closure | b-r-.-o-c | xmark.octagon.fill π |
| Construction | b-r-.-o-w | cone.fill πΆ |
| Accident/Incident | b-r-.-o-a | exclamationmark.triangle.fill β οΈ |
| Weather Hazard | b-r-.-o-h | cloud.bolt.fill βοΈ |
| Wildfire | b-n-.-f | flame.fill π₯ |
Example: Ontario 511 Response β CoT Marker
API Response (simplified)
{
"ID": 86216,
"RoadwayName": "HWY 17",
"DirectionOfTravel": "Eastbound",
"Description": "Daily Construction on HWY 17 Eastbound...",
"EventType": "CONSTRUCTION",
"Severity": "Moderate",
"Latitude": 48.79229,
"Longitude": -87.38264,
"LastUpdated": 1757532060
}
Resulting CoT Marker
COTData {
cotUid: "511on-86216"
callsign: "HWY 17 Eastbound"
cotType: "b-r-.-o-w" // construction
latitude: 48.79229
longitude: -87.38264
icon: "cone.fill"
remarks: "Daily Construction on HWY 17 Eastbound..."
staleDate: 2026-09-15T00:00:00Z // PlannedEndDate
}
Example: Alert Ready Entry
NAAD Atom Feed Entry (simplified)
<entry>
<title>yellow advisory - fog - in effect</title>
<author><name>Environment Canada</name></author>
<georss:polygon>53.03 -115.15 53.01 -115.17 ... 53.03 -115.15</georss:polygon>
<category term="severity=Moderate"/>
<category term="event=fog"/>
<category term="status=Actual"/>
<category term="language=en-CA"/>
<summary>Patchy fog has developed... near zero visibilities...</summary>
</entry>
Processing
- Parse Atom XML with GeoRSS polygon coordinates
- Compute centroid of polygon for marker placement
- Map event type ("fog") β CoT type (
b-w-.-a) and icon (cloud.fog.fill) - Filter by proximity to user location (configurable radius)
- Send local push notification if new
Proximity Filtering
For each incident:
1. Calculate distance from user's GPS location
2. If distance β€ configured alert radius β include
3. If active navigation route exists:
Sample every 10th route coordinate
If any sample β€ alert radius from incident β include
4. If user location unknown β exclude all (no flooding)
Reliability
- Retry on failure: Each API call retries up to 3 times with 5-second delay
- First-poll suppression: No notifications on first poll (seeds known IDs silently)
- Restart-safe: Known incident IDs loaded from Core Data on init β no re-notification after app restart
- Thread-safe: Known IDs protected with NSLock