mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-13 22:03:13 -06:00
The auto-framing fitted the view to whatever warning polygons were active, so a storm a few counties away pulled the frame out to cover it and the configured area shrank to an unreadable corner of a half-state view. On signage that is read at a glance, a map that wanders is worse than one that shows less. Framing is now centred and bounded: - The map never pans. The centre stays on the configured point and only the zoom responds, because the box handed to fitBounds is symmetric about home. - Zoom-out is capped at `max_counties` (default 2) county-widths in every direction, with longitude scaled by cos(lat) so the budget is the same distance on the ground north and south. - Warnings entirely outside that box are not chased at all; the configured view is held. Warnings clearing returns to it rather than staying parked on the last storm. - A floor on the frame keeps one small cell overhead from zooming to street level, and fit padding drops to 24px, which on a PiP-sized overlay was discarding a third of the width per side. The overlay assets are served max-age=14400, so a player that had already loaded them kept the old copy for four hours and silently ignored a redeploy. The page URL and its script tag now carry a version, documented to be bumped together. Tests cover the invariants against the shipped frameFor source rather than a copy of it: centred after reframing, capped at the county budget, small cells floored, distant storms not chased.
25 lines
655 B
JSON
25 lines
655 B
JSON
{
|
|
"mode": "on_warning",
|
|
|
|
"api_base": "https://signage.example.com",
|
|
"api_token": "st_REPLACE_WITH_A_FULL_SCOPE_TOKEN",
|
|
"overlay_base_url": "https://signage.example.com/radar-overlay.html",
|
|
"device_id": "DEVICE_OR_GROUP_ID",
|
|
|
|
"area_label": "Milwaukee County, WI",
|
|
"lat": 43.0389,
|
|
"lon": -87.9065,
|
|
"zoom": 8,
|
|
"max_counties": 2,
|
|
"states": ["WI"],
|
|
"events": ["Tornado Warning", "Severe Thunderstorm Warning", "Flash Flood Warning", "Flood Warning"],
|
|
|
|
"poll_interval_sec": 60,
|
|
"position": "bottom-right",
|
|
"width": 760,
|
|
"height": 540,
|
|
"border_radius": 12,
|
|
|
|
"noaa_user_agent": "ScreenTinker-Weather-Radar (you@example.com)"
|
|
}
|