US-GHG-Center / veda-config-ghg

Veda config for GHG
https://ghg-demo.netlify.app
Other
3 stars 14 forks source link

Analysis preset AOIs do nothing in https://earth.gov/ghgcenter #377

Closed slesaad closed 1 month ago

slesaad commented 1 month ago

Bug

In https://earth.gov/ghgcenter/exploration, selecting a preset AOI (Click Analyze an area and select for eg Alabama) does nothing.

Why

The network request shows that the app is looking for the respective geojson at https://earth.gov/public/geo-data/states/Alabama.geojson - which isn't the correct URL; it should instead be https://earth.gov/ghgcenter/public/geo-data/states/Alabama.geojson (missing /ghgcenter subpath) - coincidentally staging.earth.gov/ghgcenter works because the staging EIC dashboard when deployed, copied over the geo-data folder to staging.earth.gov/public/geo-data/... - so even tho it's looking at the wrong path, it finds the required files

slesaad commented 1 month ago

Probably needs to add PUBLIC_URL in this line ?

const presetFilePath = process.env.PUBLIC_URL + `/public/geo-data/states/`;
j08lue commented 1 month ago

coincidentally staging.earth.gov/ghgcenter works because the staging EIC dashboard when deployed, copied over the geo-data folder to staging.earth.gov/public/geo-data/...

💡