@deck.gl/geo-layers 9.0.0-beta.9 → 9.0.0
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 +2190 -1492
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/mvt-layer/mvt-layer.d.ts +4 -3
- package/dist/mvt-layer/mvt-layer.d.ts.map +1 -1
- package/dist/tile-layer/tile-layer.d.ts +5 -2
- package/dist/tile-layer/tile-layer.d.ts.map +1 -1
- package/dist/tile-layer/tile-layer.js +3 -2
- package/dist.min.js +12 -12
- package/package.json +17 -17
- package/src/index.ts +2 -2
- package/src/mvt-layer/mvt-layer.ts +8 -3
- package/src/tile-layer/tile-layer.ts +12 -5
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "deck.gl layers supporting geospatial use cases and GIS formats",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "9.0.0
|
|
6
|
+
"version": "9.0.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -38,16 +38,16 @@
|
|
|
38
38
|
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@loaders.gl/3d-tiles": "^4.
|
|
42
|
-
"@loaders.gl/gis": "^4.
|
|
43
|
-
"@loaders.gl/loader-utils": "^4.
|
|
44
|
-
"@loaders.gl/mvt": "^4.
|
|
45
|
-
"@loaders.gl/schema": "^4.
|
|
46
|
-
"@loaders.gl/terrain": "^4.
|
|
47
|
-
"@loaders.gl/tiles": "^4.
|
|
48
|
-
"@loaders.gl/wms": "^4.
|
|
49
|
-
"@luma.gl/gltf": "^9.0.
|
|
50
|
-
"@luma.gl/shadertools": "^9.0.
|
|
41
|
+
"@loaders.gl/3d-tiles": "^4.1.4",
|
|
42
|
+
"@loaders.gl/gis": "^4.1.4",
|
|
43
|
+
"@loaders.gl/loader-utils": "^4.1.4",
|
|
44
|
+
"@loaders.gl/mvt": "^4.1.4",
|
|
45
|
+
"@loaders.gl/schema": "^4.1.4",
|
|
46
|
+
"@loaders.gl/terrain": "^4.1.4",
|
|
47
|
+
"@loaders.gl/tiles": "^4.1.4",
|
|
48
|
+
"@loaders.gl/wms": "^4.1.4",
|
|
49
|
+
"@luma.gl/gltf": "^9.0.6",
|
|
50
|
+
"@luma.gl/shadertools": "^9.0.6",
|
|
51
51
|
"@math.gl/core": "^4.0.0",
|
|
52
52
|
"@math.gl/culling": "^4.0.0",
|
|
53
53
|
"@math.gl/web-mercator": "^4.0.0",
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"long": "^3.2.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@deck.gl/core": "^9.0.0
|
|
60
|
-
"@deck.gl/extensions": "^9.0.0
|
|
61
|
-
"@deck.gl/layers": "^9.0.0
|
|
62
|
-
"@deck.gl/mesh-layers": "^9.0.0
|
|
63
|
-
"@loaders.gl/core": "^4.
|
|
59
|
+
"@deck.gl/core": "^9.0.0",
|
|
60
|
+
"@deck.gl/extensions": "^9.0.0",
|
|
61
|
+
"@deck.gl/layers": "^9.0.0",
|
|
62
|
+
"@deck.gl/mesh-layers": "^9.0.0",
|
|
63
|
+
"@loaders.gl/core": "^4.1.0",
|
|
64
64
|
"@luma.gl/core": "^9.0.0",
|
|
65
65
|
"@luma.gl/engine": "^9.0.0"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "fcb5ccf0a899e651949b24986488211e278e9321"
|
|
68
68
|
}
|
package/src/index.ts
CHANGED
|
@@ -40,12 +40,12 @@ export type {H3ClusterLayerProps} from './h3-layers/h3-cluster-layer';
|
|
|
40
40
|
export type {H3HexagonLayerProps} from './h3-layers/h3-hexagon-layer';
|
|
41
41
|
export type {GreatCircleLayerProps} from './great-circle-layer/great-circle-layer';
|
|
42
42
|
export type {S2LayerProps} from './s2-layer/s2-layer';
|
|
43
|
-
export type {TileLayerProps} from './tile-layer/tile-layer';
|
|
43
|
+
export type {TileLayerProps, TileLayerPickingInfo} from './tile-layer/tile-layer';
|
|
44
44
|
export type {TripsLayerProps} from './trips-layer/trips-layer';
|
|
45
45
|
export type {QuadkeyLayerProps} from './quadkey-layer/quadkey-layer';
|
|
46
46
|
export type {TerrainLayerProps} from './terrain-layer/terrain-layer';
|
|
47
47
|
export type {Tile3DLayerProps} from './tile-3d-layer/tile-3d-layer';
|
|
48
|
-
export type {MVTLayerProps} from './mvt-layer/mvt-layer';
|
|
48
|
+
export type {MVTLayerProps, MVTLayerPickingInfo} from './mvt-layer/mvt-layer';
|
|
49
49
|
export type {GeoCellLayerProps as _GeoCellLayerProps} from './geo-cell-layer/GeoCellLayer';
|
|
50
50
|
|
|
51
51
|
// Tileset2D
|
|
@@ -18,12 +18,12 @@ import {binaryToGeojson} from '@loaders.gl/gis';
|
|
|
18
18
|
|
|
19
19
|
import type {Loader} from '@loaders.gl/loader-utils';
|
|
20
20
|
import type {BinaryFeatureCollection} from '@loaders.gl/schema';
|
|
21
|
-
import type {Feature} from 'geojson';
|
|
21
|
+
import type {Feature, Geometry} from 'geojson';
|
|
22
22
|
|
|
23
23
|
import {transform} from './coordinate-transform';
|
|
24
24
|
import findIndexBinary from './find-index-binary';
|
|
25
25
|
|
|
26
|
-
import TileLayer, {
|
|
26
|
+
import TileLayer, {TileLayerPickingInfo, TileLayerProps} from '../tile-layer/tile-layer';
|
|
27
27
|
|
|
28
28
|
import type {Tileset2DProps, TileLoadProps, GeoBoundingBox} from '../tileset-2d/index';
|
|
29
29
|
import {
|
|
@@ -62,6 +62,11 @@ export type TileJson = {
|
|
|
62
62
|
|
|
63
63
|
type ParsedMvtTile = Feature[] | BinaryFeatureCollection;
|
|
64
64
|
|
|
65
|
+
export type MVTLayerPickingInfo<FeaturePropertiesT = {}> = TileLayerPickingInfo<
|
|
66
|
+
ParsedMvtTile,
|
|
67
|
+
PickingInfo<Feature<Geometry, FeaturePropertiesT>>
|
|
68
|
+
>;
|
|
69
|
+
|
|
65
70
|
/** All props supported by the MVTLayer */
|
|
66
71
|
export type MVTLayerProps<FeaturePropertiesT = unknown> = _MVTLayerProps<FeaturePropertiesT> &
|
|
67
72
|
Omit<TileLayerProps<ParsedMvtTile>, 'data'>;
|
|
@@ -298,7 +303,7 @@ export default class MVTLayer<
|
|
|
298
303
|
}
|
|
299
304
|
}
|
|
300
305
|
|
|
301
|
-
getPickingInfo(params: GetPickingInfoParams):
|
|
306
|
+
getPickingInfo(params: GetPickingInfoParams): MVTLayerPickingInfo<FeaturePropertiesT> {
|
|
302
307
|
const info = super.getPickingInfo(params);
|
|
303
308
|
|
|
304
309
|
const isWGS84 = Boolean(this.context.viewport.resolution);
|
|
@@ -146,8 +146,14 @@ type _TileLayerProps<DataT> = {
|
|
|
146
146
|
zoomOffset?: number;
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
-
export type
|
|
149
|
+
export type TileLayerPickingInfo<
|
|
150
|
+
DataT = any,
|
|
151
|
+
SubLayerPickingInfo = PickingInfo
|
|
152
|
+
> = SubLayerPickingInfo & {
|
|
153
|
+
/** The picked tile */
|
|
150
154
|
tile?: Tile2DHeader<DataT>;
|
|
155
|
+
/** the tile that emitted the picking event */
|
|
156
|
+
sourceTile: Tile2DHeader<DataT>;
|
|
151
157
|
};
|
|
152
158
|
|
|
153
159
|
/**
|
|
@@ -334,12 +340,13 @@ export default class TileLayer<DataT = any, ExtraPropsT extends {} = {}> extends
|
|
|
334
340
|
return null;
|
|
335
341
|
}
|
|
336
342
|
|
|
337
|
-
getPickingInfo(
|
|
338
|
-
const sourceTile = (sourceLayer as any).props.tile;
|
|
343
|
+
getPickingInfo(params: GetPickingInfoParams): TileLayerPickingInfo<DataT> {
|
|
344
|
+
const sourceTile: Tile2DHeader<DataT> = (params.sourceLayer as any).props.tile;
|
|
345
|
+
const info = params.info as TileLayerPickingInfo<DataT>;
|
|
339
346
|
if (info.picked) {
|
|
340
|
-
|
|
347
|
+
info.tile = sourceTile;
|
|
341
348
|
}
|
|
342
|
-
|
|
349
|
+
info.sourceTile = sourceTile;
|
|
343
350
|
return info;
|
|
344
351
|
}
|
|
345
352
|
|