Skip to content

Commit

Permalink
Fix wasm inclusion so that it ends up in public/assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Clark committed Apr 12, 2024
1 parent fbf4b61 commit ed4a228
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"preview": "vite preview"
},
"dependencies": {
"@geoarrow/geoarrow-wasm": "~0.2.0-beta.3",
"maplibre-gl": "^4.1.0",
"pmtiles": "^3.0.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-map-gl": "^7.1.7",
"@geoarrow/geoarrow-wasm" : "~0.2.0-beta.3"
"react-map-gl": "^7.1.7"
},
"devDependencies": {
"@types/react": "^18.2.64",
Expand All @@ -26,7 +26,7 @@
"eslint-plugin-react": "^7.34.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"vite": "^5.1.6"
"vite": "^5.2.8"
},
"volta": {
"node": "20.11.1"
Expand Down
File renamed without changes.
Binary file removed site/public/example.parquet
Binary file not shown.
8 changes: 5 additions & 3 deletions site/src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import App from './App.jsx'
import './index.css'
import initWasm, {ParquetFile} from "@geoarrow/geoarrow-wasm/esm/index.js";


ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
Expand All @@ -15,8 +14,11 @@ await initWasm();

const url =
"https://overturemaps-us-west-2.s3.amazonaws.com/release/2023-11-14-alpha.0/theme=transportation/type=segment/part-00158-6cb89013-4ec2-4b94-8e4b-8e27c7d30865.c000.zstd.parquet";
// let exampleFile = await new ParquetFile('./example.parquet');
let exampleFile = await new ParquetFile(url);
// const wasmTable = await exampleFile.readRowGroups([0]);
const wasmTable = await exampleFile.readRowGroups([0], {
batch_size: 1024,
limit: 100,
offset: 0
});

console.log(wasmTable);

0 comments on commit ed4a228

Please sign in to comment.