-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WV-3087 AERONET Layers Implementation #4987
Conversation
* Add AERONET descriptions * remove incorrect images * disable snapshots for AERONET layers * update data ranges * update text to include source
The application crashes as soon as I add an AERONET layer |
web/js/map/layerbuilder.js
Outdated
const date2 = new Date(date.toString()); | ||
date2.setHours(date.getHours() + 1); | ||
const urlParameters = `?year=${date.getUTCFullYear()}&month=${date.getUTCMonth() + 1}&day=${date.getUTCDate()}&year2=${date2.getUTCFullYear()}&month2=${date2.getUTCMonth() + 1}&day2=${date2.getUTCDate()}${isSubdaily ? `&hour=${date.getUTCHours()}&hour2=${date2.getUTCHours()}` : ''}&AOD15=1&AVG=${avg}&if_no_html=1`; | ||
const res = await fetch(source.url + urlParameters); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer using a template literal in this situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PatchesMaps line 551 here (const urlParameters = ...
) is already formatted as a template literal. Did you have feedback on how I wrote the template literal, or was your comment intended for a different line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was intended for line 552: ${source.url}${urlParameters}
is what I had in mind.
web/js/map/layerbuilder.js
Outdated
values = state.palettes.rendered[def.id].maps[1].entries.values; | ||
} | ||
|
||
const requestDate = util.toISOStringSeconds(util.roundTimeOneMinute(date)).slice(0, 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we rounding the time to the minute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do the same process for ttiler and xyz layers (as can be seen in this same file), so it was included to match those. I don't think it's needed though, and the other vector layers do not use it, so I'll remove this.
Description
This adds four new layers from AERONET in the form of special vector layers. These vector layers render as vector points, but are colored by a continuous color palette based on each vector point's value. This is a unique type of layer specific to only the AERONET layers, and as such the implementation is very custom-fit to it.
How To Test
git checkout wv-3014-aeronet-aod500nm
npm ci
npm run build
npm run watch