@deck.gl/mapbox 8.8.0-beta.1 → 8.8.0-beta.4

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/src/deck-utils.ts CHANGED
@@ -62,26 +62,27 @@ export function getDeckInstance({
62
62
  map.on('move', () => onMapMove(deck!, map));
63
63
  }
64
64
 
65
+ let deckInstance: Deck;
65
66
  if (deck) {
67
+ deckInstance = deck;
66
68
  deck.setProps(deckProps);
67
69
  (deck.userData as UserData).isExternal = true;
68
70
  } else {
69
- deck = new Deck(deckProps);
71
+ deckInstance = new Deck(deckProps);
70
72
  map.on('remove', () => {
71
- deck!.finalize();
73
+ deckInstance.finalize();
72
74
  map.__deck = null;
73
75
  });
74
76
  }
75
77
 
76
- (deck.userData as UserData).mapboxLayers = new Set();
77
- (deck.userData as UserData).mapboxVersion = getMapboxVersion(map);
78
- map.__deck = deck;
78
+ (deckInstance.userData as UserData).mapboxLayers = new Set();
79
+ (deckInstance.userData as UserData).mapboxVersion = getMapboxVersion(map);
80
+ map.__deck = deckInstance;
79
81
  map.on('render', () => {
80
- // @ts-expect-error (2445) protected property
81
- if (deck.layerManager) afterRender(deck, map);
82
+ if (deckInstance.isInitialized) afterRender(deckInstance, map);
82
83
  });
83
84
 
84
- return deck;
85
+ return deckInstance;
85
86
  }
86
87
 
87
88
  export function addLayer(deck: Deck, layer: MapboxLayer<any>): void {
@@ -107,8 +108,7 @@ export function drawLayer(deck: Deck, map: Map, layer: MapboxLayer<any>): void {
107
108
  (deck.userData as UserData).currentViewport = currentViewport;
108
109
  }
109
110
 
110
- // @ts-expect-error (2445) protected property
111
- if (!deck.layerManager) {
111
+ if (!deck.isInitialized) {
112
112
  return;
113
113
  }
114
114
 
@@ -119,7 +119,15 @@ export function drawLayer(deck: Deck, map: Map, layer: MapboxLayer<any>): void {
119
119
  });
120
120
  }
121
121
 
