diff --git a/src/components/map.tsx b/src/components/map.tsx index 3361529..6ab11f3 100644 --- a/src/components/map.tsx +++ b/src/components/map.tsx @@ -119,7 +119,6 @@ export default function Map() { updateTriggers: [picked, items], }), ]; - console.log(geojson); if (stacGeoparquetTable) { layers.push( @@ -233,7 +232,10 @@ function useStacValueLayerProperties( case "FeatureCollection": return { geojson: value.features as Feature[], - bbox: turfBbox(value as FeatureCollection), + bbox: + (value.features.length > 0 && + turfBbox(value as FeatureCollection)) || + undefined, filled: true, }; } diff --git a/tests/app.spec.tsx b/tests/app.spec.tsx index c8ea0a9..6886295 100644 --- a/tests/app.spec.tsx +++ b/tests/app.spec.tsx @@ -41,3 +41,13 @@ test("loads CSDA Planet", async () => { .element(app.getByRole("heading", { hasText: "Planet" })) .toBeVisible(); }); + +test("loads NAIP stac-geoparquet", async () => { + window.history.pushState( + {}, + "", + "?href=https://raw.githubusercontent.com/developmentseed/labs-375-stac-geoparquet-backend/refs/heads/main/data/naip.parquet", + ); + const app = await renderApp(); + await expect.element(app.getByText(/stac-geoparquet/i)).toBeVisible(); +});