ol 9.0.1-dev.1709564071933 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "9.0.1-dev.1709564071933",
3
+ "version": "9.0.1-dev.1709649742924",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
@@ -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
- fetchAttributions(frameState: any): Promise<string>;
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
@@ -1 +1 @@
1
- {"version":3,"file":"Google.d.ts","sourceRoot":"","sources":["Google.js"],"names":[],"mappings":";;;;;SAiBc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA+BN,MAAM;;;;cACN,MAAM;;;;YACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAWN,MAAM;;;;YACN,MAAM;;;;eACN,MAAM;;;;gBACN,MAAM;;;;iBACN,MAAM;;AAlDpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;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,oDAmCC;CAMF;sBAzSqB,gBAAgB"}
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: false,
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.fetchAttributions.bind(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
- async fetchAttributions(frameState) {
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] ||
@@ -134,6 +134,10 @@ export type Options = {
134
134
  * Request will be made through JSONP. If not provided, `tileJSON` must be configured.
135
135
  */
136
136
  url?: string | undefined;
137
+ /**
138
+ * Whether to wrap the world horizontally.
139
+ */
140
+ wrapX?: boolean | undefined;
137
141
  /**
138
142
  * Choose whether to use tiles with a higher or lower zoom level when between integer
139
143
  * zoom levels. See {@link module :ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
@@ -155,6 +159,7 @@ import Tile from '../Tile.js';
155
159
  * If not provided, `url` must be configured.
156
160
  * @property {string} [url] TileJSON endpoint that provides the configuration for this source.
157
161
  * Request will be made through JSONP. If not provided, `tileJSON` must be configured.
162
+ * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
158
163
  * @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
159
164
  * Choose whether to use tiles with a higher or lower zoom level when between integer
160
165
  * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
@@ -1 +1 @@
1
- {"version":3,"file":"UTFGrid.d.ts","sourceRoot":"","sources":["UTFGrid.js"],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8D;IAE9D;;;OAGG;IACH,yBAA2C;IAE3C;;;OAGG;IACH,kBAA0B;IAE1B;;;OAGG;IACH,eAAoC;IAuBtC;;;OAGG;IACH,mBAiBC;IAED;;;OAGG;IACH,oBAEC;IAED;;;;OAIG;IACH,eAHY,MAAM,GAAC,SAAS,CAK3B;IAED;;;;;;;;;;OAUG;IACH,6CAPW,OAAO,kBAAkB,EAAE,UAAU,cACrC,MAAM,2BACO,IAAI,uCA4B3B;IAED;;OAEG;IACH,sCAEC;IAED;;;;OAIG;IACH,2CAFW,OAAO,eAAe,EAAE,MAAM,QA8CxC;IAED;;;;;;;OAOG;IACH,WAPW,MAAM,KACN,MAAM,KACN,MAAM,cACN,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,GACrC,UAAU,CAuBtB;IAED;;;;;OAKG;IACH,WAJW,MAAM,KACN,MAAM,KACN,MAAM,QAOhB;CACF;uBAzfsB,WAAW"}
package/source/UTFGrid.js CHANGED
@@ -263,6 +263,7 @@ export class CustomTile extends Tile {
263
263
  * If not provided, `url` must be configured.
264
264
  * @property {string} [url] TileJSON endpoint that provides the configuration for this source.
265
265
  * Request will be made through JSONP. If not provided, `tileJSON` must be configured.
266
+ * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
266
267
  * @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
267
268
  * Choose whether to use tiles with a higher or lower zoom level when between integer
268
269
  * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
@@ -281,6 +282,7 @@ class UTFGrid extends TileSource {
281
282
  super({
282
283
  projection: getProjection('EPSG:3857'),
283
284
  state: 'loading',
285
+ wrapX: options.wrapX !== undefined ? options.wrapX : true,
284
286
  zDirection: options.zDirection,
285
287
  });
286
288
 
@@ -451,7 +453,7 @@ class UTFGrid extends TileSource {
451
453
 
452
454
  this.tileUrlFunction_ = createFromTemplates(grids, tileGrid);
453
455
 
454
- if (tileJSON['attribution'] !== undefined) {
456
+ if (tileJSON['attribution']) {
455
457
  const attributionExtent = extent !== undefined ? extent : gridExtent;
456
458
  this.setAttributions(function (frameState) {
457
459
  if (intersects(attributionExtent, frameState.extent)) {
package/util.js CHANGED
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '9.0.1-dev.1709564071933';
36
+ export const VERSION = '9.0.1-dev.1709649742924';