Skip to content

Commit 9df3dfc

Browse files
authored
bump pmtiles to v3.x (#220)
1 parent 58d859e commit 9df3dfc

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

app/package-lock.json

+21-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"ol-mapbox-style": "^12.0.0",
1717
"ol-pmtiles": "^0.2.0",
1818
"pixelmatch": "^5.3.0",
19-
"pmtiles": "^2.10.0",
19+
"pmtiles": "^3.0.4",
2020
"react": "^18.2.0",
2121
"react-dom": "^18.2.0",
2222
"react-dropzone": "^14.2.3",

app/src/MapViewComponent.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { stylefunction } from "ol-mapbox-style";
2424
import { PMTilesVectorSource } from "ol-pmtiles";
2525
import { useGeographic } from "ol/proj";
2626

27-
import { FileAPISource, PMTiles, Protocol } from "pmtiles";
27+
import { FileSource, PMTiles, Protocol } from "pmtiles";
2828
import { createHash, parseHash } from "./hash";
2929

3030
const GIT_SHA = (import.meta.env.VITE_GIT_SHA || "main").substr(0, 8);
@@ -331,7 +331,7 @@ export default function MapViewComponent() {
331331
});
332332

333333
const onDrop = useCallback((acceptedFiles: File[]) => {
334-
setDroppedArchive(new PMTiles(new FileAPISource(acceptedFiles[0])));
334+
setDroppedArchive(new PMTiles(new FileSource(acceptedFiles[0])));
335335
}, []);
336336

337337
const { getRootProps } = useDropzone({ onDrop });

0 commit comments

Comments
 (0)