@trackunit/react-map-adapter-google 0.0.155 → 0.0.156
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.
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
var googleMaps = require('@deck.gl/google-maps');
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* `GoogleMapsOverlay` that only creates its `Deck` from Google's shared WebGL context.
|
|
7
|
+
*
|
|
8
|
+
* deck.gl 9.2.10–9.4.0 also creates it from the positioning overlay's `onAdd`; when that fires
|
|
9
|
+
* before `onContextRestored`, the `Deck` keeps its own canvas and nothing renders
|
|
10
|
+
* (https://github.com/visgl/deck.gl/issues/10704). Remove once the published adapter's
|
|
11
|
+
* `@deck.gl/google-maps` range includes https://github.com/visgl/deck.gl/pull/10792.
|
|
12
|
+
*/
|
|
13
|
+
class InterleavedGoogleMapsOverlay extends googleMaps.GoogleMapsOverlay {
|
|
14
|
+
_onAddVectorOverlay() {
|
|
15
|
+
// Interleaved mode draws into Google's canvas, so the positioning container is not needed either.
|
|
16
|
+
}
|
|
17
|
+
}
|
|
5
18
|
/**
|
|
6
19
|
* Creates one `GoogleMapsOverlay` per map.
|
|
7
20
|
*
|
|
@@ -9,11 +22,9 @@ var googleMaps = require('@deck.gl/google-maps');
|
|
|
9
22
|
*/
|
|
10
23
|
const createDeckGlGoogleMapsOverlayRuntime = () => ({
|
|
11
24
|
createOverlay: ({ map, onLoad, onError }) => {
|
|
12
|
-
const overlay = new
|
|
25
|
+
const overlay = new InterleavedGoogleMapsOverlay({
|
|
13
26
|
layers: [],
|
|
14
|
-
|
|
15
|
-
// before Google's WebGL context, deck keeps its own 1×1 canvas and the heatmap never shows.
|
|
16
|
-
interleaved: false,
|
|
27
|
+
interleaved: true,
|
|
17
28
|
onLoad,
|
|
18
29
|
onError,
|
|
19
30
|
});
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { GoogleMapsOverlay } from '@deck.gl/google-maps';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* `GoogleMapsOverlay` that only creates its `Deck` from Google's shared WebGL context.
|
|
5
|
+
*
|
|
6
|
+
* deck.gl 9.2.10–9.4.0 also creates it from the positioning overlay's `onAdd`; when that fires
|
|
7
|
+
* before `onContextRestored`, the `Deck` keeps its own canvas and nothing renders
|
|
8
|
+
* (https://github.com/visgl/deck.gl/issues/10704). Remove once the published adapter's
|
|
9
|
+
* `@deck.gl/google-maps` range includes https://github.com/visgl/deck.gl/pull/10792.
|
|
10
|
+
*/
|
|
11
|
+
class InterleavedGoogleMapsOverlay extends GoogleMapsOverlay {
|
|
12
|
+
_onAddVectorOverlay() {
|
|
13
|
+
// Interleaved mode draws into Google's canvas, so the positioning container is not needed either.
|
|
14
|
+
}
|
|
15
|
+
}
|
|
3
16
|
/**
|
|
4
17
|
* Creates one `GoogleMapsOverlay` per map.
|
|
5
18
|
*
|
|
@@ -7,11 +20,9 @@ import { GoogleMapsOverlay } from '@deck.gl/google-maps';
|
|
|
7
20
|
*/
|
|
8
21
|
const createDeckGlGoogleMapsOverlayRuntime = () => ({
|
|
9
22
|
createOverlay: ({ map, onLoad, onError }) => {
|
|
10
|
-
const overlay = new
|
|
23
|
+
const overlay = new InterleavedGoogleMapsOverlay({
|
|
11
24
|
layers: [],
|
|
12
|
-
|
|
13
|
-
// before Google's WebGL context, deck keeps its own 1×1 canvas and the heatmap never shows.
|
|
14
|
-
interleaved: false,
|
|
25
|
+
interleaved: true,
|
|
15
26
|
onLoad,
|
|
16
27
|
onError,
|
|
17
28
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-map-adapter-google",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.156",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"@loaders.gl/core": "~4.5.2",
|
|
15
15
|
"@luma.gl/core": "^9.4.1",
|
|
16
16
|
"@luma.gl/engine": "^9.4.1",
|
|
17
|
-
"@trackunit/react-map-adapter-shared": "0.0.
|
|
18
|
-
"@trackunit/react-map-color-utils": "0.0.
|
|
19
|
-
"@trackunit/geo-json-utils": "1.20.
|
|
17
|
+
"@trackunit/react-map-adapter-shared": "0.0.166",
|
|
18
|
+
"@trackunit/react-map-color-utils": "0.0.140",
|
|
19
|
+
"@trackunit/geo-json-utils": "1.20.1",
|
|
20
20
|
"@googlemaps/markerclusterer": "^2.6.2",
|
|
21
21
|
"@vis.gl/react-google-maps": "^1.7.1",
|
|
22
22
|
"es-toolkit": "^1.52.0",
|
|
23
23
|
"react-device-detect": "^2.2.3",
|
|
24
24
|
"zod": "^3.25.76",
|
|
25
|
-
"@trackunit/react-map-draw": "0.0.
|
|
25
|
+
"@trackunit/react-map-draw": "0.0.4",
|
|
26
26
|
"terra-draw-google-maps-adapter": "^1.6.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -9,7 +9,7 @@ export type CreateDeckGlGoogleMapsOverlayOptions = Readonly<{
|
|
|
9
9
|
map: google.maps.Map;
|
|
10
10
|
/** Called once deck.gl's WebGL device is ready. */
|
|
11
11
|
onLoad: () => void;
|
|
12
|
-
/** Receives deck.gl
|
|
12
|
+
/** Receives deck.gl overlay errors (e.g. device creation). Interleaved WebGL context loss is not forwarded here in @deck.gl/google-maps 9.4.0; see use-heatmap-plan.md (SAGA-900). */
|
|
13
13
|
onError: (cause: unknown) => void;
|
|
14
14
|
}>;
|
|
15
15
|
/** Factory after lazy-loading `@deck.gl/google-maps`. */
|