Open shadkeene opened 2 weeks ago
Confirming we want to refer people to radar.weather.gov over the viewer?
@greg-does-weather for a use case where as a user I'm on beta.weather.gov looking at radar for a specific location, is it possible to link out to radar.weather.gov and use url parameters to show the same location and view? Or would it likely just be a generic link?
Yep, we can do that. radar.weather.gov takes a URL parameter that includes the center point, zoom level, and type of map to show, among other things.
Documenting here for posterity, the URL parameter is called settings
, and is v1_{ base64-encoded JSON string}
.
The JSON object looks like this:
{
agenda: {
id: 'weather',
center: [ -92.37, 44.64 ],
location: [ -100.405, 41.424 ],
zoom: 7.839999999999999,
layer: 'bref_qcd'
},
animating: false,
base: 'standard',
artcc: false,
county: false,
cwa: false,
rfc: false,
state: false,
menu: true,
shortFusedOnly: false,
opacity: {
alerts: 0.8,
local: 0.6,
localStations: 0.8,
national: 0.6 }
}
Getting the right settings string would be `?settings=v1_${ btoa(JSON.stringify(obj)) }`
We want to push folks to radar.weather.gov for more details and options for RADAR imagery, outside of the composite reflectivity mosaic that we're providing them.