Skip to content
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

Support deck.gl v9 #112

Merged
merged 4 commits into from
May 20, 2024
Merged
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
4 changes: 2 additions & 2 deletions examples/linestring/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
import { createRoot } from "react-dom/client";
import { StaticMap, MapContext, NavigationControl } from "react-map-gl";
import DeckGL, { Layer, PickingInfo } from "deck.gl/typed";
import DeckGL, { Layer, PickingInfo } from "deck.gl";
import { GeoArrowPathLayer } from "@geoarrow/deck.gl-layers";
import * as arrow from "apache-arrow";

Expand Down Expand Up @@ -57,7 +57,7 @@ function Root() {
getColor: [255, 0, 0],
widthMinPixels: 1,
pickable: true,
})
}),
);

return (
Expand Down
2 changes: 1 addition & 1 deletion examples/linestring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@geoarrow/deck.gl-layers": "../../",
"apache-arrow": ">=14",
"deck.gl": "^8.9.23",
"deck.gl": "^9.0.12",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^5.3.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/multilinestring/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
import { createRoot } from "react-dom/client";
import { StaticMap, MapContext, NavigationControl } from "react-map-gl";
import DeckGL, { Layer } from "deck.gl/typed";
import DeckGL, { Layer } from "deck.gl";
import { GeoArrowPathLayer } from "@geoarrow/deck.gl-layers";
import * as arrow from "apache-arrow";

Expand Down
2 changes: 1 addition & 1 deletion examples/multilinestring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"apache-arrow": ">=14",
"deck.gl": "^8.9.23",
"deck.gl": "^9.0.12",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^5.3.0"
Expand Down
6 changes: 3 additions & 3 deletions examples/multipoint/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
import { createRoot } from "react-dom/client";
import { StaticMap, MapContext, NavigationControl } from "react-map-gl";
import DeckGL, { Layer } from "deck.gl/typed";
import DeckGL, { Layer } from "deck.gl";
import { GeoArrowScatterplotLayer } from "@geoarrow/deck.gl-layers";
import * as arrow from "apache-arrow";

Expand Down Expand Up @@ -29,7 +29,7 @@ function Root() {
if (info.object) {
// eslint-disable-next-line
alert(
`${info.object.properties.name} (${info.object.properties.abbrev})`
`${info.object.properties.name} (${info.object.properties.abbrev})`,
);
}
};
Expand Down Expand Up @@ -65,7 +65,7 @@ function Root() {
radiusMinPixels: 4,
getPointRadius: 10,
pointRadiusMinPixels: 0.8,
})
}),
);

return (
Expand Down
2 changes: 1 addition & 1 deletion examples/multipoint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"apache-arrow": ">=14",
"deck.gl": "^8.9.23",
"deck.gl": "^9.0.12",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^5.3.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/multipolygon/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
import { createRoot } from "react-dom/client";
import { StaticMap, MapContext, NavigationControl } from "react-map-gl";
import DeckGL, { Layer, PickingInfo } from "deck.gl/typed";
import DeckGL, { Layer, PickingInfo } from "deck.gl";
import { GeoArrowSolidPolygonLayer } from "@geoarrow/deck.gl-layers";
import * as arrow from "apache-arrow";

Expand Down Expand Up @@ -58,7 +58,7 @@ function Root() {
getFillColor: table.getChild("pop_colors")!,
pickable: true,
autoHighlight: true,
})
}),
);

return (
Expand Down
2 changes: 1 addition & 1 deletion examples/multipolygon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@geoarrow/deck.gl-layers": "../../",
"apache-arrow": ">=14",
"deck.gl": "^8.9.23",
"deck.gl": "^9.0.12",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^5.3.0"
Expand Down
6 changes: 3 additions & 3 deletions examples/point/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
import { createRoot } from "react-dom/client";
import { StaticMap, MapContext, NavigationControl } from "react-map-gl";
import DeckGL, { Layer, PickingInfo } from "deck.gl/typed";
import DeckGL, { Layer, PickingInfo } from "deck.gl";
import { GeoArrowScatterplotLayer } from "@geoarrow/deck.gl-layers";
import * as arrow from "apache-arrow";

Expand Down Expand Up @@ -56,11 +56,11 @@ function Root() {
data: table,
// Pre-computed colors in the original table
getFillColor: table.getChild("colors")!,
opacity: 0.01,
opacity: 0.1,
getRadius: ({ index, data }) => {
const recordBatch = data.data;
const row = recordBatch.get(index)!;
return row["avg_d_kbps"] / 10;
return row["avg_d_kbps"] / 50;
},
radiusMinPixels: 0.1,
pickable: true,
Expand Down
4 changes: 3 additions & 1 deletion examples/point/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/compression": "^4.1.4",
"@loaders.gl/crypto": "^4.1.4",
"apache-arrow": ">=14",
"deck.gl": "^8.9.23",
"deck.gl": "^9.0.12",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^5.3.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/polygon/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
import { createRoot } from "react-dom/client";
import { StaticMap, MapContext, NavigationControl } from "react-map-gl";
import DeckGL, { Layer, PickingInfo } from "deck.gl/typed";
import DeckGL, { Layer, PickingInfo } from "deck.gl";
import { GeoArrowPolygonLayer } from "@geoarrow/deck.gl-layers";
import * as arrow from "apache-arrow";

Expand Down
2 changes: 1 addition & 1 deletion examples/polygon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@geoarrow/deck.gl-layers": "../../",
"apache-arrow": ">=14",
"deck.gl": "^8.9.23",
"deck.gl": "^9.0.12",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^5.3.0"
Expand Down
Loading
Loading