@accelint/map-toolkit 0.4.1 → 0.6.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/CHANGELOG.md +30 -0
- package/README.md +3 -0
- package/catalog-info.yaml +6 -3
- package/dist/camera/events.d.ts +15 -0
- package/dist/camera/events.js +29 -0
- package/dist/camera/events.js.map +1 -0
- package/dist/camera/index.d.ts +16 -0
- package/dist/camera/index.js +17 -0
- package/dist/camera/types.d.ts +84 -0
- package/dist/{decorators/deckgl.d.ts → camera/types.js} +0 -7
- package/dist/camera/use-camera-state.d.ts +153 -0
- package/dist/camera/use-camera-state.js +418 -0
- package/dist/camera/use-camera-state.js.map +1 -0
- package/dist/cursor-coordinates/use-cursor-coordinates.js +1 -1
- package/dist/deckgl/base-map/constants.d.ts +14 -2
- package/dist/deckgl/base-map/constants.js +14 -2
- package/dist/deckgl/base-map/constants.js.map +1 -1
- package/dist/deckgl/base-map/controls.d.ts +34 -0
- package/dist/deckgl/base-map/controls.js +50 -0
- package/dist/deckgl/base-map/controls.js.map +1 -0
- package/dist/deckgl/base-map/events.d.ts +4 -0
- package/dist/deckgl/base-map/events.js +5 -1
- package/dist/deckgl/base-map/events.js.map +1 -1
- package/dist/deckgl/base-map/index.d.ts +10 -23
- package/dist/deckgl/base-map/index.js +81 -42
- package/dist/deckgl/base-map/index.js.map +1 -1
- package/dist/deckgl/base-map/types.d.ts +48 -2
- package/dist/deckgl/index.d.ts +11 -4
- package/dist/deckgl/index.js +7 -2
- package/dist/deckgl/saved-viewports/index.d.ts +32 -0
- package/dist/deckgl/saved-viewports/index.js +51 -0
- package/dist/deckgl/saved-viewports/index.js.map +1 -0
- package/dist/deckgl/saved-viewports/storage.d.ts +21 -0
- package/dist/deckgl/saved-viewports/storage.js +39 -0
- package/dist/deckgl/saved-viewports/storage.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/constants.d.ts +44 -0
- package/dist/deckgl/shapes/display-shape-layer/constants.js +61 -0
- package/dist/deckgl/shapes/display-shape-layer/constants.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/fiber.d.ts +25 -0
- package/dist/deckgl/shapes/display-shape-layer/fiber.js +21 -0
- package/dist/deckgl/shapes/display-shape-layer/fiber.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/index.d.ts +206 -0
- package/dist/deckgl/shapes/display-shape-layer/index.js +416 -0
- package/dist/deckgl/shapes/display-shape-layer/index.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.d.ts +66 -0
- package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.js +116 -0
- package/dist/deckgl/shapes/display-shape-layer/shape-label-layer.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/store.d.ts +87 -0
- package/dist/deckgl/shapes/display-shape-layer/store.js +316 -0
- package/dist/deckgl/shapes/display-shape-layer/store.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/types.d.ts +115 -0
- package/dist/deckgl/shapes/display-shape-layer/types.js +12 -0
- package/dist/deckgl/shapes/display-shape-layer/use-shape-selection.d.ts +89 -0
- package/dist/deckgl/shapes/display-shape-layer/use-shape-selection.js +88 -0
- package/dist/deckgl/shapes/display-shape-layer/use-shape-selection.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/display-style.d.ts +61 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js +111 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/display-style.js.map +1 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/labels.d.ts +196 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/labels.js +368 -0
- package/dist/deckgl/shapes/display-shape-layer/utils/labels.js.map +1 -0
- package/dist/deckgl/shapes/index.d.ts +20 -0
- package/dist/deckgl/shapes/index.js +20 -0
- package/dist/deckgl/shapes/shared/constants.d.ts +78 -0
- package/dist/deckgl/shapes/shared/constants.js +109 -0
- package/dist/deckgl/shapes/shared/constants.js.map +1 -0
- package/dist/deckgl/shapes/shared/events.d.ts +73 -0
- package/dist/deckgl/shapes/shared/events.js +58 -0
- package/dist/deckgl/shapes/shared/events.js.map +1 -0
- package/dist/deckgl/shapes/shared/types.d.ts +158 -0
- package/dist/{decorators/deckgl.js → deckgl/shapes/shared/types.js} +12 -15
- package/dist/deckgl/shapes/shared/types.js.map +1 -0
- package/dist/deckgl/symbol-layer/index.d.ts +1 -1
- package/dist/maplibre/hooks/use-maplibre.d.ts +2 -2
- package/dist/maplibre/hooks/use-maplibre.js +2 -2
- package/dist/maplibre/hooks/use-maplibre.js.map +1 -1
- package/dist/viewport/viewport-size.d.ts +2 -2
- package/package.json +50 -23
- package/dist/decorators/deckgl.js.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
'use client';
|
|
15
|
+
|
|
16
|
+
//#region src/deckgl/shapes/display-shape-layer/constants.ts
|
|
17
|
+
/**
|
|
18
|
+
* Map interaction constants
|
|
19
|
+
* Values derived from ngc2 for consistency
|
|
20
|
+
*/
|
|
21
|
+
const MAP_INTERACTION = {
|
|
22
|
+
LINE_WIDTH_MIN_PIXELS: 1,
|
|
23
|
+
ICON_SIZE: 38,
|
|
24
|
+
ICON_HOVER_SIZE_INCREASE: 5
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Selection highlight configuration
|
|
28
|
+
*/
|
|
29
|
+
const SELECTION_HIGHLIGHT = {
|
|
30
|
+
COLOR: [
|
|
31
|
+
40,
|
|
32
|
+
245,
|
|
33
|
+
190,
|
|
34
|
+
100
|
|
35
|
+
],
|
|
36
|
+
ICON_SIZE_INCREASE: 8
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Coffin corners configuration for Point selection/hover feedback
|
|
40
|
+
* Coffin corners are bracket-like corners that appear around points
|
|
41
|
+
*/
|
|
42
|
+
const COFFIN_CORNERS = {
|
|
43
|
+
HOVER_ICON: "coffin-corners-hover",
|
|
44
|
+
SELECTED_ICON: "coffin-corners-selected",
|
|
45
|
+
SELECTED_HOVER_ICON: "coffin-corners-selected-hover",
|
|
46
|
+
SIZE: 38
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Default props for DisplayShapeLayer
|
|
50
|
+
*/
|
|
51
|
+
const DEFAULT_DISPLAY_PROPS = {
|
|
52
|
+
pickable: true,
|
|
53
|
+
showLabels: true,
|
|
54
|
+
showHighlight: false,
|
|
55
|
+
applyBaseOpacity: true,
|
|
56
|
+
highlightColor: SELECTION_HIGHLIGHT.COLOR
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { COFFIN_CORNERS, DEFAULT_DISPLAY_PROPS, MAP_INTERACTION, SELECTION_HIGHLIGHT };
|
|
61
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","names":[],"sources":["../../../../src/deckgl/shapes/display-shape-layer/constants.ts"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n'use client';\n\n/**\n * Map interaction constants\n * Values derived from ngc2 for consistency\n */\nexport const MAP_INTERACTION = {\n LINE_WIDTH_MIN_PIXELS: 1, // Minimum line width in pixels\n ICON_SIZE: 38, // Size of shape icons\n ICON_HOVER_SIZE_INCREASE: 5, // Additional pixels added on hover\n} as const;\n\n/**\n * Selection highlight configuration\n */\nexport const SELECTION_HIGHLIGHT = {\n COLOR: [40, 245, 190, 100] as [number, number, number, number], // Turquoise/cyan at ~39% opacity\n ICON_SIZE_INCREASE: 8, // Additional pixels for highlight icon\n} as const;\n\n/**\n * Coffin corners configuration for Point selection/hover feedback\n * Coffin corners are bracket-like corners that appear around points\n */\nexport const COFFIN_CORNERS = {\n /** Icon name for hover state (white corners with background fill) */\n HOVER_ICON: 'coffin-corners-hover',\n /** Icon name for selected state (blue corners, no fill) */\n SELECTED_ICON: 'coffin-corners-selected',\n /** Icon name for selected+hover state (blue corners with background fill) */\n SELECTED_HOVER_ICON: 'coffin-corners-selected-hover',\n /** Size of the coffin corners icon */\n SIZE: 38,\n} as const;\n\n/**\n * Default props for DisplayShapeLayer\n */\nexport const DEFAULT_DISPLAY_PROPS = {\n pickable: true,\n showLabels: true,\n showHighlight: false,\n applyBaseOpacity: true,\n highlightColor: SELECTION_HIGHLIGHT.COLOR,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA,MAAa,kBAAkB;CAC7B,uBAAuB;CACvB,WAAW;CACX,0BAA0B;CAC3B;;;;AAKD,MAAa,sBAAsB;CACjC,OAAO;EAAC;EAAI;EAAK;EAAK;EAAI;CAC1B,oBAAoB;CACrB;;;;;AAMD,MAAa,iBAAiB;CAE5B,YAAY;CAEZ,eAAe;CAEf,qBAAqB;CAErB,MAAM;CACP;;;;AAKD,MAAa,wBAAwB;CACnC,UAAU;CACV,YAAY;CACZ,eAAe;CACf,kBAAkB;CAClB,gBAAgB,oBAAoB;CACrC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { DisplayShapeLayerProps } from "./types.js";
|
|
14
|
+
|
|
15
|
+
//#region src/deckgl/shapes/display-shape-layer/fiber.d.ts
|
|
16
|
+
declare global {
|
|
17
|
+
namespace React {
|
|
18
|
+
namespace JSX {
|
|
19
|
+
interface IntrinsicElements {
|
|
20
|
+
displayShapeLayer: DisplayShapeLayerProps;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=fiber.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { DisplayShapeLayer } from "./index.js";
|
|
15
|
+
import { extend } from "@deckgl-fiber-renderer/dom";
|
|
16
|
+
|
|
17
|
+
//#region src/deckgl/shapes/display-shape-layer/fiber.ts
|
|
18
|
+
extend({ DisplayShapeLayer });
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
//# sourceMappingURL=fiber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiber.js","names":[],"sources":["../../../../src/deckgl/shapes/display-shape-layer/fiber.ts"],"sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { extend } from '@deckgl-fiber-renderer/dom';\nimport { DisplayShapeLayer } from './index';\nimport type { DisplayShapeLayerProps } from './types';\n\nextend({ DisplayShapeLayer });\n\ndeclare global {\n namespace React {\n // biome-ignore lint/style/useNamingConvention: Built-in React namespace.\n namespace JSX {\n interface IntrinsicElements {\n displayShapeLayer: DisplayShapeLayerProps;\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,OAAO,EAAE,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { ShapeId } from "../shared/types.js";
|
|
14
|
+
import { DisplayShapeLayerProps } from "./types.js";
|
|
15
|
+
import * as _deck_gl_core0 from "@deck.gl/core";
|
|
16
|
+
import { CompositeLayer, Layer, PickingInfo } from "@deck.gl/core";
|
|
17
|
+
|
|
18
|
+
//#region src/deckgl/shapes/display-shape-layer/index.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* State interface for DisplayShapeLayer
|
|
21
|
+
*/
|
|
22
|
+
interface DisplayShapeLayerState {
|
|
23
|
+
/** Index of currently hovered shape, undefined when not hovering */
|
|
24
|
+
hoverIndex?: number;
|
|
25
|
+
/** ID of the last hovered shape for event deduplication */
|
|
26
|
+
lastHoveredId?: ShapeId | null;
|
|
27
|
+
/** Allow additional properties from base layer state */
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* DisplayShapeLayer - Read-only shapes visualization layer
|
|
32
|
+
*
|
|
33
|
+
* A composite deck.gl layer for displaying geographic shapes with interactive features.
|
|
34
|
+
* Ideal for rendering shapes from external APIs or displaying read-only geographic data.
|
|
35
|
+
*
|
|
36
|
+
* ## Features
|
|
37
|
+
* - **Multiple geometry types**: Point, LineString, Polygon, and Circle
|
|
38
|
+
* - **Icon support**: Custom icons for Point geometries via icon atlases
|
|
39
|
+
* - **Interactive selection**: Click handling with dotted border and optional highlight
|
|
40
|
+
* - **Hover effects**: Line width increases on hover for better UX
|
|
41
|
+
* - **Customizable labels**: Flexible label positioning with per-shape or global options
|
|
42
|
+
* - **Style properties**: Full control over colors, stroke patterns, and opacity
|
|
43
|
+
* - **Event bus integration**: Automatically emits shape events via @accelint/bus
|
|
44
|
+
* - **Multi-map support**: Events include map instance ID for isolation
|
|
45
|
+
*
|
|
46
|
+
* ## Selection Visual Feedback
|
|
47
|
+
* When a shape is selected via `selectedShapeId`:
|
|
48
|
+
* - The shape's stroke pattern changes to dotted
|
|
49
|
+
* - An optional highlight renders underneath (controlled by `showHighlight` prop)
|
|
50
|
+
*
|
|
51
|
+
* ## Layer Structure
|
|
52
|
+
* Renders up to four sublayers (in order, bottom to top):
|
|
53
|
+
* 1. **Highlight layer**: Selection highlight effect for non-icon-Point shapes (if showHighlight=true)
|
|
54
|
+
* 2. **Coffin corners layer**: Selection/hover feedback for Point shapes with icons
|
|
55
|
+
* 3. **Main GeoJsonLayer**: Shape geometries with styling and interaction
|
|
56
|
+
* 4. **Label layer**: Text labels (if showLabels enabled)
|
|
57
|
+
*
|
|
58
|
+
* ## Icon Atlas Constraint
|
|
59
|
+
* When using icons for Point geometries, all shapes in a single layer must share the
|
|
60
|
+
* same icon atlas. The layer uses the first atlas found across all features. If you
|
|
61
|
+
* need icons from different atlases, use separate DisplayShapeLayer instances.
|
|
62
|
+
*
|
|
63
|
+
* ## Event Bus Integration
|
|
64
|
+
* Automatically emits shape events that can be consumed anywhere in your app:
|
|
65
|
+
* - `shapes:selected` - Emitted when a shape is clicked (includes mapId)
|
|
66
|
+
* - `shapes:hovered` - Emitted when the hovered shape changes (deduplicated, includes mapId)
|
|
67
|
+
*
|
|
68
|
+
* For selection with auto-deselection, use the companion `useShapeSelection` hook which handles
|
|
69
|
+
* all the event wiring automatically. See the example below.
|
|
70
|
+
*
|
|
71
|
+
* @example Basic usage with useShapeSelection hook (recommended)
|
|
72
|
+
* ```tsx
|
|
73
|
+
* import '@accelint/map-toolkit/deckgl/shapes/display-shape-layer/fiber';
|
|
74
|
+
* import { useShapeSelection } from '@accelint/map-toolkit/deckgl/shapes';
|
|
75
|
+
* import { uuid } from '@accelint/core';
|
|
76
|
+
*
|
|
77
|
+
* const MAP_ID = uuid();
|
|
78
|
+
*
|
|
79
|
+
* function MapWithShapes() {
|
|
80
|
+
* const { selectedId } = useShapeSelection(MAP_ID);
|
|
81
|
+
*
|
|
82
|
+
* return (
|
|
83
|
+
* <BaseMap id={MAP_ID}>
|
|
84
|
+
* <displayShapeLayer
|
|
85
|
+
* id="my-shapes"
|
|
86
|
+
* mapId={MAP_ID}
|
|
87
|
+
* data={shapes}
|
|
88
|
+
* selectedShapeId={selectedId}
|
|
89
|
+
* showLabels={true}
|
|
90
|
+
* pickable={true}
|
|
91
|
+
* />
|
|
92
|
+
* </BaseMap>
|
|
93
|
+
* );
|
|
94
|
+
* }
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* @example With custom label positioning
|
|
98
|
+
* ```tsx
|
|
99
|
+
* <displayShapeLayer
|
|
100
|
+
* id="my-shapes"
|
|
101
|
+
* data={shapes}
|
|
102
|
+
* showLabels={true}
|
|
103
|
+
* labelOptions={{
|
|
104
|
+
* // Position circle labels at the top
|
|
105
|
+
* circleLabelCoordinateAnchor: 'top',
|
|
106
|
+
* circleLabelVerticalAnchor: 'bottom',
|
|
107
|
+
* circleLabelOffset: [0, -10],
|
|
108
|
+
* // Position line labels at the middle
|
|
109
|
+
* lineStringLabelCoordinateAnchor: 'middle',
|
|
110
|
+
* }}
|
|
111
|
+
* />
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
declare class DisplayShapeLayer extends CompositeLayer<DisplayShapeLayerProps> {
|
|
115
|
+
state: DisplayShapeLayerState;
|
|
116
|
+
/** Cache for transformed features to avoid recreating objects on every render */
|
|
117
|
+
private featuresCache;
|
|
118
|
+
static layerName: string;
|
|
119
|
+
static defaultProps: {
|
|
120
|
+
pickable: boolean;
|
|
121
|
+
showLabels: boolean;
|
|
122
|
+
showHighlight: boolean;
|
|
123
|
+
applyBaseOpacity: boolean;
|
|
124
|
+
highlightColor: [number, number, number, number];
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Clean up state and caches when layer is destroyed
|
|
128
|
+
*/
|
|
129
|
+
finalizeState(): void;
|
|
130
|
+
/**
|
|
131
|
+
* Override getPickingInfo to handle events from sublayers
|
|
132
|
+
* This is the correct pattern for CompositeLayer event handling
|
|
133
|
+
*/
|
|
134
|
+
getPickingInfo({
|
|
135
|
+
info,
|
|
136
|
+
mode,
|
|
137
|
+
sourceLayer
|
|
138
|
+
}: {
|
|
139
|
+
info: PickingInfo;
|
|
140
|
+
mode?: string;
|
|
141
|
+
sourceLayer?: any;
|
|
142
|
+
}): {
|
|
143
|
+
color: Uint8Array | null;
|
|
144
|
+
layer: Layer | null;
|
|
145
|
+
sourceLayer?: Layer | null;
|
|
146
|
+
viewport?: _deck_gl_core0.Viewport;
|
|
147
|
+
index: number;
|
|
148
|
+
picked: boolean;
|
|
149
|
+
object?: any;
|
|
150
|
+
x: number;
|
|
151
|
+
y: number;
|
|
152
|
+
pixel?: [number, number];
|
|
153
|
+
coordinate?: number[];
|
|
154
|
+
devicePixel?: [number, number];
|
|
155
|
+
pixelRatio: number;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Convert shapes to GeoJSON features with shapeId in properties.
|
|
159
|
+
* Uses caching to avoid recreating objects on every render cycle.
|
|
160
|
+
*/
|
|
161
|
+
private getFeaturesWithId;
|
|
162
|
+
/**
|
|
163
|
+
* Look up a shape by ID from the data prop.
|
|
164
|
+
* Used by event handlers to get full shape without storing in feature properties.
|
|
165
|
+
*/
|
|
166
|
+
private getShapeById;
|
|
167
|
+
/**
|
|
168
|
+
* Handle shape click
|
|
169
|
+
*/
|
|
170
|
+
private handleShapeClick;
|
|
171
|
+
/**
|
|
172
|
+
* Handle shape hover
|
|
173
|
+
*/
|
|
174
|
+
private handleShapeHover;
|
|
175
|
+
/**
|
|
176
|
+
* Render highlight sublayer (underneath main layer)
|
|
177
|
+
* Note: Points with icons use coffin corners instead of highlight layer
|
|
178
|
+
*/
|
|
179
|
+
private renderHighlightLayer;
|
|
180
|
+
/**
|
|
181
|
+
* Render coffin corners layer for Point geometries that have icons on hover/select
|
|
182
|
+
* Coffin corners provide visual feedback for points instead of highlight layer
|
|
183
|
+
*/
|
|
184
|
+
private renderCoffinCornersLayer;
|
|
185
|
+
/**
|
|
186
|
+
* Extract icon configuration from features in a single pass.
|
|
187
|
+
* Returns the first icon's atlas and mapping (all shapes share the same atlas).
|
|
188
|
+
* Uses early return for O(1) best case when first feature has icons.
|
|
189
|
+
*/
|
|
190
|
+
private getIconConfig;
|
|
191
|
+
/**
|
|
192
|
+
* Render main shapes layer
|
|
193
|
+
*/
|
|
194
|
+
private renderMainLayer;
|
|
195
|
+
/**
|
|
196
|
+
* Render labels layer
|
|
197
|
+
*/
|
|
198
|
+
private renderLabelsLayer;
|
|
199
|
+
/**
|
|
200
|
+
* Render all sublayers
|
|
201
|
+
*/
|
|
202
|
+
renderLayers(): Layer[];
|
|
203
|
+
}
|
|
204
|
+
//#endregion
|
|
205
|
+
export { DisplayShapeLayer };
|
|
206
|
+
//# sourceMappingURL=index.d.ts.map
|