ol 9.2.5-dev.1718652616882 → 9.2.5-dev.1718925536936

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
package/source/Tile.js CHANGED
@@ -4,16 +4,15 @@
4
4
  import Event from '../events/Event.js';
5
5
  import Source from './Source.js';
6
6
  import TileCache from '../TileCache.js';
7
- import TileState from '../TileState.js';
8
7
  import {abstract} from '../util.js';
9
8
  import {assert} from '../asserts.js';
10
9
  import {equivalent} from '../proj.js';
11
- import {getKeyZXY, withinExtentAndZ} from '../tilecoord.js';
12
10
  import {
13
11
  getForProjection as getTileGridForProjection,
14
12
  wrapX,
15
13
  } from '../tilegrid.js';
16
14
  import {scale as scaleSize, toSize} from '../size.js';
15
+ import {withinExtentAndZ} from '../tilecoord.js';
17
16
 
18
17
  /***
19
18
  * @template Return
@@ -28,8 +27,7 @@ import {scale as scaleSize, toSize} from '../size.js';
28
27
  * @typedef {Object} Options
29
28
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
30
29
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
31
- * @property {number} [cacheSize] CacheSize.
32
- * @property {boolean} [opaque=false] Whether the layer is opaque.
30
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
33
31
  * @property {number} [tilePixelRatio] TilePixelRatio.
34
32
  * @property {import("../proj.js").ProjectionLike} [projection] Projection.
35
33
  * @property {import("./Source.js").State} [state] State.
@@ -47,6 +45,8 @@ import {scale as scaleSize, toSize} from '../size.js';
47
45
  * Abstract base class; normally only used for creating subclasses and not
48
46
  * instantiated in apps.
49
47
  * Base class for sources providing images divided into a tile grid.
48
+ *
49
+ * @template {import("../Tile.js").default} [TileType=import("../Tile.js").default]
50
50
  * @abstract
51
51
  * @api
52
52
  */
