ol 9.0.1-dev.1709564113668 → 9.0.1-dev.1709649742924
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/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/package.json +1 -1
- package/source/Google.d.ts +11 -1
- package/source/Google.d.ts.map +1 -1
- package/source/Google.js +9 -3
- package/util.js +1 -1
package/package.json
CHANGED
package/source/Google.d.ts
CHANGED
|
@@ -40,6 +40,10 @@ export type Options = {
|
|
|
40
40
|
* [Custom styles](https://developers.google.com/maps/documentation/tile/style-reference) applied to the map.
|
|
41
41
|
*/
|
|
42
42
|
styles?: any[] | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Allow the attributions to be collapsed.
|
|
45
|
+
*/
|
|
46
|
+
attributionsCollapsible?: boolean | undefined;
|
|
43
47
|
/**
|
|
44
48
|
* Use interpolated values when resampling. By default,
|
|
45
49
|
* linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
|
|
@@ -150,6 +154,7 @@ export type SessionTokenResponse = {
|
|
|
150
154
|
* @property {Array<string>} [layerTypes] The layer types added to the map (e.g. `'layerRoadmap'`, `'layerStreetview'`, or `'layerTraffic'`).
|
|
151
155
|
* @property {boolean} [overlay=false] Display only the `layerTypes` and not the underlying `mapType` (only works if `layerTypes` is provided).
|
|
152
156
|
* @property {Array<Object>} [styles] [Custom styles](https://developers.google.com/maps/documentation/tile/style-reference) applied to the map.
|
|
157
|
+
* @property {boolean} [attributionsCollapsible=true] Allow the attributions to be collapsed.
|
|
153
158
|
* @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,
|
|
154
159
|
* linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
|
|
155
160
|
* @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
|
|
@@ -260,7 +265,12 @@ declare class Google extends TileImage {
|
|
|
260
265
|
* @private
|
|
261
266
|
*/
|
|
262
267
|
private createSession_;
|
|
263
|
-
|
|
268
|
+
/**
|
|
269
|
+
* @param {import('../Map.js').FrameState} frameState The frame state.
|
|
270
|
+
* @return {Promise<string>} The attributions.
|
|
271
|
+
* @private
|
|
272
|
+
*/
|
|
273
|
+
private fetchAttributions_;
|
|
264
274
|
}
|
|
265
275
|
import TileImage from './TileImage.js';
|
|
266
276
|
//# sourceMappingURL=Google.d.ts.map
|
package/source/Google.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Google.d.ts","sourceRoot":"","sources":["Google.js"],"names":[],"mappings":";;;;;SAiBc,MAAM
|
|
1
|
+
{"version":3,"file":"Google.d.ts","sourceRoot":"","sources":["Google.js"],"names":[],"mappings":";;;;;SAiBc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAgCN,MAAM;;;;cACN,MAAM;;;;YACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAWN,MAAM;;;;YACN,MAAM;;;;eACN,MAAM;;;;gBACN,MAAM;;;;iBACN,MAAM;;AAnDpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA2FjB;IArEC;;;OAGG;IACH,gBAA0B;IAE1B;;OAEG;IACH,QAFU,KAAK,GAAC,IAAI,CAEF;IA6BlB;;;OAGG;IACH,6BAA+C;IAE/C;;;OAGG;IACH,2BAAuB;IAEvB;;;OAGG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,qCAAiC;IAEjC;;;OAGG;IACH,gCAA4B;IAK9B;;;;;;;;;;;OAWG;IACH,YAXY,KAAK,GAAC,IAAI,CAarB;IAED;;;;;OAKG;IACH,uBAJW,MAAM,UACN,WAAW,GACV,QAAQ,QAAQ,CAAC,CAI5B;IAED;;;OAGG;IACH,uBAyDC;IAED;;;;OAIG;IACH,2BAmCC;CAMF;sBA/SqB,gBAAgB"}
|
package/source/Google.js
CHANGED
|
@@ -25,6 +25,7 @@ const maxZoom = 22;
|
|
|
25
25
|
* @property {Array<string>} [layerTypes] The layer types added to the map (e.g. `'layerRoadmap'`, `'layerStreetview'`, or `'layerTraffic'`).
|
|
26
26
|
* @property {boolean} [overlay=false] Display only the `layerTypes` and not the underlying `mapType` (only works if `layerTypes` is provided).
|
|
27
27
|
* @property {Array<Object>} [styles] [Custom styles](https://developers.google.com/maps/documentation/tile/style-reference) applied to the map.
|
|
28
|
+
* @property {boolean} [attributionsCollapsible=true] Allow the attributions to be collapsed.
|
|
28
29
|
* @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,
|
|
29
30
|
* linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
|
|
30
31
|
* @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
|
|
@@ -83,7 +84,7 @@ class Google extends TileImage {
|
|
|
83
84
|
const opaque = !(options.overlay === true);
|
|
84
85
|
|
|
85
86
|
super({
|
|
86
|
-
attributionsCollapsible:
|
|
87
|
+
attributionsCollapsible: options.attributionsCollapsible,
|
|
87
88
|
cacheSize: options.cacheSize,
|
|
88
89
|
crossOrigin: 'anonymous',
|
|
89
90
|
interpolate: options.interpolate,
|
|
@@ -253,12 +254,17 @@ class Google extends TileImage {
|
|
|
253
254
|
const timeout = Math.max(expiry - Date.now() - 60 * 1000, 1);
|
|
254
255
|
this.sessionRefreshId_ = setTimeout(() => this.createSession_(), timeout);
|
|
255
256
|
|
|
256
|
-
this.setAttributions(this.
|
|
257
|
+
this.setAttributions(this.fetchAttributions_.bind(this));
|
|
257
258
|
// even if the state is already ready, we want the change event
|
|
258
259
|
this.setState('ready');
|
|
259
260
|
}
|
|
260
261
|
|
|
261
|
-
|
|
262
|
+
/**
|
|
263
|
+
* @param {import('../Map.js').FrameState} frameState The frame state.
|
|
264
|
+
* @return {Promise<string>} The attributions.
|
|
265
|
+
* @private
|
|
266
|
+
*/
|
|
267
|
+
async fetchAttributions_(frameState) {
|
|
262
268
|
if (
|
|
263
269
|
frameState.viewHints[ViewHint.ANIMATING] ||
|
|
264
270
|
frameState.viewHints[ViewHint.INTERACTING] ||
|
package/util.js
CHANGED