Skip to content

Commit

Permalink
Support deck.gl v9 (#112)
Browse files Browse the repository at this point in the history
* Support deck.gl v9

* working point demo

* bump to deckgl V9 (#124)

* fix arrow bundle

* v9 bump

* bump to latest and update luma resolutions to match

* revert version change

* update lockfile

---------

Co-authored-by: Kyle Barron <[email protected]>

---------

Co-authored-by: atmorling <[email protected]>
  • Loading branch information
kylebarron and atmorling authored May 20, 2024
1 parent c51c863 commit dabba35
Show file tree
Hide file tree
Showing 35 changed files with 2,817 additions and 2,304 deletions.
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

0 comments on commit dabba35

Please sign in to comment.