Open mbjones opened 1 year ago
I see that john refactored the app to take a lat/lon on the wxapp endpoint as:
/wxapp/getwxvar?lat=58.3&lon=-134.4
This should allow the app to work with a URL such as https://hwitw-dev.arcticdata.io/static/index.html?lat=58.3&lon=-134.4
Currently that puts up an error because the hwitw.wxdb
file has not yet been produced. Test again once tiletool completes its first pass.
This is now working to load the application with URLs of the form:
https://hwitw-dev.arcticdata.io/static/index.html?lat=58.3&lon=-134.4
However, loading the app without the lat/lon params results in a blank screen and a console error. Maybe it would be better to load Seldovia or some default if the params are not provided.
I like that idea. @hig314
Sounds good to me - Seldovia is obviously the center of the universe and should be the default location for everything.
I'll touch base with Katmai.
The current webapp hardcodes the data file to Seldovia.json. Instead, need to refactor the webapp to retrieve the data file from the
/wxapp/getwxvar
service as described in issue #4. Currently, this service is called without location parameters (lat and lon) on lines 95-99 ofwxgrid.js
, which depends on the hardcoded Seldovia response. In the refactor, we might enable several ways to pick a location:/static/index.html?vlat=58.3&vlong=-134.4
/wxapp/getwxvar?vlat=58.3&vlong=-134.4
to get the json file to be displayed