Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@deck.gl/extensions": "^9.1.14",
"@deck.gl/layers": "^9.1.14",
"@deck.gl/react": "^9.1.14",
"@deck.gl/widgets": "^9.1.14",
"@geoarrow/deck.gl-layers": "^0.3.1",
"@babel/runtime": "^7.26.0",
"@nextui-org/react": "^2.4.8",
Expand Down
11 changes: 10 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import { createRender, useModelState, useModel } from "@anywidget/react";
import type { Initialize, Render } from "@anywidget/types";
import Map from "react-map-gl/maplibre";
import DeckGL from "@deck.gl/react";
import { CompassWidget, FullscreenWidget } from "@deck.gl/react";
import DeckGL, { useWidget } from "@deck.gl/react";

Check failure on line 7 in src/index.tsx

View workflow job for this annotation

GitHub Actions / lint-and-test

'useWidget' is defined but never used
import { MapViewState, PickingInfo, type Layer } from "@deck.gl/core";
// import { FullscreenWidget } from "@deck.gl/widgets";
import { BaseLayerModel, initializeLayer } from "./model/index.js";
import type { WidgetModel } from "@jupyter-widgets/base";
import { initParquetWasm } from "./parquet.js";
Expand Down Expand Up @@ -142,6 +144,11 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [stateCounter, setStateCounter] = useState<Date>(new Date());

// const CompassWidget = (props) => {
// const widget = useWidget(UniversalCompassWidget, props);
// return null;
// };

useEffect(() => {
const loadAndUpdateLayers = async () => {
try {
Expand Down Expand Up @@ -280,6 +287,8 @@
mapStyle={mapStyle || DEFAULT_MAP_STYLE}
customAttribution={customAttribution}
></Map>
<CompassWidget id={`compass-${mapId}`} placement="top-left" />
<FullscreenWidget id={`fullscreen-${mapId}`} placement="top-left" />
</DeckGL>
</div>
</div>
Expand Down
Loading