@@ -3,9 +3,10 @@ import { Layer, type DeckProps } from "@deck.gl/core";
33import { GeoJsonLayer } from "@deck.gl/layers" ;
44import { MapboxOverlay } from "@deck.gl/mapbox" ;
55import { GeoArrowPolygonLayer } from "@geoarrow/deck.gl-layers" ;
6+ import { bbox as turfBbox } from "@turf/bbox" ;
67import bboxPolygon from "@turf/bbox-polygon" ;
78import { featureCollection } from "@turf/helpers" ;
8- import type { BBox , Feature , GeoJSON } from "geojson" ;
9+ import type { BBox , Feature , FeatureCollection , GeoJSON } from "geojson" ;
910import "maplibre-gl/dist/maplibre-gl.css" ;
1011import { useEffect , useRef , type RefObject } from "react" ;
1112import {
@@ -118,6 +119,7 @@ export default function Map() {
118119 updateTriggers : [ picked , items ] ,
119120 } ) ,
120121 ] ;
122+ console . log ( geojson ) ;
121123
122124 if ( stacGeoparquetTable ) {
123125 layers . push (
@@ -229,7 +231,11 @@ function useStacValueLayerProperties(
229231 filled : true ,
230232 } ;
231233 case "FeatureCollection" :
232- return { geojson : undefined , bbox : undefined , filled : undefined } ;
234+ return {
235+ geojson : value . features as Feature [ ] ,
236+ bbox : turfBbox ( value as FeatureCollection ) ,
237+ filled : true ,
238+ } ;
233239 }
234240 } else {
235241 return { geojson : undefined , bbox : undefined , filled : undefined } ;
0 commit comments