ol 9.2.5-dev.1718652616882 → 9.2.5-dev.1719254553242

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.
Files changed (143) hide show
  1. package/DataTile.d.ts +14 -0
  2. package/DataTile.d.ts.map +1 -1
  3. package/DataTile.js +24 -1
  4. package/Map.d.ts +1 -1
  5. package/Map.d.ts.map +1 -1
  6. package/Map.js +9 -10
  7. package/Tile.d.ts +2 -22
  8. package/Tile.d.ts.map +1 -1
  9. package/Tile.js +2 -77
  10. package/TileQueue.d.ts.map +1 -1
  11. package/TileQueue.js +6 -4
  12. package/VectorRenderTile.d.ts +8 -13
  13. package/VectorRenderTile.d.ts.map +1 -1
  14. package/VectorRenderTile.js +17 -24
  15. package/VectorTile.d.ts +5 -5
  16. package/VectorTile.d.ts.map +1 -1
  17. package/VectorTile.js +3 -3
  18. package/dist/ol.d.ts +10 -2
  19. package/dist/ol.d.ts.map +1 -1
  20. package/dist/ol.js +2 -2
  21. package/dist/ol.js.map +1 -1
  22. package/featureloader.d.ts +4 -4
  23. package/featureloader.d.ts.map +1 -1
  24. package/featureloader.js +2 -2
  25. package/format/EsriJSON.d.ts +1 -1
  26. package/format/Feature.d.ts +8 -8
  27. package/format/Feature.d.ts.map +1 -1
  28. package/format/Feature.js +7 -5
  29. package/format/GeoJSON.d.ts +9 -9
  30. package/format/GeoJSON.d.ts.map +1 -1
  31. package/format/GeoJSON.js +10 -14
  32. package/format/JSONFeature.d.ts +7 -7
  33. package/format/JSONFeature.d.ts.map +1 -1
  34. package/format/JSONFeature.js +9 -11
  35. package/format/MVT.d.ts +12 -12
  36. package/format/MVT.d.ts.map +1 -1
  37. package/format/MVT.js +12 -14
  38. package/format/TextFeature.d.ts +1 -1
  39. package/format/TopoJSON.d.ts +1 -1
  40. package/format/WKB.d.ts +1 -1
  41. package/format/XMLFeature.d.ts +1 -1
  42. package/interaction/DragAndDrop.d.ts +1 -1
  43. package/layer/BaseTile.d.ts +23 -6
  44. package/layer/BaseTile.d.ts.map +1 -1
  45. package/layer/BaseTile.js +22 -3
  46. package/layer/Tile.d.ts +1 -1
  47. package/layer/Tile.d.ts.map +1 -1
  48. package/layer/Tile.js +3 -1
  49. package/layer/VectorTile.d.ts +19 -6
  50. package/layer/VectorTile.d.ts.map +1 -1
  51. package/layer/VectorTile.js +20 -8
  52. package/layer/WebGLTile.d.ts +5 -10
  53. package/layer/WebGLTile.d.ts.map +1 -1
  54. package/layer/WebGLTile.js +3 -12
  55. package/package.json +1 -1
  56. package/renderer/Layer.d.ts +22 -25
  57. package/renderer/Layer.d.ts.map +1 -1
  58. package/renderer/Layer.js +36 -36
  59. package/renderer/canvas/TileLayer.d.ts +100 -38
  60. package/renderer/canvas/TileLayer.d.ts.map +1 -1
  61. package/renderer/canvas/TileLayer.js +542 -329
  62. package/renderer/canvas/VectorTileLayer.d.ts +11 -11
  63. package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
  64. package/renderer/canvas/VectorTileLayer.js +33 -46
  65. package/renderer/webgl/TileLayerBase.d.ts +0 -6
  66. package/renderer/webgl/TileLayerBase.d.ts.map +1 -1
  67. package/renderer/webgl/TileLayerBase.js +61 -78
  68. package/reproj/DataTile.d.ts.map +1 -1
  69. package/reproj/DataTile.js +103 -100
  70. package/source/BingMaps.d.ts +2 -2
  71. package/source/BingMaps.d.ts.map +1 -1
  72. package/source/BingMaps.js +1 -2
  73. package/source/CartoDB.d.ts +2 -2
  74. package/source/CartoDB.js +1 -1
  75. package/source/DataTile.d.ts +49 -20
  76. package/source/DataTile.d.ts.map +1 -1
  77. package/source/DataTile.js +56 -9
  78. package/source/GeoTIFF.d.ts +2 -6
  79. package/source/GeoTIFF.d.ts.map +1 -1
  80. package/source/GeoTIFF.js +3 -3
  81. package/source/Google.d.ts.map +1 -1
  82. package/source/Google.js +0 -2
  83. package/source/IIIF.d.ts +1 -1
  84. package/source/IIIF.js +1 -1
  85. package/source/ImageTile.d.ts +102 -0
  86. package/source/ImageTile.d.ts.map +1 -0
  87. package/source/ImageTile.js +208 -0
  88. package/source/OGCMapTile.d.ts +2 -2
  89. package/source/OGCMapTile.js +1 -1
  90. package/source/OGCVectorTile.d.ts +4 -4
  91. package/source/OGCVectorTile.js +2 -2
  92. package/source/OSM.d.ts +2 -7
  93. package/source/OSM.d.ts.map +1 -1
  94. package/source/OSM.js +1 -3
  95. package/source/StadiaMaps.d.ts +2 -2
  96. package/source/StadiaMaps.d.ts.map +1 -1
  97. package/source/StadiaMaps.js +2 -18
  98. package/source/Tile.d.ts +7 -36
  99. package/source/Tile.d.ts.map +1 -1
  100. package/source/Tile.js +5 -69
  101. package/source/TileArcGISRest.d.ts +2 -2
  102. package/source/TileArcGISRest.js +1 -1
  103. package/source/TileDebug.d.ts.map +1 -1
  104. package/source/TileDebug.js +0 -1
  105. package/source/TileImage.d.ts +7 -11
  106. package/source/TileImage.d.ts.map +1 -1
  107. package/source/TileImage.js +11 -43
  108. package/source/TileJSON.d.ts +2 -2
  109. package/source/TileJSON.js +1 -1
  110. package/source/TileWMS.d.ts +2 -2
  111. package/source/TileWMS.d.ts.map +1 -1
  112. package/source/TileWMS.js +1 -4
  113. package/source/UTFGrid.d.ts +1 -1
  114. package/source/UrlTile.d.ts +14 -12
  115. package/source/UrlTile.d.ts.map +1 -1
  116. package/source/UrlTile.js +12 -7
  117. package/source/Vector.d.ts +5 -5
  118. package/source/Vector.d.ts.map +1 -1
  119. package/source/Vector.js +3 -3
  120. package/source/VectorTile.d.ts +4 -17
  121. package/source/VectorTile.d.ts.map +1 -1
  122. package/source/VectorTile.js +10 -85
  123. package/source/WMTS.d.ts +2 -2
  124. package/source/WMTS.js +3 -3
  125. package/source/XYZ.d.ts +14 -17
  126. package/source/XYZ.d.ts.map +1 -1
  127. package/source/XYZ.js +7 -8
  128. package/source/Zoomify.d.ts +2 -2
  129. package/source/Zoomify.d.ts.map +1 -1
  130. package/source/Zoomify.js +3 -2
  131. package/source.d.ts +1 -0
  132. package/source.d.ts.map +1 -1
  133. package/source.js +1 -0
  134. package/tilecoord.d.ts +7 -0
  135. package/tilecoord.d.ts.map +1 -1
  136. package/tilecoord.js +11 -1
  137. package/tileurlfunction.d.ts +3 -7
  138. package/tileurlfunction.d.ts.map +1 -1
  139. package/tileurlfunction.js +14 -47
  140. package/uri.d.ts +23 -3
  141. package/uri.d.ts.map +1 -1
  142. package/uri.js +75 -0
  143. package/util.js +1 -1
