-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix thumbnail error in previous analysis #492
Conversation
✅ Deploy Preview for veda-ui ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Issue: #455 |
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.
This looks super cool 🤘
const src = `https://api.mapbox.com/styles/v1/covid-nasa/cldac5c2c003k01oebmavw4q3/static/geojson(${encoded})/auto/480x320?access_token=${process.env.MAPBOX_TOKEN}`; | ||
// If more than 8000 chars the request will fail. | ||
// In this case simplify and show a bounding box. | ||
if (encoded.length > 8000) { |
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 would be nice to store that value in a self-describing constant.
const makeCorner = (p1, p2, p3) => ({ | ||
type: 'Feature', | ||
properties: { | ||
'stroke-width': 8, |
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.
Is that value related to the generated thumbnail zoom level? In that case, isn't there a risk of having visually different stroke widths?
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.
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.
For completeness:
the stroke width is dependent on the image size. In this case it's 480x320 (but used in a smaller size) which is why it has such a high value (8)
Co-authored-by: Erik Escoffier <erik@developmentseed.org>
@nerik I had definitely not understood that. 😅 Addressed |
I picked this one up since it was a quick win.
When the encode polygon is too complex I'm getting the bounding box and showing the corners (kind of a scope).
I decided on the corners instead of a polygon, so that a bounding box polygon is not confused with a square-ish AOI.
Thoughts?