尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Animated US weather radar on a map in one HTML file — a starter for the Splitshot Weather API. https://splitshotweather.com
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Animated US weather radar on a map, in one HTML file and about 80 lines of JavaScript. No build step, no framework, no bundler.
Real tiles from the API, composited at full colour depth. The basemap
under them is Esri's dark canvas; index.html ships with CARTO's, so your
ground will look slightly different. The radar is identical.
Built on the Splitshot Weather API — NOAA radar, rainfall, lightning, wind and temperature rendered as map tiles, plus point forecasts and history. This repo is the shortest path from an API key to something moving on a screen.
Get a key. splitshotweather.com — the trial is free and takes no card. Current limits are on the pricing page.
Paste it into config.js, replacing PASTE_YOUR_KEY_HERE.
Serve the folder and open it:
python3 -m http.server 8000
# then open http://localhost:8000
Opening index.html directly as a file:// URL will not work. index.html
uses an ES module to import config.js, and browsers refuse module imports over
file://. Any static server will do — the one-liner above, npx serve,
whatever you already run.
Two calls. Read the manifest, then load tiles.
The manifest tells you which frames exist right now:
curl -H "x-api-key: YOUR_KEY" \
https://api.splitshotweather.com/manifest/composite.json
{
"product": "composite",
"cadenceMinutes": 5,
"maxZoom": 8,
"units": "dBZ",
"frames": ["20261026-1945", "20261026-1950", ...], // observed, oldest first
"latest": "20261026-2140",
"forecast": [{ "ts": "20261026-2145", "leadMinutes": 5 }, ...],
"tileUrlTemplate": "/tiles/composite/{ts}/{z}/{x}/{y}.png",
"forecastTileUrlTemplate": "/tiles/composite-fcst/{ts}/{z}/{x}/{y}.png",
"legend": [{ "value": 5.0, "unit": "dBZ", "rgb": [126, 211, 126] }, ...]
}
Always read the manifest rather than deriving timestamps from the clock. Frames are published when the upstream data lands, which is not on a tidy schedule, and a guessed timestamp is a 404.
Then substitute a timestamp into the template and hand the result to your map
library as a raster source. That is all index.html does.
The legend array is the exact colour ramp the tiles were rendered with, so a
legend in your UI can be generated from it instead of hard-coded and drifting.
x-api-key: YOUR_KEY header | Use this wherever you control the request — the manifest fetch, /forecast, /history. |
?key=YOUR_KEY query string | For raster tiles, where the map engine issues the request and gives you no way to attach a header. |
The key is stripped at the edge before anything is cached or logged, and the tile cache key ignores it, so every customer shares one cached tile.
GET /manifest/{product}.json
GET /tiles/{product}/{ts}/{z}/{x}/{y}.png
GET /forecast/{lat},{lon}
GET /history/{lat},{lon}/{iso8601}
GET /points/lightning/{ts}.json lightning as GeoJSON points
GET /alerts active NWS alerts, as GeoJSON
GET /alerts/{lat},{lon} just the ones over one point
Products: composite (radar reflectivity), qpe-1h and qpe-24h (rainfall
accumulation), lightning, wind, temperature. Each has its own manifest, legend and
cadence — change PRODUCT in config.js to try one.
Full reference: splitshotweather.com/docs.html
Mount every frame, switch opacity. The obvious approach — one source whose
URL you rewrite on each step — makes the map tear down and refetch the entire
tile set every time, so scrubbing flickers and burns requests re-downloading
frames you just had. Mounting each frame as its own layer and flipping
raster-opacity is a GPU operation on tiles already in memory.
The cost is that all frames load up front. At 24 observed frames that is real, so a production app usually mounts a window around the current frame rather than the whole timeline.
A dark basemap. The radar ramp starts at light green. On a light basemap the weak returns — which are most of the pixels — wash out completely.
config.js puts the key in front-end JavaScript, which is fine for a demo you
run locally and wrong for anything you deploy. Anyone who opens devtools can
read it, and usage bills to you.
In production, keep the key on your server and proxy the tile requests. Your server attaches the key; the browser never sees it.
MIT — see LICENSE. Use it as a starting point, not as a dependency.
Issues and pull requests are welcome here. This directory is published from the API's own repository, so a fix lands next to the service it demonstrates.
Weather data is derived from NOAA / National Weather Service sources, which are in the public domain. The rendering is Splitshot Weather's. Note that the API is not for safety-of-life use — see the terms.