@@ -6,7 +6,7 @@ export function quadKey(tileCoord: import('../tilecoord.js').TileCoord): string;
6
6
  export default BingMaps;
7
7
  export type Options = {
8
8
  /**
9
- * Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
9
+ * Deprecated. Use the cacheSize option on the layer instead.
10
10
  */
11
11
  cacheSize?: number | undefined;
12
12
  /**
@@ -149,7 +149,7 @@ export type CoverageArea = {
149
149
  };
150
150
  /**
151
151
  * @typedef {Object} Options
152
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
152
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
153
153
  * @property {boolean} [hidpi=false] If `true` hidpi tiles will be requested.
154
154
  * @property {string} [culture='en-us'] Culture code.
155
155
  * @property {string} key Bing Maps API key. Get yours at https://www.bingmapsportal.com/.
@@ -1 +1 @@
1
- {"version":3,"file":"BingMaps.d.ts","sourceRoot":"","sources":["BingMaps.js"],"names":[],"mappings":"AAWA;;;GAGG;AACH,mCAHW,OAAO,iBAAiB,EAAE,SAAS,GAClC,MAAM,CAoBjB;;;;;;;;;;;;;;;;;;SAkBa,MAAM;;;;gBACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAyBN,MAAM;;;;uBACN,MAAM;;;;8BACN,MAAM;;;;kBACN,MAAM,WAAW,CAAC;;;;;;eAKlB,MAAM,QAAQ,CAAC;;;;;;iBAKf,MAAM;;;;gBACN,MAAM;;;;aACN,MAAM;;;;aACN,MAAM;;;;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;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;GAMG;AAEH;;;GAGG;AAEH;;;;;;;;;GASG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AAEH;;;;GAIG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAkEjB;IA/CC;;;OAGG;IACH,eAAmB;IAEnB;;;OAGG;IACH,iBAAyE;IAEzE;;;OAGG;IACH,iBAAoE;IAEpE;;;OAGG;IACH,gBAA0B;IAE1B;;;OAGG;IACH,oBAAqC;IAErC;;;OAGG;IACH,0BAAiD;IAenD;;;;;OAKG;IACH,aAHY,MAAM,CAKjB;IAED;;;;;OAKG;IACH,iBAHY,MAAM,CAKjB;IAED;;OAEG;IACH,wCAFW,+BAA+B,QA4HzC;CACF;sBAzUqB,gBAAgB"}
@@ -46,7 +46,7 @@ const TOS_ATTRIBUTION =
46
46
 
47
47
  /**
48
48
  * @typedef {Object} Options
49
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
49
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
50
50
  * @property {boolean} [hidpi=false] If `true` hidpi tiles will be requested.
51
51
  * @property {string} [culture='en-us'] Culture code.
52
52
  * @property {string} key Bing Maps API key. Get yours at https://www.bingmapsportal.com/.
@@ -126,7 +126,6 @@ class BingMaps extends TileImage {
126
126
  cacheSize: options.cacheSize,
127
127
  crossOrigin: 'anonymous',
128
128
  interpolate: options.interpolate,
129
- opaque: true,
130
129
  projection: getProjection('EPSG:3857'),
131
130
  reprojectionErrorThreshold: options.reprojectionErrorThreshold,
132
131
  state: 'loading',
@@ -5,7 +5,7 @@ export type Options = {
5
5
  */
6
6
  attributions?: import("./Source.js").AttributionLike | undefined;
7
7
  /**
8
- * Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
8
+ * Deprecated. Use the cacheSize option on the layer instead.
9
9
  */
10
10
  cacheSize?: number | undefined;
11
11
  /**
@@ -75,7 +75,7 @@ export type CartoDBLayerInfo = {
75
75
  /**
76
76
  * @typedef {Object} Options
77
77
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
78
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
78
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
79
79
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
80
80
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
81
81
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
package/source/CartoDB.js CHANGED
@@ -7,7 +7,7 @@ import XYZ from './XYZ.js';
7
7
  /**
8
8
  * @typedef {Object} Options
9
9
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
10
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
10
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
11
11
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
12
12
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
13
13
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
@@ -1,9 +1,25 @@
1
1
  export default DataTileSource;
2
+ export type CrossOriginAttribute = 'anonymous' | 'use-credentials';
3
+ export type LoaderOptions = {
4
+ /**
5
+ * An abort controller signal.
6
+ */
7
+ signal: AbortSignal;
8
+ /**
9
+ * The cross-origin attribute for images.
10
+ */
11
+ crossOrigin?: CrossOriginAttribute | undefined;
12
+ /**
13
+ * The maximum y coordinate at the given z level. Will be undefined if the
14
+ * underlying tile grid does not have a known extent.
15
+ */
16
+ maxY?: number | undefined;
17
+ };
2
18
  /**
3
19
  * Data tile loading function. The function is called with z, x, and y tile coordinates and
4
20
  * returns {@link import ("../DataTile.js").Data data} for a tile or a promise for the same.
5
21
  */
