Skip to content

Map View

Chris Nighswonger edited this page Apr 2, 2026 · 1 revision

Map View

The Map View is an interactive full-page weather map that displays nearby station observations, pressure isobars, and NWS alert polygons centered on your station's location.

Enabling

Enable the map in Settings > Features by toggling map_enabled, or via the API:

curl -s -X PUT "$BASE/api/config" \
  -H "Content-Type: application/json" \
  -d '[{"key":"map_enabled","value":true}]'

Once enabled, the Map page appears in the sidebar navigation.

Features

Station Observations

The map displays nearby weather stations from two data sources:

  • IEM ASOS/COOP — airport and cooperative observer stations via the Iowa Environmental Mesonet API
  • APRS/CWOP — citizen weather observer stations via APRS-IS

Each station is shown as a colored pill badge displaying the selected metric (temperature, wind speed, or precipitation). Stations load dynamically based on zoom level — zooming in shows more stations in a tighter area, zooming out shows fewer stations across a wider region.

Pressure Isobars

Pressure contour lines are computed server-side using IDW (inverse distance weighting) interpolation of nearby station barometric readings, with marching squares contour extraction. Isobars are drawn at configurable intervals (default 1 hPa) with halo outlines for contrast against any base layer. Even-hPa levels are labeled inline.

NWS Alert Polygons

Active NWS weather alerts for the station area are drawn as color-coded polygons on the map, categorized by severity. Alerts refresh every 2 minutes.

Controls

  • Base layer: Roads (default), Map, Satellite, Terrain
  • Display mode: Temperature, Wind, or Precipitation — controls what value is shown on station badges
  • Isobars: Toggle pressure contour overlay
  • Alerts: Toggle NWS alert polygon overlay

Zoom and Coverage

  • Minimum zoom: level 7 (~450 mile radius)
  • Maximum station density increases as you zoom in
  • Server-side spatial thinning ensures even station distribution at every zoom level

Configuration

Key Default Description
map_enabled false Enable the Map page
map_isobar_interval 1 Isobar contour interval (hPa)
map_default_layer "Roads" Default base map layer
map_max_radius 450 Maximum station search radius (miles)

API Endpoints

All map endpoints are public (no authentication required) when the map is enabled:

  • GET /api/map/nearby-stations — station observations within radius
  • GET /api/map/alerts — NWS alert polygons
  • GET /api/map/isobars — pressure isobar contour data

See API Reference for details.

Caching

  • Station and isobar data are cached for 5 minutes
  • NWS alerts refresh every 2 minutes
  • APRS/CWOP stations have a 2-hour TTL in the persistent disk cache

Screenshots

See the Screenshots page for visual examples.

Clone this wiki locally