@@ -79,12 +79,6 @@ class TileSource extends Source {
79
79
  */
80
80
  this.un;
81
81
 
82
- /**
83
- * @private
84
- * @type {boolean}
85
- */
86
- this.opaque_ = options.opaque !== undefined ? options.opaque : false;
87
-
88
82
  /**
89
83
  * @private
90
84
  * @type {number}
@@ -157,44 +151,6 @@ class TileSource extends Source {
157
151
  }
158
152
  }
159
153
 
160
- /**
161
- * @param {import("../proj/Projection.js").default} projection Projection.
162
- * @param {number} z Zoom level.
163
- * @param {import("../TileRange.js").default} tileRange Tile range.
164
- * @param {function(import("../Tile.js").default):(boolean|void)} callback Called with each
165
- * loaded tile. If the callback returns `false`, the tile will not be
166
- * considered loaded.
167
- * @return {boolean} The tile range is fully covered with loaded tiles.
168
- */
169
- forEachLoadedTile(projection, z, tileRange, callback) {
170
- const tileCache = this.getTileCacheForProjection(projection);
171
- if (!tileCache) {
172
- return false;
173
- }
174
-
175
- let covered = true;
176
- let tile, tileCoordKey, loaded;
177
- for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {
178
- for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {
179
- tileCoordKey = getKeyZXY(z, x, y);
180
- loaded = false;
181
- if (tileCache.containsKey(tileCoordKey)) {
182
- tile = /** @type {!import("../Tile.js").default} */ (
183
- tileCache.get(tileCoordKey)
184
- );
185
- loaded = tile.getState() === TileState.LOADED;
186
- if (loaded) {
187
- loaded = callback(tile) !== false;
188
- }
189
- }
190
- if (!loaded) {
191
- covered = false;
192
- }
193
- }
194
- }
195
- return covered;
196
- }
197
-
198
154
  /**
199
155
  * @param {import("../proj/Projection.js").default} projection Projection.
200
156
  * @return {number} Gutter.
@@ -223,14 +179,6 @@ class TileSource extends Source {
223
179
  }
224
180
  }
225
181
 
226
- /**
227
- * @param {import("../proj/Projection.js").default} projection Projection.
228
- * @return {boolean} Opaque.
229
- */
230
- getOpaque(projection) {
231
- return this.opaque_;
232
- }
233
-
234
182
  /**
235
183
  * @param {import("../proj/Projection").default} [projection] Projection.
236
184
  * @return {Array<number>|null} Resolutions.
@@ -252,7 +200,7 @@ class TileSource extends Source {
252
200
  * @param {number} y Tile coordinate y.
253
201
  * @param {number} pixelRatio Pixel ratio.
254
202
  * @param {import("../proj/Projection.js").default} projection Projection.
255
- * @return {!import("../Tile.js").default} Tile.
203
+ * @return {TileType|null} Tile.
256
204
  */
257
205
  getTile(z, x, y, pixelRatio, projection) {
258
206
  return abstract();
@@ -350,18 +298,6 @@ class TileSource extends Source {
350
298
  super.refresh();
351
299
  }
352
300
 
353
- /**
354
- * Increases the cache size if needed
355
- * @param {number} tileCount Minimum number of tiles needed.
356
- * @param {import("../proj/Projection.js").default} projection Projection.
357
- */
358
- updateCacheSize(tileCount, projection) {
359
- const tileCache = this.getTileCacheForProjection(projection);
360
- if (tileCount > tileCache.highWaterMark) {
361
- tileCache.highWaterMark = tileCount;
362
- }
363
- }
364
-
365
301
  /**
366
302
  * Marks a tile coord as being used, without triggering a load.
367
303
  * @abstract
@@ -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
  /**
@@ -93,7 +93,7 @@ export type Options = {
93
93
  /**
94
94
  * @typedef {Object} Options
95
95
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
96
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
96
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
97
97
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
98
98
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
99
99
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
@@ -12,7 +12,7 @@ import {hash as tileCoordHash} from '../tilecoord.js';
12
12
  /**
13
13
  * @typedef {Object} Options
14
14
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
15
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
15
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
16
16
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
17
17
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
18
18
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
@@ -1 +1 @@
1
- {"version":3,"file":"TileDebug.d.ts","sourceRoot":"","sources":["TileDebug.js"],"names":[],"mappings":";;;;;iBAUc,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;AAFjD;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,2CAmCC;CACF;gBAhEe,UAAU"}
1
+ {"version":3,"file":"TileDebug.d.ts","sourceRoot":"","sources":["TileDebug.js"],"names":[],"mappings":";;;;;iBAUc,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;AAFjD;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,2CAkCC;CACF;gBA/De,UAAU"}
@@ -37,7 +37,6 @@ class TileDebug extends XYZ {
37
37
  options = options || {};
38
38
 
39
39
  super({
40
- opaque: false,
41
40
  projection: options.projection,
42
41
  tileGrid: options.tileGrid,
43
42
  wrapX: options.wrapX !== undefined ? options.wrapX : true,
@@ -9,7 +9,7 @@ export type Options = {
9
9
  */
10
10
  attributionsCollapsible?: boolean | undefined;
11
11
  /**
12
- * Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
12
+ * Deprecated. Use the cacheSize option on the layer instead.
13
13
  */
14
14
  cacheSize?: number | undefined;
15
15
  /**
@@ -23,10 +23,6 @@ export type Options = {
23
23
  * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
24
24
  */
25
25
  interpolate?: boolean | undefined;
26
- /**
27
- * Whether the layer is opaque.
28
- */
29
- opaque?: boolean | undefined;
30
26
  /**
31
27
  * Projection. Default is the view projection.
32
28
  */
@@ -66,7 +62,8 @@ export type Options = {
66
62
  */
67
63
  tilePixelRatio?: number | undefined;
68
64
  /**
69
- * Optional function to get tile URL given a tile coordinate and the projection.
65
+ * Deprecated. Use an ImageTile source and provide a function
66
+ * for the url option instead.
70
67
  */
71
68
  tileUrlFunction?: import("../Tile.js").UrlFunction | undefined;
72
69
  /**
@@ -105,13 +102,12 @@ export type Options = {
105
102
  * @typedef {Object} Options
106
103
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
107
104
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
108
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
105
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
109
106
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
110
107
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
111
108
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
112
109
  * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,
113
110
  * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
114
- * @property {boolean} [opaque=false] Whether the layer is opaque.
115
111
  * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
116
112
  * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
117
113
  * Higher values can increase reprojection performance, but decrease precision.
@@ -129,7 +125,8 @@ export type Options = {
129
125
  * service advertizes 256px by 256px tiles but actually sends 512px
130
126
  * by 512px images (for retina/hidpi devices) then `tilePixelRatio`
131
127
  * should be set to `2`.
132
- * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.
128
+ * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Deprecated. Use an ImageTile source and provide a function
129
+ * for the url option instead.
133
130
  * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
134
131
  * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be
135
132
  * used instead of defining each one separately in the `urls` option.
@@ -146,8 +143,7 @@ export type Options = {
146
143
  * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
147
144
  */
148
145
  /**
149
- * @classdesc
150
- * Base class for sources providing images divided into a tile grid.
146
+ * @deprecated Use the ol/source/ImageTile.js instead.
151
147
  *
152
148
  * @fires import("./Tile.js").TileSourceEvent
153
149
  * @api
@@ -1 +1 @@
1
- {"version":3,"file":"TileImage.d.ts","sourceRoot":"","sources":["TileImage.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBc,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAXjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,qBAFY,OAAO,EA+DlB;IArCC;;;OAGG;IACH,uBAFW,MAAM,QAG+C;IAEhE;;;OAGG;IACH,qBAFU,gBAAgB,CAGuC;IAEjE;;;OAGG;IACH;YAFkB,MAAM,GAAE,SAAS;MAEH;IAEhC;;;OAGG;IACH;YAFkB,MAAM,GAAE,OAAO,yBAAyB,EAAE,OAAO;MAEpC;IAE/B;;;OAGG;IACH,oCAAqE;IAErE;;;OAGG;IACH,iCAAqC;IAkDvC;;OAEG;IACH,aAFY,MAAM,CAIjB;IAgED;;;;;;;;;OASG;IACH,oBAoBC;IAED;;;;;;;OAOG;IACH,WAPW,MAAM,KACN,MAAM,KACN,MAAM,cACN,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,GACrC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KACN,MAAM,KACN,MAAM,cACN,MAAM,cACL,OAAO,uBAAuB,EAAE,OAAO,GACtC,SAAS,CAkBrB;IAED;;;;OAIG;IACH,mCAHW,OAAO,QAYjB;IAED;;;;;;;;;;;OAWG;IACH,qCAJW,OAAO,YAAY,EAAE,cAAc,YACnC,OAAO,yBAAyB,EAAE,OAAO,QAWnD;CAQF;sBA3YqB,iBAAiB;oBAInB,cAAc;sBAFZ,iBAAiB;uBADhB,mBAAmB"}
@@ -16,13 +16,12 @@ import {getUid} from '../util.js';
16
16
  * @typedef {Object} Options
17
17
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
18
18
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
19
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
19
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
20
20
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
21
21
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
22
22
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
23
23
  * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,
24
24
  * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
25
- * @property {boolean} [opaque=false] Whether the layer is opaque.
26
25
  * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
27
26
  * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
28
27
  * Higher values can increase reprojection performance, but decrease precision.
@@ -40,7 +39,8 @@ import {getUid} from '../util.js';
40
39
  * service advertizes 256px by 256px tiles but actually sends 512px
41
40
  * by 512px images (for retina/hidpi devices) then `tilePixelRatio`
42
41
  * should be set to `2`.
43
- * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.
42
+ * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Deprecated. Use an ImageTile source and provide a function
43
+ * for the url option instead.
44
44
  * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
45
45
  * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be
46
46
  * used instead of defining each one separately in the `urls` option.
@@ -58,8 +58,7 @@ import {getUid} from '../util.js';
58
58
  */
59
59
 
60
60
  /**
61
- * @classdesc
62
- * Base class for sources providing images divided into a tile grid.
61
+ * @deprecated Use the ol/source/ImageTile.js instead.
63
62
  *
64
63
  * @fires import("./Tile.js").TileSourceEvent
65
64
  * @api
@@ -72,7 +71,6 @@ class TileImage extends UrlTile {
72
71
  super({
73
72
  attributions: options.attributions,
74
73
  cacheSize: options.cacheSize,
75
- opaque: options.opaque,
76
74
  projection: options.projection,
77
75
  state: options.state,
78
76
  tileGrid: options.tileGrid,
@@ -197,21 +195,6 @@ class TileImage extends UrlTile {
197
195
  return key;
198
196
  }
199
197
 
200
- /**
201
- * @param {import("../proj/Projection.js").default} projection Projection.
202
- * @return {boolean} Opaque.
203
- */
204
- getOpaque(projection) {
205
- if (
206
- this.getProjection() &&
207
- projection &&
208
- !equivalent(this.getProjection(), projection)
209
- ) {
210
- return false;
211
- }
212
- return super.getOpaque(projection);
213
- }
214
-
215
198
  /**
216
199
  * @param {import("../proj/Projection.js").default} projection Projection.
217
200
  * @return {!import("../tilegrid/TileGrid.js").default} Tile grid.
@@ -337,8 +320,6 @@ class TileImage extends UrlTile {
337
320
  newTile.key = key;
338
321
 
339
322
  if (tile) {
340
- newTile.interimTile = tile;
341
- newTile.refreshInterimChain();
342
323
  cache.replace(tileCoordKey, newTile);
343
324
  } else {
344
325
  cache.set(tileCoordKey, newTile);
@@ -356,31 +337,18 @@ class TileImage extends UrlTile {
356
337
  * @protected
357
338
  */
358
339
  getTileInternal(z, x, y, pixelRatio, projection) {
359
- let tile = null;
360
340
  const tileCoordKey = getKeyZXY(z, x, y);
361
341
  const key = this.getKey();
362
342
  if (!this.tileCache.containsKey(tileCoordKey)) {
363
- tile = this.createTile_(z, x, y, pixelRatio, projection, key);
343
+ const tile = this.createTile_(z, x, y, pixelRatio, projection, key);
364
344
  this.tileCache.set(tileCoordKey, tile);
365
- } else {
366
- tile = this.tileCache.get(tileCoordKey);
367
- if (tile.key != key) {
368
- // The source's params changed. If the tile has an interim tile and if we
369
- // can use it then we use it. Otherwise we create a new tile. In both
370
- // cases we attempt to assign an interim tile to the new tile.
371
- const interimTile = tile;
372
- tile = this.createTile_(z, x, y, pixelRatio, projection, key);
345
+ return tile;
346
+ }
373
347
 
374
- //make the new tile the head of the list,
375
- if (interimTile.getState() == TileState.IDLE) {
376
- //the old tile hasn't begun loading yet, and is now outdated, so we can simply discard it
377
- tile.interimTile = interimTile.interimTile;
378
- } else {
379
- tile.interimTile = interimTile;
380
- }
381
- tile.refreshInterimChain();
382
- this.tileCache.replace(tileCoordKey, tile);
383
- }
348
+ let tile = this.tileCache.get(tileCoordKey);
349
+ if (tile.key != key) {
350
+ tile = this.createTile_(z, x, y, pixelRatio, projection, key);
351
+ this.tileCache.replace(tileCoordKey, tile);
384
352
  }
385
353
  return tile;
386
354
  }
@@ -59,7 +59,7 @@ export type Options = {
59
59
  */
60
60
  attributions?: import("./Source.js").AttributionLike | undefined;
61
61
  /**
62
- * Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
62
+ * Deprecated. Use the cacheSize option on the layer instead.
63
63
  */
64
64
  cacheSize?: number | undefined;
65
65
  /**
@@ -140,7 +140,7 @@ export type Options = {
140
140
  /**
141
141
  * @typedef {Object} Options
142
142
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
143
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
143
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
144
144
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
145
145
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
146
146
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
@@ -34,7 +34,7 @@ import {jsonp as requestJSONP} from '../net.js';
34
34
  /**
35
35
  * @typedef {Object} Options
36
36
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
37
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
37
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
38
38
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
39
39
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
40
40
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
@@ -9,7 +9,7 @@ export type Options = {
9
9
  */
10
10
  attributionsCollapsible?: boolean | undefined;
11
11
  /**
12
- * Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
12
+ * Deprecated. Use the cacheSize option on the layer instead.
13
13
  */
14
14
  cacheSize?: number | undefined;
15
15
  /**
@@ -116,7 +116,7 @@ export type Options = {
116
116
  * @typedef {Object} Options
117
117
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
118
118
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
119
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
119
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
120
120
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
121
121
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
122
122
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
@@ -1 +1 @@
1
- {"version":3,"file":"TileWMS.d.ts","sourceRoot":"","sources":["TileWMS.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAwBqB,MAAM;;;;;;;;;;;;;;;;;;;;;iBAeb,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;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E;;;OAGG;IACH,mBAA+B;IAMjC;;;;;;;;;;;;;OAaG;IACH,8BAVW,OAAO,kBAAkB,EAAE,UAAU,cACrC,MAAM,cACN,OAAO,YAAY,EAAE,cAAc,gBAKlC,MAAM,GAAC,SAAS,CA6D3B;IAED;;;;;;;;;;;;;OAaG;IACH,6DAHY,MAAM,GAAC,SAAS,CAmC3B;IASD;;;;;OAKG;IACH,iBAEC;IAED;;;;;;;;OAQG;IACH,uBAwBC;IAWD;;;OAGG;IACH,yBAOC;IAED;;;;OAIG;IACH,gCAIC;IAED;;OAEG;IACH,mBAGC;CA4CF;sBA7YqB,gBAAgB"}
package/source/TileWMS.js CHANGED
@@ -16,7 +16,7 @@ import {hash as tileCoordHash} from '../tilecoord.js';
16
16
  * @typedef {Object} Options
17
17
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
18
18
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
19
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
19
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
20
20
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
21
21
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
22
22
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
@@ -84,15 +84,12 @@ class TileWMS extends TileImage {
84
84
 
85
85
  const params = Object.assign({}, options.params);
86
86
 
87
- const transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;
88
-
89
87
  super({
90
88
  attributions: options.attributions,
91
89
  attributionsCollapsible: options.attributionsCollapsible,
92
90
  cacheSize: options.cacheSize,
93
91
  crossOrigin: options.crossOrigin,
94
92
  interpolate: options.interpolate,
95
- opaque: !transparent,
96
93
  projection: options.projection,
97
94
  reprojectionErrorThreshold: options.reprojectionErrorThreshold,
98
95
  tileClass: options.tileClass,
@@ -169,7 +169,7 @@ import Tile from '../Tile.js';
169
169
  * Layer source for UTFGrid interaction data loaded from TileJSON format.
170
170
  * @api
171
171
  */
172
- declare class UTFGrid extends TileSource {
172
+ declare class UTFGrid extends TileSource<Tile> {
173
173
  /**
174
174
  * @param {Options} options Source options.
175
175
  */
@@ -9,13 +9,9 @@ export type Options = {
9
9
  */
10
10
  attributionsCollapsible?: boolean | undefined;
11
11
  /**
12
- * Cache size.
12
+ * Deprecated. Use the cacheSize option on the layer instead.
13
13
  */
14
14
  cacheSize?: number | undefined;
15
- /**
16
- * Whether the layer is opaque.
17
- */
18
- opaque?: boolean | undefined;
19
15
  /**
20
16
  * Projection.
21
17
  */
@@ -37,7 +33,8 @@ export type Options = {
37
33
  */
38
34
  tilePixelRatio?: number | undefined;
39
35
  /**
40
- * TileUrlFunction.
36
+ * Deprecated. Use an ImageTile source and provide a function
37
+ * for the url option instead.
41
38
  */
42
39
  tileUrlFunction?: import("../Tile.js").UrlFunction | undefined;
43
40
  /**
@@ -74,14 +71,14 @@ export type Options = {
74
71
  * @typedef {Object} Options
75
72
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
76
73
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
77
- * @property {number} [cacheSize] Cache size.
78
- * @property {boolean} [opaque=false] Whether the layer is opaque.
74
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
79
75
  * @property {import("../proj.js").ProjectionLike} [projection] Projection.
80
76
  * @property {import("./Source.js").State} [state] State.
81
77
  * @property {import("../tilegrid/TileGrid.js").default} [tileGrid] TileGrid.
82
78
  * @property {import("../Tile.js").LoadFunction} tileLoadFunction TileLoadFunction.
83
79
  * @property {number} [tilePixelRatio] TilePixelRatio.
84
- * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] TileUrlFunction.
80
+ * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Deprecated. Use an ImageTile source and provide a function
81
+ * for the url option instead.
85
82
  * @property {string} [url] Url.
86
83
  * @property {Array<string>} [urls] Urls.
87
84
  * @property {boolean} [wrapX=true] WrapX.
@@ -92,12 +89,11 @@ export type Options = {
92
89
  * the nearest neighbor is used when resampling.
93
90
  */
94
91
  /**
95
- * @classdesc
96
- * Base class for sources providing tiles divided into a tile grid over http.
92
+ * @deprecated Use the ol/source/ImageTile.js instead.
97
93
  *
98
94
  * @fires import("./Tile.js").TileSourceEvent
99
95
  */
100
- declare class UrlTile extends TileSource {
96
+ declare class UrlTile extends TileSource<import("../Tile.js").default> {
101
97
  /**
102
98
  * @param {Options} options Image tile options.
103
99
  */
@@ -130,18 +126,21 @@ declare class UrlTile extends TileSource {
130
126
  */
131
127
  private tileLoadingKeys_;
132
128
  /**
129
+ * Deprecated. Use an ImageTile source instead.
133
130
  * Return the tile load function of the source.
134
131
  * @return {import("../Tile.js").LoadFunction} TileLoadFunction
135
132
  * @api
136
133
  */
137
134
  getTileLoadFunction(): import("../Tile.js").LoadFunction;
138
135
  /**
136
+ * Deprecated. Use an ImageTile source instead.
139
137
  * Return the tile URL function of the source.
140
138
  * @return {import("../Tile.js").UrlFunction} TileUrlFunction
141
139
  * @api
142
140
  */
143
141
  getTileUrlFunction(): import("../Tile.js").UrlFunction;
144
142
  /**
143
+ * Deprecated. Use an ImageTile source instead.
145
144
  * Return the URLs used for this source.
146
145
  * When a tileUrlFunction is used instead of url or urls,
147
146
  * null will be returned.
@@ -156,12 +155,14 @@ declare class UrlTile extends TileSource {
156
155
  */
157
156
  protected handleTileChange(event: import("../events/Event.js").default): void;
158
157
  /**
158
+ * Deprecated. Use an ImageTile source instead.
159
159
  * Set the tile load function of the source.
160
160
  * @param {import("../Tile.js").LoadFunction} tileLoadFunction Tile load function.
161
161
  * @api
162
162
  */
163
163
  setTileLoadFunction(tileLoadFunction: import("../Tile.js").LoadFunction): void;
164
164
  /**
165
+ * Deprecated. Use an ImageTile source instead.
165
166
  * Set the tile URL function of the source.
166
167
  * @param {import("../Tile.js").UrlFunction} tileUrlFunction Tile URL function.
167
168
  * @param {string} [key] Optional new tile key for the source.
@@ -175,6 +176,7 @@ declare class UrlTile extends TileSource {
175
176
  */
176
177
  setUrl(url: string): void;
177
178
  /**
179
+ * Deprecated. Use an ImageTile source instead.
178
180
  * Set the URLs to use for requests.
179
181
  * @param {Array<string>} urls URLs.
180
182
  * @api
@@ -1 +1 @@
1
- {"version":3,"file":"UrlTile.d.ts","sourceRoot":"","sources":["UrlTile.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;iBAgBc,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;sBAGnC,OAAO,YAAY,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAT/C;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;GAKG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAqDjB;IAlCC;;;OAGG;IACH,iCAC4D;IAE5D;;;OAGG;IACH,4BAFU,OAAO,YAAY,EAAE,YAAY,CAEK;IAwIlD;;;;;OAKG;IACH,2BALW,OAAO,iBAAiB,EAAE,SAAS,cACnC,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,GACtC,MAAM,GAAC,SAAS,CAI3B;IA1IC;;;OAGG;IACH,gBAFW,MAAM,MAAM,CAAC,GAAC,IAAI,CAEb;IAQhB;;;OAGG;IACH,yBAA0B;IAG5B;;;;OAIG;IACH,uBAHY,OAAO,YAAY,EAAE,YAAY,CAK5C;IAED;;;;OAIG;IACH,sBAHY,OAAO,YAAY,EAAE,WAAW,CAO3C;IAED;;;;;;OAMG;IACH,WAHa,MAAM,MAAM,CAAC,GAAC,IAAI,CAK9B;IAED;;;;OAIG;IACH,kCAHW,OAAO,oBAAoB,EAAE,OAAO,QAuB9C;IAED;;;;OAIG;IACH,sCAHW,OAAO,YAAY,EAAE,YAAY,QAO3C;IAED;;;;;OAKG;IACH,oCAJW,OAAO,YAAY,EAAE,WAAW,kCAY1C;IAED;;;;OAIG;IACH,YAHW,MAAM,QAOhB;IAED;;;;OAIG;IACH,cAH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AAM,KACN,MAAM,QAOhB;CACF;uBArOyC,WAAW"}
package/source/UrlTile.js CHANGED
@@ -4,7 +4,8 @@
4
4
  import TileEventType from './TileEventType.js';
5
5
  import TileSource, {TileSourceEvent} from './Tile.js';
6
6
  import TileState from '../TileState.js';
7
- import {createFromTemplates, expandUrl} from '../tileurlfunction.js';
7
+ import {createFromTemplates} from '../tileurlfunction.js';
8
+ import {expandUrl} from '../uri.js';
8
9
  import {getKeyZXY} from '../tilecoord.js';
9
10
  import {getUid} from '../util.js';
10
11
 
@@ -12,14 +13,14 @@ import {getUid} from '../util.js';
12
13
  * @typedef {Object} Options
13
14
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
14
15
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
15
- * @property {number} [cacheSize] Cache size.
16
- * @property {boolean} [opaque=false] Whether the layer is opaque.
16
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
17
17
  * @property {import("../proj.js").ProjectionLike} [projection] Projection.
18
18
  * @property {import("./Source.js").State} [state] State.
19
19
  * @property {import("../tilegrid/TileGrid.js").default} [tileGrid] TileGrid.
20
20
  * @property {import("../Tile.js").LoadFunction} tileLoadFunction TileLoadFunction.
21
21
  * @property {number} [tilePixelRatio] TilePixelRatio.
22
- * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] TileUrlFunction.
22
+ * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Deprecated. Use an ImageTile source and provide a function
23
+ * for the url option instead.
23
24
  * @property {string} [url] Url.
24
25
  * @property {Array<string>} [urls] Urls.
25
26
  * @property {boolean} [wrapX=true] WrapX.
@@ -31,8 +32,7 @@ import {getUid} from '../util.js';
31
32
  */
32
33
 
33
34
  /**
34
- * @classdesc
35
- * Base class for sources providing tiles divided into a tile grid over http.
35
+ * @deprecated Use the ol/source/ImageTile.js instead.
36
36
  *
37
37
  * @fires import("./Tile.js").TileSourceEvent
38
38
  */
@@ -44,7 +44,6 @@ class UrlTile extends TileSource {
44
44
  super({
45
45
  attributions: options.attributions,
46
46
  cacheSize: options.cacheSize,
47
- opaque: options.opaque,
48
47
  projection: options.projection,
49
48
  state: options.state,
50
49
  tileGrid: options.tileGrid,
@@ -94,6 +93,7 @@ class UrlTile extends TileSource {
94
93
  }
95
94
 
96
95
  /**
96
+ * Deprecated. Use an ImageTile source instead.
97
97
  * Return the tile load function of the source.
98
98
  * @return {import("../Tile.js").LoadFunction} TileLoadFunction
99
99
  * @api
@@ -103,6 +103,7 @@ class UrlTile extends TileSource {
103
103
  }
104
104
 
105
105
  /**
106
+ * Deprecated. Use an ImageTile source instead.
106
107
  * Return the tile URL function of the source.
107
108
  * @return {import("../Tile.js").UrlFunction} TileUrlFunction
108
109
  * @api
@@ -114,6 +115,7 @@ class UrlTile extends TileSource {
114
115
  }
115
116
 
116
117
  /**
118
+ * Deprecated. Use an ImageTile source instead.
117
119
  * Return the URLs used for this source.
118
120
  * When a tileUrlFunction is used instead of url or urls,
119
121
  * null will be returned.
@@ -152,6 +154,7 @@ class UrlTile extends TileSource {
152
154
  }
153
155
 
154
156
  /**
157
+ * Deprecated. Use an ImageTile source instead.
155
158
  * Set the tile load function of the source.
156
159
  * @param {import("../Tile.js").LoadFunction} tileLoadFunction Tile load function.
157
160
  * @api
@@ -163,6 +166,7 @@ class UrlTile extends TileSource {
163
166
  }
164
167
 
165
168
  /**
169
+ * Deprecated. Use an ImageTile source instead.
166
170
  * Set the tile URL function of the source.
167
171
  * @param {import("../Tile.js").UrlFunction} tileUrlFunction Tile URL function.
168
172
  * @param {string} [key] Optional new tile key for the source.
@@ -190,6 +194,7 @@ class UrlTile extends TileSource {
190
194
  }
191
195
 
192
196
  /**
197
+ * Deprecated. Use an ImageTile source instead.
193
198
  * Set the URLs to use for requests.
194
199
  * @param {Array<string>} urls URLs.
195
200
  * @api