6
- export type Loader = (arg0: number, arg1: number, arg2: number) => (import("../DataTile.js").Data | Promise<import("../DataTile.js").Data>);
22
+ export type Loader = (arg0: number, arg1: number, arg2: number, arg3: LoaderOptions) => (import("../DataTile.js").Data | Promise<import("../DataTile.js").Data>);
7
23
  export type Options = {
8
24
  /**
9
25
  * Data loader. Called with z, x, and y tile coordinates.
@@ -50,10 +66,6 @@ export type Options = {
50
66
  * Tile grid.
51
67
  */
52
68
  tileGrid?: import("../tilegrid.js").TileGrid | undefined;
53
- /**
54
- * Whether the layer is opaque.
55
- */
56
- opaque?: boolean | undefined;
57
69
  /**
58
70
  * The source state.
59
71
  */
@@ -75,11 +87,29 @@ export type Options = {
75
87
  * the nearest neighbor is used when resampling.
76
88
  */
77
89
  interpolate?: boolean | undefined;
90
+ /**
91
+ * The crossOrigin property to pass to loaders for image data.
92
+ */
93
+ crossOrigin?: CrossOriginAttribute | undefined;
94
+ /**
95
+ * Key for use in caching tiles.
96
+ */
97
+ key?: string | undefined;
78
98
  };
99
+ /**
100
+ * @typedef {'anonymous'|'use-credentials'} CrossOriginAttribute
101
+ */
102
+ /**
103
+ * @typedef {Object} LoaderOptions
104
+ * @property {AbortSignal} signal An abort controller signal.
105
+ * @property {CrossOriginAttribute} [crossOrigin] The cross-origin attribute for images.
106
+ * @property {number} [maxY] The maximum y coordinate at the given z level. Will be undefined if the
107
+ * underlying tile grid does not have a known extent.
108
+ */
79
109
  /**
80
110
  * Data tile loading function. The function is called with z, x, and y tile coordinates and
81
111
  * returns {@link import("../DataTile.js").Data data} for a tile or a promise for the same.
82
- * @typedef {function(number, number, number) : (import("../DataTile.js").Data|Promise<import("../DataTile.js").Data>)} Loader
112
+ * @typedef {function(number, number, number, LoaderOptions) : (import("../DataTile.js").Data|Promise<import("../DataTile.js").Data>)} Loader
83
113
  */
84
114
  /**
85
115
  * @typedef {Object} Options
@@ -98,22 +128,25 @@ export type Options = {
98
128
  * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.
99
129
  * @property {import("../proj.js").ProjectionLike} [projection='EPSG:3857'] Tile projection.
100
130
  * @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid.
101
- * @property {boolean} [opaque=false] Whether the layer is opaque.
102
131
  * @property {import("./Source.js").State} [state] The source state.
103
132
  * @property {boolean} [wrapX=false] Render tiles beyond the antimeridian.
104
133
  * @property {number} [transition] Transition time when fading in new tiles (in milliseconds).
105
134
  * @property {number} [bandCount=4] Number of bands represented in the data.
106
135
  * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,
107
136
  * the nearest neighbor is used when resampling.
137
+ * @property {CrossOriginAttribute} [crossOrigin='anonymous'] The crossOrigin property to pass to loaders for image data.
138
+ * @property {string} [key] Key for use in caching tiles.
108
139
  */
109
140
  /**
110
141
  * @classdesc
111
142
  * A source for typed array data tiles.
112
143
  *
113
144
  * @fires import("./Tile.js").TileSourceEvent
145
+ * @template {import("../Tile.js").default} [TileType=DataTile]
146
+ * @extends TileSource<TileType>
114
147
  * @api
115
148
  */
116
- declare class DataTileSource extends TileSource {
149
+ declare class DataTileSource<TileType extends import("../Tile.js").default = DataTile> extends TileSource<TileType> {
117
150
  /**
118
151
  * @param {Options} options DataTile source options.
119
152
  */
@@ -161,6 +194,11 @@ declare class DataTileSource extends TileSource {
161
194
  * @type {!Object<string, import("../TileCache.js").default>}
162
195
  */
163
196
  private tileCacheForProjection_;
197
+ /**
198
+ * @private
199
+ * @type {CrossOriginAttribute}
200
+ */
201
+ private crossOrigin_;
164
202
  /**
165
203
  * Set the source tile sizes. The length of the array is expected to match the number of
166
204
  * levels in the tile grid.
@@ -187,18 +225,9 @@ declare class DataTileSource extends TileSource {
187
225
  * @param {number} y Tile coordinate y.
188
226
  * @param {import("../proj/Projection.js").default} targetProj The output projection.
189
227
  * @param {import("../proj/Projection.js").default} sourceProj The input projection.
190
- * @return {!DataTile} Tile.
228
+ * @return {!TileType} Tile.
191
229
  */
192
- getReprojTile_(z: number, x: number, y: number, targetProj: import("../proj/Projection.js").default, sourceProj: import("../proj/Projection.js").default): DataTile;
193
- /**
194
- * @param {number} z Tile coordinate z.
195
- * @param {number} x Tile coordinate x.
196
- * @param {number} y Tile coordinate y.
197
- * @param {number} pixelRatio Pixel ratio.
198
- * @param {import("../proj/Projection.js").default} projection Projection.
199
- * @return {!DataTile} Tile.
200
- */
201
- getTile(z: number, x: number, y: number, pixelRatio: number, projection: import("../proj/Projection.js").default): DataTile;
230
+ getReprojTile_(z: number, x: number, y: number, targetProj: import("../proj/Projection.js").default, sourceProj: import("../proj/Projection.js").default): TileType;
202
231
  /**
203
232
  * Sets the tile grid to use when reprojecting the tiles to the given
204
233
  * projection instead of the default tile grid for the projection.
@@ -213,6 +242,6 @@ declare class DataTileSource extends TileSource {
213
242
  */
214
243
  setTileGridForProjection(projection: import("../proj.js").ProjectionLike, tilegrid: import("../tilegrid/TileGrid.js").default): void;
215
244
  }
216
- import TileSource from './Tile.js';
217
245
  import DataTile from '../DataTile.js';
246
+ import TileSource from './Tile.js';
218
247
  //# sourceMappingURL=DataTile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataTile.d.ts","sourceRoot":"","sources":["DataTile.js"],"names":[],"mappings":";;;;;4BAwBsB,MAAM,QAAE,MAAM,QAAE,MAAM,KAAI,CAAC,OAAO,gBAAgB,EAAE,IAAI,GAAC,QAAQ,OAAO,gBAAgB,EAAE,IAAI,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBxG,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AArBjD;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA6EjB;IA/CC;;;OAGG;IACH,gBAAgE;IAEhE;;;OAGG;IACH,kBAAmE;IAEnE;;;OAGG;IACH,mBAAsB;IAEtB;;;OAGG;IACH,yBAA0B;IAE1B;;OAEG;IACH,gBAA6B;IAmL/B;;;OAGG;IAC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G;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAmFjB;IArDC;;;OAGG;IACH,gBAAgE;IAEhE;;;OAGG;IACH,kBAAmE;IAEnE;;;OAGG;IACH,mBAAsB;IAEtB;;;OAGG;IACH,yBAA0B;IAE1B;;OAEG;IACH,gBAA6B;IAmN/B;;;OAGG;IACH,yBAFW,OAAO,oBAAoB,EAAE,OAAO,QAsB9C;IAvOC;;OAEG;IACH,WAFU,MAAM,CAEwD;IAExE;;;OAGG;IACH,+BAAgC;IAEhC;;;OAGG;IACH,gCAAiC;IAEjC;;;OAGG;IACH,qBAAsD;IAGxD;;;;;OAKG;IACH,kCAFW,MAAM,OAAO,YAAY,EAAE,IAAI,CAAC,QAI1C;IAED;;;;;;OAMG;IACH,yBAHW,MAAM,GACL,OAAO,YAAY,EAAE,IAAI,CAWpC;IAeD;;;OAGG;IACH,4BAHW,MAAM,QAKhB;IAED;;;;;;;OAOG;IACH,kBAPW,MAAM,KACN,MAAM,KACN,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,cACvC,OAAO,uBAAuB,EAAE,OAAO,GACrC,QAAQ,CAqDpB;IAuHD;;;;;;;;;;;OAWG;IACH,qCAJW,OAAO,YAAY,EAAE,cAAc,YACnC,OAAO,yBAAyB,EAAE,OAAO,QAWnD;CAyCF;qBA/boB,gBAAgB;uBAKK,WAAW"}
@@ -19,10 +19,22 @@ import {getUid} from '../util.js';
19
19
  import {toPromise} from '../functions.js';
20
20
  import {toSize} from '../size.js';
21
21
 
22
+ /**
23
+ * @typedef {'anonymous'|'use-credentials'} CrossOriginAttribute
24
+ */
25
+
26
+ /**
27
+ * @typedef {Object} LoaderOptions
28
+ * @property {AbortSignal} signal An abort controller signal.
29
+ * @property {CrossOriginAttribute} [crossOrigin] The cross-origin attribute for images.
30
+ * @property {number} [maxY] The maximum y coordinate at the given z level. Will be undefined if the
31
+ * underlying tile grid does not have a known extent.
32
+ */
33
+
22
34
  /**
23
35
  * Data tile loading function. The function is called with z, x, and y tile coordinates and
24
36
  * returns {@link import("../DataTile.js").Data data} for a tile or a promise for the same.
25
- * @typedef {function(number, number, number) : (import("../DataTile.js").Data|Promise<import("../DataTile.js").Data>)} Loader
37
+ * @typedef {function(number, number, number, LoaderOptions) : (import("../DataTile.js").Data|Promise<import("../DataTile.js").Data>)} Loader
26
38
  */
27
39
 
28
40
  /**
@@ -42,13 +54,14 @@ import {toSize} from '../size.js';
42
54
  * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.
43
55
  * @property {import("../proj.js").ProjectionLike} [projection='EPSG:3857'] Tile projection.
44
56
  * @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid.
45
- * @property {boolean} [opaque=false] Whether the layer is opaque.
46
57
  * @property {import("./Source.js").State} [state] The source state.
47
58
  * @property {boolean} [wrapX=false] Render tiles beyond the antimeridian.
48
59
  * @property {number} [transition] Transition time when fading in new tiles (in milliseconds).
49
60
  * @property {number} [bandCount=4] Number of bands represented in the data.
50
61
  * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,
51
62
  * the nearest neighbor is used when resampling.
63
+ * @property {CrossOriginAttribute} [crossOrigin='anonymous'] The crossOrigin property to pass to loaders for image data.
64
+ * @property {string} [key] Key for use in caching tiles.
52
65
  */
53
66
 
54
67
  /**
@@ -56,6 +69,8 @@ import {toSize} from '../size.js';
56
69
  * A source for typed array data tiles.
57
70
  *
58
71
  * @fires import("./Tile.js").TileSourceEvent
72
+ * @template {import("../Tile.js").default} [TileType=DataTile]
73
+ * @extends TileSource<TileType>
59
74
  * @api
60
75
  */
61
76
  class DataTileSource extends TileSource {
@@ -83,11 +98,11 @@ class DataTileSource extends TileSource {
83
98
  attributionsCollapsible: options.attributionsCollapsible,
84
99
  projection: projection,
85
100
  tileGrid: tileGrid,
86
- opaque: options.opaque,
87
101
  state: options.state,
88
102
  wrapX: options.wrapX,
89
103
  transition: options.transition,
90
104
  interpolate: options.interpolate,
105
+ key: options.key,
91
106
  });
92
107
 
93
108
  /**
@@ -137,6 +152,12 @@ class DataTileSource extends TileSource {
137
152
  * @type {!Object<string, import("../TileCache.js").default>}
138
153
  */
139
154
  this.tileCacheForProjection_ = {};
155
+
156
+ /**
157
+ * @private
158
+ * @type {CrossOriginAttribute}
159
+ */
160
+ this.crossOrigin_ = options.crossOrigin || 'anonymous';
140
161
  }
141
162
 
142
163
  /**
@@ -194,7 +215,7 @@ class DataTileSource extends TileSource {
194
215
  * @param {number} y Tile coordinate y.
195
216
  * @param {import("../proj/Projection.js").default} targetProj The output projection.
196
217
  * @param {import("../proj/Projection.js").default} sourceProj The input projection.
197
- * @return {!DataTile} Tile.
218
+ * @return {!TileType} Tile.
198
219
  */
199
220
  getReprojTile_(z, x, y, targetProj, sourceProj) {
200
221
  const cache = this.getTileCacheForProjection(targetProj);
@@ -240,9 +261,11 @@ class DataTileSource extends TileSource {
240
261
  getTileFunction: (z, x, y, pixelRatio) =>
241
262
  this.getTile(z, x, y, pixelRatio, sourceProj),
242
263
  },
243
- this.tileOptions,
264
+ /** @type {import("../reproj/DataTile.js").Options} */ (this.tileOptions),
265
+ );
266
+ const newTile = /** @type {TileType} */ (
267
+ /** @type {*} */ (new ReprojDataTile(options))
244
268
  );
245
- const newTile = new ReprojDataTile(options);
246
269
  newTile.key = this.getKey();
247
270
  return newTile;
248
271
  }
@@ -253,7 +276,7 @@ class DataTileSource extends TileSource {
253
276
  * @param {number} y Tile coordinate y.
254
277
  * @param {number} pixelRatio Pixel ratio.
255
278
  * @param {import("../proj/Projection.js").default} projection Projection.
256
- * @return {!DataTile} Tile.
279
+ * @return {TileType|null} Tile (or null if outside source extent).
257
280
  */
258
281
  getTile(z, x, y, pixelRatio, projection) {
259
282
  const sourceProjection = this.getProjection();
@@ -273,22 +296,46 @@ class DataTileSource extends TileSource {
273
296
 
274
297
  const sourceLoader = this.loader_;
275
298
 
299
+ const controller = new AbortController();
300
+
301
+ /**
302
+ * @type {LoaderOptions}
303
+ */
304
+ const loaderOptions = {
305
+ signal: controller.signal,
306
+ crossOrigin: this.crossOrigin_,
307
+ };
308
+
309
+ const tileCoord = this.getTileCoordForTileUrlFunction([z, x, y]);
310
+ if (!tileCoord) {
311
+ return null;
312
+ }
313
+
314
+ const requestZ = tileCoord[0];
315
+ const requestX = tileCoord[1];
316
+ const requestY = tileCoord[2];
276
317
  function loader() {
277
318
  return toPromise(function () {
278
- return sourceLoader(z, x, y);
319
+ return sourceLoader(requestZ, requestX, requestY, loaderOptions);
279
320
  });
280
321
  }
281
322
 
323
+ /**
324
+ * @type {import("../DataTile.js").Options}
325
+ */
282
326
  const options = Object.assign(
283
327
  {
284
328
  tileCoord: [z, x, y],
285
329
  loader: loader,
286
330
  size: size,
331
+ controller: controller,
287
332
  },
288
333
  this.tileOptions,
289
334
  );
290
335
 
291
- const tile = new DataTile(options);
336
+ const tile = /** @type {TileType} */ (
337
+ /** @type {*} */ (new DataTile(options))
338
+ );
292
339
  tile.key = this.getKey();
293
340
  tile.addEventListener(EventType.CHANGE, this.handleTileChange_);
294
341
 
@@ -152,10 +152,6 @@ export type Options = {
152
152
  * to `false` will make it so any `min` and `max` properties on sources are ignored.
153
153
  */
154
154
  normalize?: boolean | undefined;
155
- /**
156
- * Whether the layer is opaque.
157
- */
158
- opaque?: boolean | undefined;
159
155
  /**
160
156
  * Source projection. If not provided, the GeoTIFF metadata
161
157
  * will be read for projection information.
@@ -208,7 +204,6 @@ export type Options = {
208
204
  * 0 and 1 with scaling factors based on the raster statistics or `min` and `max` properties of each source.
209
205
  * If instead you want to work with the raw values in a style expression, set this to `false`. Setting this option
210
206
  * to `false` will make it so any `min` and `max` properties on sources are ignored.
211
- * @property {boolean} [opaque=false] Whether the layer is opaque.
212
207
  * @property {import("../proj.js").ProjectionLike} [projection] Source projection. If not provided, the GeoTIFF metadata
213
208
  * will be read for projection information.
214
209
  * @property {number} [transition=250] Duration of the opacity transition for rendering.
@@ -225,7 +220,7 @@ export type Options = {
225
220
  *
226
221
  * @api
227
222
  */
228
- declare class GeoTIFFSource extends DataTile {
223
+ declare class GeoTIFFSource extends DataTile<import("../DataTile.js").default> {
229
224
  /**
230
225
  * @param {Options} options Data tile options.
231
226
  */
@@ -324,6 +319,7 @@ declare class GeoTIFFSource extends DataTile {
324
319
  * @param {number} z The z tile index.
325
320
  * @param {number} x The x tile index.
326
321
  * @param {number} y The y tile index.
322
+ * @param {import('./DataTile.js').LoaderOptions} options The loader options.
327
323
  * @return {Promise} The composed tile data.
328
324
  * @private
329
325
  */
@@ -1 +1 @@
1
- {"version":3,"file":"GeoTIFF.d.ts","sourceRoot":"","sources":["GeoTIFF.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAoFc,MAAM;;;;wBACN,MAAM;;;;4BACN,MAAM;;;;6BACN,MAAM;;;;6BACN,MAAM;;;;0BACN,MAAM;;;;2BACN,MAAM;;;;2BACN,MAAM;;sBAIP,OAAO,SAAS,EAAE,OAAO;2BAIzB,OAAO,SAAS,EAAE,YAAY;;;;;wBAK7B,MAAM;;;;wBACN,MAAM;;2BASP,OAAO,SAAS,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAqO7B,MAAM,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBjB,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;AAlCjD;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAyGjB;IA5FC;;;OAGG;IACH,oBAAkC;IAIlC;;;OAGG;IACH,uBAA2C;IAE3C;;;OAGG;IACH,uBAA2C;IAE3C;;;OAGG;IACH,qBAAyC;IAEzC;;;OAGG;IACH,2BAA+C;IAE/C;;;OAGG;IACH,yBAAqB;IAErB;;;OAGG;IACH,sBAAkB;IAElB;;;OAGG;IACH,kBAA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B;;;OAGG;IACH,sBAAkB;IAElB;;;OAGG;IACH,kBAAc;IAEd;;;OAGG;IACH,mBAA6C;IAE7C;;;OAGG;IACH,kBAAsB;IAEtB;;;OAGG;IACH,eAAkB;IAElB;;OAEG;IACH,eAFU,IAAI,GAAC,KAAK,GAAC,MAAM,CAEuB;IAuBpD;;;;;;;;;;;OAWG;IACH,YAXY,KAAK,CAahB;IAED;;;;;;;;OAQG;IACH,6BAHW,MAAM,MAAM,YAAY,CAAC,CAAC,QAapC;IAED;;;;;;OAMG;IACH,mBAwOC;IAED;;;;;;;OAOG;IACH,kBA8EC;IAED;;;;;OAKG;IACH,qBA4GC;CACF;qBAn8BoB,eAAe"}
package/source/GeoTIFF.js CHANGED
@@ -358,7 +358,6 @@ function getMaxForDataType(array) {
358
358
  * 0 and 1 with scaling factors based on the raster statistics or `min` and `max` properties of each source.
359
359
  * If instead you want to work with the raw values in a style expression, set this to `false`. Setting this option
360
360
  * to `false` will make it so any `min` and `max` properties on sources are ignored.
361
- * @property {boolean} [opaque=false] Whether the layer is opaque.
362
361
  * @property {import("../proj.js").ProjectionLike} [projection] Source projection. If not provided, the GeoTIFF metadata
363
362
  * will be read for projection information.
364
363
  * @property {number} [transition=250] Duration of the opacity transition for rendering.
@@ -385,7 +384,6 @@ class GeoTIFFSource extends DataTile {
385
384
  state: 'loading',
386
385
  tileGrid: null,
387
386
  projection: options.projection || null,
388
- opaque: options.opaque,
389
387
  transition: options.transition,
390
388
  interpolate: options.interpolate !== false,
391
389
  wrapX: options.wrapX,
@@ -767,10 +765,11 @@ class GeoTIFFSource extends DataTile {
767
765
  * @param {number} z The z tile index.
768
766
  * @param {number} x The x tile index.
769
767
  * @param {number} y The y tile index.
768
+ * @param {import('./DataTile.js').LoaderOptions} options The loader options.
770
769
  * @return {Promise} The composed tile data.
771
770
  * @private
772
771
  */
773
- loadTile_(z, x, y) {
772
+ loadTile_(z, x, y, options) {
774
773
  const sourceTileSize = this.getTileSize(z);
775
774
  const sourceCount = this.sourceImagery_.length;
776
775
  const requests = new Array(sourceCount * 2);
@@ -816,6 +815,7 @@ class GeoTIFFSource extends DataTile {
816
815
  fillValue: fillValue,
817
816
  pool: pool,
818
817
  interleave: false,
818
+ signal: options.signal,
819
819
  };
820
820
  if (readRGB(this.convertToRGB_, image)) {
821
821
  requests[sourceIndex] = image.readRGB(readOptions);
@@ -1 +1 @@
1
- {"version":3,"file":"Google.d.ts","sourceRoot":"","sources":["Google.js"],"names":[],"mappings":";;;;;SAiBc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCN,MAAM;;;;cACN,MAAM;;;;YACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAYN,MAAM;;;;YACN,MAAM;;;;eACN,MAAM;;;;gBACN,MAAM;;;;iBACN,MAAM;;AArDpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA8FjB;IAxEC;;;OAGG;IACH,gBAA0B;IAE1B;;OAEG;IACH,QAFU,KAAK,GAAC,IAAI,CAEF;IAgClB;;;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;sBApTqB,gBAAgB"}
1
+ {"version":3,"file":"Google.d.ts","sourceRoot":"","sources":["Google.js"],"names":[],"mappings":";;;;;SAiBc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCN,MAAM;;;;cACN,MAAM;;;;YACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAYN,MAAM;;;;YACN,MAAM;;;;eACN,MAAM;;;;gBACN,MAAM;;;;iBACN,MAAM;;AArDpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA4FjB;IAxEC;;;OAGG;IACH,gBAA0B;IAE1B;;OAEG;IACH,QAFU,KAAK,GAAC,IAAI,CAEF;IAgClB;;;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;sBAlTqB,gBAAgB"}
package/source/Google.js CHANGED
@@ -83,14 +83,12 @@ class Google extends TileImage {
83
83
  */
84
84
  constructor(options) {
85
85
  const highDpi = !!options.highDpi;
86
- const opaque = !(options.overlay === true);
87
86
 
88
87
  super({
89
88
  attributionsCollapsible: options.attributionsCollapsible,
90
89
  cacheSize: options.cacheSize,
91
90
  crossOrigin: 'anonymous',
92
91
  interpolate: options.interpolate,
93
- opaque: opaque,
94
92
  projection: 'EPSG:3857',
95
93
  reprojectionErrorThreshold: options.reprojectionErrorThreshold,
96
94
  state: 'loading',
package/source/IIIF.d.ts CHANGED
@@ -9,7 +9,7 @@ export type Options = {
9
9
  */
10
10
  attributionsCollapsible?: boolean | undefined;
11
11
  /**
12
- * Size of the cache.
12
+ * Deprecated. Use the cacheSize option on the layer instead.
13
13
  */
14
14
  cacheSize?: number | undefined;
15
15
  /**
package/source/IIIF.js CHANGED
@@ -15,7 +15,7 @@ import {toSize} from '../size.js';
15
15
  * @typedef {Object} Options
16
16
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
17
17
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
18
- * @property {number} [cacheSize] Size of the cache.
18
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
19
19
  * @property {null|string} [crossOrigin] The value for the crossOrigin option of the request.
20
20
  * @property {import("../extent.js").Extent} [extent=[0, -height, width, 0]] The extent.
21
21
  * @property {string} [format='jpg'] Requested image format.
@@ -0,0 +1,102 @@
1
+ export default ImageTileSource;
2
+ /**
3
+ * Image tile loading function. The function is called with z, x, and y tile coordinates and
4
+ * returns an {@link import ("../DataTile.js").ImageLike image} or a promise for the same.
5
+ */
6
+ export type Loader = (arg0: number, arg1: number, arg2: number, arg3: import("./DataTile.js").LoaderOptions) => (import("../DataTile.js").ImageLike | Promise<import("../DataTile.js").ImageLike>);
7
+ export type UrlGetter = (arg0: number, arg1: number, arg2: number, arg3: import("./DataTile.js").LoaderOptions) => string;
8
+ export type UrlLike = string | Array<string> | UrlGetter;
9
+ export type Options = {
10
+ /**
11
+ * The image URL template. In addition to a single URL template, an array of URL templates or a function
12
+ * can be provided. If a function is provided, it will be called with z, x, y tile coordinates and loader options and should
13
+ * return a URL.
14
+ */
15
+ url?: UrlLike | undefined;
16
+ /**
17
+ * Data loader. Called with z, x, and y tile coordinates.
18
+ * Returns an {@link import ("../DataTile.js").ImageLike image} for a tile or a promise for the same.
19
+ * The promise should not resolve until the image is loaded. If the `url` option is provided, a loader will be created.
20
+ */
21
+ loader?: Loader | undefined;
22
+ /**
23
+ * Attributions.
24
+ */
25
+ attributions?: import("./Source.js").AttributionLike | undefined;
26
+ /**
27
+ * Attributions are collapsible.
28
+ */
29
+ attributionsCollapsible?: boolean | undefined;
30
+ /**
31
+ * Optional max zoom level. Not used if `tileGrid` is provided.
32
+ */
33
+ maxZoom?: number | undefined;
34
+ /**
35
+ * Optional min zoom level. Not used if `tileGrid` is provided.
36
+ */
37
+ minZoom?: number | undefined;
38
+ /**
39
+ * The pixel width and height of the source tiles.
40
+ * This may be different than the rendered pixel size if a `tileGrid` is provided.
41
+ */
42
+ tileSize?: number | import("../size.js").Size | undefined;
43
+ /**
44
+ * The size in pixels of the gutter around data tiles to ignore.
45
+ * This allows artifacts of rendering at tile edges to be ignored.
46
+ * Supported data should be wider and taller than the tile size by a value of `2 x gutter`.
47
+ */
48
+ gutter?: number | undefined;
49
+ /**
50
+ * Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.
51
+ */
52
+ maxResolution?: number | undefined;
53
+ /**
54
+ * Tile projection.
55
+ */
56
+ projection?: import("../proj.js").ProjectionLike;
57
+ /**
58
+ * Tile grid.
59
+ */
60
+ tileGrid?: import("../tilegrid/TileGrid.js").default | undefined;
61
+ /**
62
+ * The source state.
63
+ */
64
+ state?: import("./Source.js").State | undefined;
65
+ /**
66
+ * Render tiles beyond the antimeridian.
67
+ */
68
+ wrapX?: boolean | undefined;
69
+ /**
70
+ * Transition time when fading in new tiles (in miliseconds).
71
+ */
72
+ transition?: number | undefined;
73
+ /**
74
+ * Use interpolated values when resampling.
75
+ */
76
+ interpolate?: boolean | undefined;
77
+ /**
78
+ * The crossOrigin property to pass to loaders for image data.
79
+ */
80
+ crossOrigin?: import("./DataTile.js").CrossOriginAttribute | undefined;
81
+ };
82
+ /**
83
+ * @classdesc
84
+ * A source for typed array data tiles.
85
+ *
86
+ * @extends DataTileSource<import("../ImageTile.js").default>
87
+ * @fires import("./Tile.js").TileSourceEvent
88
+ * @api
89
+ */
90
+ declare class ImageTileSource extends DataTileSource<import("../ImageTile.js").default> {
91
+ /**
92
+ * @param {Options} [options] DataTile source options.
93
+ */
94
+ constructor(options?: Options | undefined);
95
+ /**
96
+ * @param {UrlLike} url The new URL.
97
+ * @api
98
+ */
99
+ setUrl(url: UrlLike): void;
100
+ }
101
+ import DataTileSource from './DataTile.js';
102
+ //# sourceMappingURL=ImageTile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageTile.d.ts","sourceRoot":"","sources":["ImageTile.js"],"names":[],"mappings":";;;;;4BAUsB,MAAM,QAAE,MAAM,QAAE,MAAM,QAAE,OAAO,eAAe,EAAE,aAAa,KAAE,CAAC,OAAO,gBAAgB,EAAE,SAAS,GAAC,QAAQ,OAAO,gBAAgB,EAAE,SAAS,CAAC,CAAC;+BAI/I,MAAM,QAAE,MAAM,QAAE,MAAM,QAAE,OAAO,eAAe,EAAE,aAAa,KAAE,MAAM;sBAI9E,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBjC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGjD;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,2CA2CC;IAED;;;OAGG;IACH,YAHW,OAAO,QAUjB;CACF;2BA1M0B,eAAe"}