122
- export function getViewState(map: Map): MapViewState & {repeat: boolean} {
122
+ export function getViewState(map: Map): MapViewState & {
123
+ repeat: boolean;
124
+ padding: {
125
+ left: number;
126
+ right: number;
127
+ top: number;
128
+ bottom: number;
129
+ };
130
+ } {
123
131
  const {lng, lat} = map.getCenter();
124
132
  return {
125
133
  // Longitude returned by getCenter can be outside of [-180, 180] when zooming near the anti meridian
@@ -129,6 +137,7 @@ export function getViewState(map: Map): MapViewState & {repeat: boolean} {
129
137
  zoom: map.getZoom(),
130
138
  bearing: map.getBearing(),
131
139
  pitch: map.getPitch(),
140
+ padding: map.getPadding(),
132
141
  repeat: map.getRenderWorldCopies()
133
142
  };
134
143
  }
package/src/index.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export {default as MapboxLayer} from './mapbox-layer';
2
2
  export {default as MapboxOverlay} from './mapbox-overlay';
3
+
4
+ export type {MapboxOverlayProps} from './mapbox-overlay';
@@ -5,28 +5,50 @@ import type {Map, IControl, MapMouseEvent} from 'mapbox-gl';
5
5
  import type {MjolnirGestureEvent, MjolnirPointerEvent} from 'mjolnir.js';
6
6
  import type {DeckProps} from '@deck.gl/core';
7
7
 
8
+ import {resolveLayers} from './resolve-layers';
9
+
10
+ export type MapboxOverlayProps = Omit<
11
+ DeckProps,
12
+ | 'width'
13
+ | 'height'
14
+ | 'gl'
15
+ | 'parent'
16
+ | 'canvas'
17
+ | '_customRender'
18
+ | 'viewState'
19
+ | 'initialViewState'
20
+ | 'controller'
21
+ >;
22
+
8
23
  /**
9
24
  * Implements Mapbox [IControl](https://docs.mapbox.com/mapbox-gl-js/api/markers/#icontrol) interface
10
25
  * Renders deck.gl layers over the base map and automatically synchronizes with the map's camera
11
26
  */
12
27
  export default class MapboxOverlay implements IControl {
13
- private _props: DeckProps;
28
+ private _props: MapboxOverlayProps;
14
29
  private _deck?: Deck;
15
30
  private _map?: Map;
16
31
  private _container?: HTMLDivElement;
32
+ private _interleaved: boolean;
17
33
 
18
- constructor(props: DeckProps) {
19
- this._props = {...props};
34
+ constructor(
35
+ props: MapboxOverlayProps & {
36
+ interleaved?: boolean;
37
+ }
38
+ ) {
39
+ const {interleaved = false, ...otherProps} = props;
40
+ this._interleaved = interleaved;
41
+ this._props = otherProps;
20
42
  }
21
43
 
22
44
  /** Update (partial) props of the underlying Deck instance. */
23
- setProps(props: DeckProps): void {
24
- Object.assign(this._props, props);
25
-
26
- if ('viewState' in this._props) {
27
- delete this._props.viewState;
45
+ setProps(props: MapboxOverlayProps): void {
46
+ if (this._interleaved && props.layers) {
47
+ resolveLayers(this._map, this._deck, this._props.layers, props.layers);
28
48
  }
29
49
 
50
+ Object.assign(this._props, props);
51
+
30
52
  if (this._deck) {
31
53
  this._deck.setProps(this._props);
32
54
  }
@@ -35,7 +57,10 @@ export default class MapboxOverlay implements IControl {
35
57
  /** Called when the control is added to a map */
36
58
  onAdd(map: Map): HTMLDivElement {
37
59
  this._map = map;
60
+ return this._interleaved ? this._onAddInterleaved(map) : this._onAddOverlaid(map);
61
+ }
38
62
 
63
+ private _onAddOverlaid(map: Map): HTMLDivElement {
39
64
  /* global document */
40
65
  const container = document.createElement('div');
41
66
  Object.assign(container.style, {
@@ -63,17 +88,29 @@ export default class MapboxOverlay implements IControl {
63
88
  return container;
64
89
  }
65
90
 
91
+ private _onAddInterleaved(map: Map): HTMLDivElement {
92
+ this._deck = new Deck({
93
+ ...this._props,
94
+ // @ts-ignore non-public map property
95
+ gl: map.painter.context.gl
96
+ });
97
+
98
+ map.on('styledata', this._handleStyleChange);
99
+ resolveLayers(map, this._deck, [], this._props.layers);
100
+
101
+ return document.createElement('div');
102
+ }
103
+
66
104
  /** Called when the control is removed from a map */
67
105
  onRemove(): void {
68
106
  const map = this._map;
69
107
 
70
108
  if (map) {
71
- map.off('resize', this._updateContainerSize);
72
- map.off('render', this._updateViewState);
73
- map.off('mousemove', this._handleMouseEvent);
74
- map.off('mouseout', this._handleMouseEvent);
75
- map.off('click', this._handleMouseEvent);
76
- map.off('dblclick', this._handleMouseEvent);
109
+ if (this._interleaved) {
110
+ this._onRemoveInterleaved(map);
111
+ } else {
112
+ this._onRemoveOverlaid(map);
113
+ }
77
114
  }
78
115
 
79
116
  this._deck?.finalize();
@@ -82,6 +119,20 @@ export default class MapboxOverlay implements IControl {
82
119
  this._container = undefined;
83
120
  }
84
121
 
122
+ private _onRemoveOverlaid(map: Map): void {
123
+ map.off('resize', this._updateContainerSize);
124
+ map.off('render', this._updateViewState);
125
+ map.off('mousemove', this._handleMouseEvent);
126
+ map.off('mouseout', this._handleMouseEvent);
127
+ map.off('click', this._handleMouseEvent);
128
+ map.off('dblclick', this._handleMouseEvent);
129
+ }
130
+
131
+ private _onRemoveInterleaved(map: Map): void {
132
+ map.off('styledata', this._handleStyleChange);
133
+ resolveLayers(map, this._deck, this._props.layers, []);
134
+ }
135
+
85
136
  getDefaultPosition() {
86
137
  return 'top-left';
87
138
  }
@@ -113,6 +164,10 @@ export default class MapboxOverlay implements IControl {
113
164
  }
114
165
  }
115
166
 
167
+ private _handleStyleChange = () => {
168
+ resolveLayers(this._map, this._deck, this._props.layers, this._props.layers);
169
+ };
170
+
116
171
  private _updateContainerSize = () => {
117
172
  if (this._map && this._container) {
118
173
  const {clientWidth, clientHeight} = this._map.getContainer();
@@ -0,0 +1,89 @@
1
+ import {_flatten as flatten} from '@deck.gl/core';
2
+ import MapboxLayer from './mapbox-layer';
3
+
4
+ import type {Deck, LayersList, Layer} from '@deck.gl/core';
5
+ import type {Map} from 'mapbox-gl';
6
+
7
+ const UNDEFINED_BEFORE_ID = '__UNDEFINED__';
8
+
9
+ /** Insert Deck layers into the mapbox Map according to the user-defined order */
10
+ export function resolveLayers(
11
+ map?: Map,
12
+ deck?: Deck,
13
+ oldLayers?: LayersList,
14
+ newLayers?: LayersList
15
+ ) {
16
+ // Wait until map style is loaded
17
+ // @ts-ignore non-public map property
18
+ if (!map || !deck || !map.style || !map.style._loaded) {
19
+ return;
20
+ }
21
+
22
+ const layers = flatten(newLayers, Boolean) as Layer[];
23
+
24
+ if (oldLayers !== newLayers) {
25
+ // Step 1: remove layers that no longer exist
26
+ const prevLayers = flatten(oldLayers, Boolean) as Layer[];
27
+ const prevLayerIds = new Set<string>(prevLayers.map(l => l.id));
28
+
29
+ for (const layer of layers) {
30
+ prevLayerIds.delete(layer.id);
31
+ }
32
+
33
+ for (const id of prevLayerIds) {
34
+ if (map.getLayer(id)) {
35
+ map.removeLayer(id);
36
+ }
37
+ }
38
+ }
39
+
40
+ // Step 2: add missing layers
41
+ for (const layer of layers) {
42
+ if (!map.getLayer(layer.id)) {
43
+ map.addLayer(
44
+ new MapboxLayer({id: layer.id, deck}),
45
+ // @ts-expect-error beforeId is not defined in LayerProps
46
+ layer.props.beforeId
47
+ );
48
+ }
49
+ }
50
+
51
+ // Step 3: check the order of layers
52
+ // If beforeId is defined, the deck layer should always render before the mapbox layer [beforeId]
53
+ // If beforeId is not defined, the deck layer should appear after all mapbox layers
54
+ // When two deck layers share the same beforeId, they are rendered in the order that is passed into Deck props.layers
55
+ // @ts-ignore non-public map property
56
+ const mapLayers: string[] = map.style._order;
57
+
58
+ // Group deck layers by beforeId
59
+ const layerGroups: Record<string, string[]> = {};
60
+ for (const layer of layers) {
61
+ // @ts-expect-error beforeId is not defined in LayerProps
62
+ let {beforeId} = layer.props;
63
+ if (!beforeId || !mapLayers.includes(beforeId)) {
64
+ beforeId = UNDEFINED_BEFORE_ID;
65
+ }
66
+ layerGroups[beforeId] = layerGroups[beforeId] || [];
67
+ layerGroups[beforeId].push(layer.id);
68
+ }
69
+
70
+ for (const beforeId in layerGroups) {
71
+ const layerGroup = layerGroups[beforeId];
72
+ let lastLayerIndex =
73
+ beforeId === UNDEFINED_BEFORE_ID ? mapLayers.length : mapLayers.indexOf(beforeId);
74
+ let lastLayerId = beforeId === UNDEFINED_BEFORE_ID ? undefined : beforeId;
75
+ for (let i = layerGroup.length - 1; i >= 0; i--) {
76
+ const layerId = layerGroup[i];
77
+ const layerIndex = mapLayers.indexOf(layerId);
78
+ if (layerIndex !== lastLayerIndex - 1) {
79
+ map.moveLayer(layerId, lastLayerId);
80
+ if (layerIndex > lastLayerIndex) {
81
+ // The last layer's index have changed
82
+ lastLayerIndex++;
83
+ }
84
+ }
85
+ lastLayerIndex--;
86
+ lastLayerId = layerId;
87
+ }
88
+ }
89
+ }
@@ -15,5 +15,11 @@ export declare function updateLayer(deck: Deck, layer: MapboxLayer<any>): void;
15
15
  export declare function drawLayer(deck: Deck, map: Map, layer: MapboxLayer<any>): void;
16
16
  export declare function getViewState(map: Map): MapViewState & {
17
17
  repeat: boolean;
18
+ padding: {
19
+ left: number;
20
+ right: number;
21
+ top: number;
22
+ bottom: number;
23
+ };
18
24
  };
19
25
  //# sourceMappingURL=deck-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deck-utils.d.ts","sourceRoot":"","sources":["../src/deck-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAoD,MAAM,eAAe,CAAC;AACtF,OAAO,KAAK,EAAY,YAAY,EAAQ,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,WAAW,CAAC;AASnC,wBAAgB,eAAe,CAAC,EAC9B,GAAG,EACH,EAAE,EACF,IAAI,EACL,EAAE;IACD,GAAG,EAAE,GAAG,GAAG;QAAC,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;KAAC,CAAC;IAClC,EAAE,EAAE,qBAAqB,CAAC;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,GAAG,IAAI,CAgEP;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAGlE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAGrE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,W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AC,GAAG,IAAI,CAkB7E;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,YAAY,GAAG;IACrD,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAaA"}
package/typed/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as MapboxLayer } from './mapbox-layer';
2
2
  export { default as MapboxOverlay } from './mapbox-overlay';
3
+ export type { MapboxOverlayProps } from './mapbox-overlay';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE1D,YAAY,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { Deck } from '@deck.gl/core/typed';
2
2
  import type { Map, IControl } from 'mapbox-gl';
3
3
  import type { DeckProps } from '@deck.gl/core/typed';
4
+ export declare type MapboxOverlayProps = Omit<DeckProps, 'width' | 'height' | 'gl' | 'parent' | 'canvas' | '_customRender' | 'viewState' | 'initialViewState' | 'controller'>;
4
5
  /**
5
6
  * Implements Mapbox [IControl](https://docs.mapbox.com/mapbox-gl-js/api/markers/#icontrol) interface
6
7
  * Renders deck.gl layers over the base map and automatically synchronizes with the map's camera
@@ -10,13 +11,20 @@ export default class MapboxOverlay implements IControl {
10
11
  private _deck?;
11
12
  private _map?;
12
13
  private _container?;
13
- constructor(props: DeckProps);
14
+ private _interleaved;
15
+ constructor(props: MapboxOverlayProps & {
16
+ interleaved?: boolean;
17
+ });
14
18
  /** Update (partial) props of the underlying Deck instance. */
15
- setProps(props: DeckProps): void;
19
+ setProps(props: MapboxOverlayProps): void;
16
20
  /** Called when the control is added to a map */
17
21
  onAdd(map: Map): HTMLDivElement;
22
+ private _onAddOverlaid;
23
+ private _onAddInterleaved;
18
24
  /** Called when the control is removed from a map */
19
25
  onRemove(): void;
26
+ private _onRemoveOverlaid;
27
+ private _onRemoveInterleaved;
20
28
  getDefaultPosition(): string;
21
29
  /** Forwards the Deck.pickObject method */
22
30
  pickObject(params: Parameters<Deck['pickObject']>[0]): ReturnType<Deck['pickObject']>;
@@ -26,6 +34,7 @@ export default class MapboxOverlay implements IControl {
26
34
  pickObjects(params: Parameters<Deck['pickObjects']>[0]): ReturnType<Deck['pickObjects']>;
27
35
  /** Remove from map and releases all resources */
28
36
  finalize(): void;
37
+ private _handleStyleChange;
29
38
  private _updateContainerSize;
30
39
  private _updateViewState;
31
40
  private _handleMouseEvent;
@@ -1 +1 @@
1
- {"version":3,"file":"mapbox-overlay.d.ts","sourceRoot":"","sources":["../src/mapbox-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAS,MAAM,eAAe,CAAC;AAG3C,OAAO,KAAK,EAAC,GAAG,EAAE,QAAQ,EAAgB,MAAM,WAAW,CAAC;AAE5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,QAAQ;IACpD,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,KAAK,CAAC,CAAO;IACrB,OAAO,CAAC,IAAI,CAAC,CAAM;IACnB,OAAO,CAAC,UAAU,CAA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AEF,OAAO,CAAC,iBAAiB,CA4CvB;CACH"}
@@ -0,0 +1,5 @@
1
+ import type { Deck, LayersList } from '@deck.gl/core/typed';
2
+ import type { Map } from 'mapbox-gl';
3
+ /** Insert Deck layers into the mapbox Map according to the user-defined order */
4
+ export declare function resolveLayers(map?: Map, deck?: Deck, oldLayers?: LayersList, newLayers?: LayersList): void;
5
+ //# sourceMappingURL=resolve-layers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-layers.d.ts","sourceRoot":"","sources":["../src/resolve-layers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,IAAI,EAAE,UAAU,EAAQ,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,WAAW,CAAC;AAInC,iFAAiF;AACjF,wBAAgB,aAAa,CAC3B,GAAG,CAAC,EAAE,GAAG,EACT,IAAI,CAAC,EAAE,IAAI,EACX,SAAS,CAAC,EAAE,UAAU,EACtB,SAAS,CAAC,EAAE,UAAU,QA2EvB"}