@loaders.gl/flatgeobuf 4.2.0-alpha.6 → 4.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist.dev.js +2 -0
- package/dist/dist.min.js +1 -1
- package/dist/flatgeobuf-loader.d.ts +50 -3
- package/dist/flatgeobuf-loader.d.ts.map +1 -1
- package/dist/flatgeobuf-loader.js +3 -1
- package/dist/flatgeobuf-worker.js +49 -47
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +2 -2
- package/package.json +5 -5
- package/src/flatgeobuf-loader.ts +9 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/flatgeobuf",
|
|
3
3
|
"description": "Loader for FlatGeobuf",
|
|
4
|
-
"version": "4.2.0-
|
|
4
|
+
"version": "4.2.0-beta.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"publishConfig": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"build-worker": "esbuild src/workers/flatgeobuf-worker.ts --bundle --outfile=dist/flatgeobuf-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@loaders.gl/gis": "4.2.0-
|
|
48
|
-
"@loaders.gl/loader-utils": "4.2.0-
|
|
49
|
-
"@loaders.gl/schema": "4.2.0-
|
|
47
|
+
"@loaders.gl/gis": "4.2.0-beta.1",
|
|
48
|
+
"@loaders.gl/loader-utils": "4.2.0-beta.1",
|
|
49
|
+
"@loaders.gl/schema": "4.2.0-beta.1",
|
|
50
50
|
"@math.gl/proj4": "^4.0.0",
|
|
51
51
|
"flatgeobuf": "3.27.2"
|
|
52
52
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@loaders.gl/core": "^4.0.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "c386a9196516fe3ff24847b40e6c77be039cf905"
|
|
60
60
|
}
|
package/src/flatgeobuf-loader.ts
CHANGED
|
@@ -15,6 +15,8 @@ const FGB_MAGIC_NUMBER = [0x66, 0x67, 0x62, 0x03, 0x66, 0x67, 0x62, 0x01];
|
|
|
15
15
|
export type FlatGeobufLoaderOptions = LoaderOptions & {
|
|
16
16
|
flatgeobuf?: {
|
|
17
17
|
shape?: 'geojson-table' | 'columnar-table' | 'binary';
|
|
18
|
+
/** Override the URL to the worker bundle (by default loads from unpkg.com) */
|
|
19
|
+
workerUrl?: string;
|
|
18
20
|
};
|
|
19
21
|
gis?: {
|
|
20
22
|
reproject?: boolean;
|
|
@@ -22,7 +24,10 @@ export type FlatGeobufLoaderOptions = LoaderOptions & {
|
|
|
22
24
|
};
|
|
23
25
|
};
|
|
24
26
|
|
|
25
|
-
export const FlatGeobufWorkerLoader
|
|
27
|
+
export const FlatGeobufWorkerLoader = {
|
|
28
|
+
dataType: null as any,
|
|
29
|
+
batchType: null as any,
|
|
30
|
+
|
|
26
31
|
id: 'flatgeobuf',
|
|
27
32
|
name: 'FlatGeobuf',
|
|
28
33
|
module: 'flatgeobuf',
|
|
@@ -40,13 +45,13 @@ export const FlatGeobufWorkerLoader: Loader<any, any, FlatGeobufLoaderOptions> =
|
|
|
40
45
|
reproject: false
|
|
41
46
|
}
|
|
42
47
|
}
|
|
43
|
-
}
|
|
48
|
+
} as const satisfies Loader<any, any, FlatGeobufLoaderOptions>;
|
|
44
49
|
|
|
45
|
-
export const FlatGeobufLoader
|
|
50
|
+
export const FlatGeobufLoader = {
|
|
46
51
|
...FlatGeobufWorkerLoader,
|
|
47
52
|
parse: async (arrayBuffer, options) => parseFlatGeobuf(arrayBuffer, options),
|
|
48
53
|
parseSync: parseFlatGeobuf,
|
|
49
54
|
// @ts-expect-error this is a stream parser not an async iterator parser
|
|
50
55
|
parseInBatchesFromStream: parseFlatGeobufInBatches,
|
|
51
56
|
binary: true
|
|
52
|
-
}
|
|
57
|
+
} as const satisfies LoaderWithParser<any, any, FlatGeobufLoaderOptions>;
|