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
@@ -61,7 +61,7 @@ export type Options<FeatureType extends import("../Feature.js").FeatureLike = im
61
61
  * The feature format used by the XHR
62
62
  * feature loader when `url` is set. Required if `url` is set, otherwise ignored.
63
63
  */
64
- format?: import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>> | undefined;
64
+ format?: import("../format/Feature.js").default<FeatureType> | undefined;
65
65
  /**
66
66
  * The loader function used to load features, from a remote source for example.
67
67
  * If this is not set and `url` is set, the source will create and use an XHR
@@ -180,7 +180,7 @@ import Event from '../events/Event.js';
180
180
  * @property {Array<FeatureType>|Collection<FeatureType>} [features]
181
181
  * Features. If provided as {@link module:ol/Collection~Collection}, the features in the source
182
182
  * and the collection will stay in sync.
183
- * @property {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>} [format] The feature format used by the XHR
183
+ * @property {import("../format/Feature.js").default<FeatureType>} [format] The feature format used by the XHR
184
184
  * feature loader when `url` is set. Required if `url` is set, otherwise ignored.
185
185
  * @property {import("../featureloader.js").FeatureLoader<FeatureType>} [loader]
186
186
  * The loader function used to load features, from a remote source for example.
@@ -299,7 +299,7 @@ declare class VectorSource<FeatureType extends import("../Feature.js").FeatureLi
299
299
  private loader_;
300
300
  /**
301
301
  * @private
302
- * @type {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>|null}
302
+ * @type {import("../format/Feature.js").default<FeatureType>|null}
303
303
  */
304
304
  private format_;
305
305
  /**
@@ -565,10 +565,10 @@ declare class VectorSource<FeatureType extends import("../Feature.js").FeatureLi
565
565
  /**
566
566
  * Get the format associated with this source.
567
567
  *
568
- * @return {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>|null}} The feature format.
568
+ * @return {import("../format/Feature.js").default<FeatureType>|null}} The feature format.
569
569
  * @api
570
570
  */
571
- getFormat(): import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>> | null;
571
+ getFormat(): import("../format/Feature.js").default<FeatureType> | null;
572
572
  /**
573
573
  * @return {boolean} The source can have overlapping geometries.
574
574
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["Vector.js"],"names":[],"mappings":"AAuBA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,kBAJW,MAAM,2EAoBhB;IAbC;;;;OAIG;IACH,SAHU,WAAW,GAAC,SAAS,CAGT;IAEtB;;;;OAIG;IACH,UAHU,MAAM,WAAW,CAAC,GAAC,SAAS,CAGd;CAE3B;;;;;;;qCAjCqB,OAAO,cAAc,EAAE,MAAM,QAAE,MAAM,QAAE,OAAO,uBAAuB,EAAE,OAAO,KAAG,MAAM,OAAO,cAAc,EAAE,MAAM,CAAC;;;;kKAqC9H,CAAC,SAAS,aAAa,GAAG,CAAC,GAAC,MAAM,CAAC,CAAC,GAAG,CAAC;;;;wKAMxC,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,oBAAoB,EAAE,KAAK,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GACpH,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,mBAAmB,EAAE,sBAAsB,EAAE,kBAAkB,WAAW,CAAC,EAAE,MAAM,CAAC,GACnI,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,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B,WAAW,CA+CtB;IAED;;;;;;;;;OASG;IACH,+DAHY,OAAO,cAAc,EAAE,MAAM,CAKxC;IAED;;;;;;;;;;;OAWG;IACH,mBAJW,MAAM,GAAC,MAAM,GACZ,oCAAoC,WAAW,CAAC,GAAC,IAAI,CAUhE;IAED;;;;;OAKG;IACH,qBAHW,MAAM,GACL,WAAW,GAAC,IAAI,CAK3B;IAED;;;;;OAKG;IACH,aAHY,OAAO,sBAAsB,EAAE,OAAO,CAAC,WAAW,CAAC,GAAC,IAAI,CAKnE;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;;;;OAKG;IACH,UAHY,MAAM,GAAC,OAAO,qBAAqB,EAAE,kBAAkB,GAAC,SAAS,CAK5E;IAED;;;OAGG;IACH,6BAuCC;IAED;;;;;OAKG;IACH,oBAJW,WAAW,GACV,OAAO,CASlB;IAED;;OAEG;IACH,WAFY,OAAO,CAYlB;IAED;;;;OAIG;IACH,qBAJW,OAAO,cAAc,EAAE,MAAM,cAC7B,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,QAiDjD;IAQD;;;;OAIG;IACH,2BAHW,OAAO,cAAc,EAAE,MAAM,QAevC;IAED;;;;;;OAMG;IACH,yBAHW,MAAM,WAAW,CAAC,QAW5B;IAED;;;;;;OAMG;IACH,uBAHW,WAAW,QAWrB;IAED;;;;;OAKG;IACH,yCAJW,WAAW,GACV,OAAO,CAyClB;IAED;;;;;OAKG;IACH,2BAOC;IAED;;;;;OAKG;IACH,kBAHW,OAAO,qBAAqB,EAAE,aAAa,CAAC,WAAW,CAAC,QAKlE;IAED;;;;OAIG;IACH,YAHW,MAAM,GAAC,OAAO,qBAAqB,EAAE,kBAAkB,QAOjE;CACF;0BArpCyB,sBAAsB;uBANzB,kBAAkB;mBAOtB,aAAa"}
package/source/Vector.js CHANGED
@@ -83,7 +83,7 @@ export class VectorSourceEvent extends Event {
83
83
  * @property {Array<FeatureType>|Collection<FeatureType>} [features]
84
84
  * Features. If provided as {@link module:ol/Collection~Collection}, the features in the source
85
85
  * and the collection will stay in sync.
86
- * @property {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>} [format] The feature format used by the XHR
86
+ * @property {import("../format/Feature.js").default<FeatureType>} [format] The feature format used by the XHR
87
87
  * feature loader when `url` is set. Required if `url` is set, otherwise ignored.
88
88
  * @property {import("../featureloader.js").FeatureLoader<FeatureType>} [loader]
89
89
  * The loader function used to load features, from a remote source for example.
@@ -217,7 +217,7 @@ class VectorSource extends Source {
217
217
 
218
218
  /**
219
219
  * @private
220
- * @type {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>|null}
220
+ * @type {import("../format/Feature.js").default<FeatureType>|null}
221
221
  */
222
222
  this.format_ = options.format || null;
223
223
 
@@ -889,7 +889,7 @@ class VectorSource extends Source {
889
889
  /**
890
890
  * Get the format associated with this source.
891
891
  *
892
- * @return {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>|null}} The feature format.
892
+ * @return {import("../format/Feature.js").default<FeatureType>|null}} The feature format.
893
893
  * @api
894
894
  */
895
895
  getFormat() {
@@ -26,7 +26,7 @@ export type Options<FeatureType extends import("../Feature.js").FeatureLike = im
26
26
  /**
27
27
  * Feature format for tiles. Used and required by the default.
28
28
  */
29
- format?: import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>> | undefined;
29
+ format?: import("../format/Feature.js").default<FeatureType> | undefined;
30
30
  /**
31
31
  * This source may have overlapping geometries. Setting this
32
32
  * to `false` (e.g. for sources with polygons that represent administrative
@@ -138,7 +138,7 @@ import Tile from '../VectorTile.js';
138
138
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
139
139
  * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least twice the number of tiles in the viewport.
140
140
  * @property {import("../extent.js").Extent} [extent] Extent.
141
- * @property {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>} [format] Feature format for tiles. Used and required by the default.
141
+ * @property {import("../format/Feature.js").default<FeatureType>} [format] Feature format for tiles. Used and required by the default.
142
142
  * @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this
143
143
  * to `false` (e.g. for sources with polygons that represent administrative
144
144
  * boundaries or TopoJSON sources) allows the renderer to optimise fill and
@@ -217,14 +217,14 @@ declare class VectorTile<FeatureType extends import("../Feature.js").FeatureLike
217
217
  constructor(options: Options<FeatureType>);
218
218
  /**
219
219
  * @private
220
- * @type {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>|null}
220
+ * @type {import("../format/Feature.js").default<FeatureType>|null}
221
221
  */
222
222
  private format_;
223
223
  /**
224
224
  * @private
225
225
  * @type {TileCache}
226
226
  */
227
- private sourceTileCache;
227
+ private sourceTileCache_;
228
228
  /**
229
229
  * @private
230
230
  * @type {boolean}
@@ -240,19 +240,6 @@ declare class VectorTile<FeatureType extends import("../Feature.js").FeatureLike
240
240
  * @type {Object<string, import("../tilegrid/TileGrid.js").default>}
241
241
  */
242
242
  private tileGrids_;
243
- /**
244
- * Get features whose bounding box intersects the provided extent. Only features for cached
245
- * tiles for the last rendered zoom level are available in the source. So this method is only
246
- * suitable for requesting tiles for extents that are currently rendered.
247
- *
248
- * Features are returned in random tile order and as they are included in the tiles. This means
249
- * they can be clipped, duplicated across tiles, and simplified to the render resolution.
250
- *
251
- * @param {import("../extent.js").Extent} extent Extent.
252
- * @return {Array<FeatureType>} Features.
253
- * @api
254
- */
255
- getFeaturesInExtent(extent: import("../extent.js").Extent): Array<FeatureType>;
256
243
  /**
257
244
  * @return {boolean} The source can have overlapping geometries.
258
245
  */
@@ -1 +1 @@
1
- {"version":3,"file":"VectorTile.d.ts","sourceRoot":"","sources":["VectorTile.js"],"names":[],"mappings":"AA2eA;;;;;GAKG;AACH,oKAFW,MAAM,QAqBhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAjea,OAAO,YAAY,EA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;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAEH;;;;;;;;;;;;;GAaG;AACH;IACE;;OAEG;IACH,qBAFY,QAAQ,WAAW,CAAC,EAiE/B;IA7BC;;;OAGG;IACH,gBAAqD;IAErD;;;OAGG;IACH,yBAA0C;IAE1C;;;OAGG;IACH,kBAAwE;IAExE;;;OAGG;IACH,iCAA6D;IAE7D;;;OAGG;IACH,mBAAoB;IAGtB;;OAEG;IACH,eAFY,OAAO,CAIlB;IA+BD;;;;;OAKG;IACH,2BALW,MAAM,cACN,OAAO,oBAAoB,EAAE,OAAO,QACpC,gBAAgB,GACf,gBAAsC,CA4FjD;IAED;;;;;;;OAOG;IACH,WAPW,MAAM,KACN,MAAM,KACN,MAAM,cACN,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,GACrC,gBAAgB,CAwC5B;CA4DF;qBArZoB,yBAAyB;oBAE1B,cAAc;6BACL,wBAAwB"}
@@ -16,7 +16,7 @@ import {
16
16
  intersects,
17
17
  } from '../extent.js';
18
18
  import {createXYZ, extentFromProjection} from '../tilegrid.js';
19
- import {fromKey, getCacheKeyForTileKey, getKeyZXY} from '../tilecoord.js';
19
+ import {getCacheKeyForTileKey} from '../tilecoord.js';
20
20
  import {isEmpty} from '../obj.js';
21
21
  import {loadFeaturesXhr} from '../featureloader.js';
22
22
  import {toSize} from '../size.js';
@@ -28,7 +28,7 @@ import {toSize} from '../size.js';
28
28
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
29
29
  * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least twice the number of tiles in the viewport.
30
30
  * @property {import("../extent.js").Extent} [extent] Extent.
31
- * @property {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>} [format] Feature format for tiles. Used and required by the default.
31
+ * @property {import("../format/Feature.js").default<FeatureType>} [format] Feature format for tiles. Used and required by the default.
32
32
  * @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this
33
33
  * to `false` (e.g. for sources with polygons that represent administrative
34
34
  * boundaries or TopoJSON sources) allows the renderer to optimise fill and
@@ -125,7 +125,6 @@ class VectorTile extends UrlTile {
125
125
  attributionsCollapsible: options.attributionsCollapsible,
126
126
  cacheSize: options.cacheSize,
127
127
  interpolate: true,
128
- opaque: false,
129
128
  projection: projection,
130
129
  state: options.state,
131
130
  tileGrid: tileGrid,
@@ -142,7 +141,7 @@ class VectorTile extends UrlTile {
142
141
 
143
142
  /**
144
143
  * @private
145
- * @type {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>|null}
144
+ * @type {import("../format/Feature.js").default<FeatureType>|null}
146
145
  */
147
146
  this.format_ = options.format ? options.format : null;
148
147
 
@@ -150,7 +149,7 @@ class VectorTile extends UrlTile {
150
149
  * @private
151
150
  * @type {TileCache}
152
151
  */
153
- this.sourceTileCache = new TileCache(this.tileCache.highWaterMark);
152
+ this.sourceTileCache_ = new TileCache(128);
154
153
 
155
154
  /**
156
155
  * @private
@@ -171,51 +170,6 @@ class VectorTile extends UrlTile {
171
170
  this.tileGrids_ = {};
172
171
  }
173
172
 
174
- /**
175
- * Get features whose bounding box intersects the provided extent. Only features for cached
176
- * tiles for the last rendered zoom level are available in the source. So this method is only
177
- * suitable for requesting tiles for extents that are currently rendered.
178
- *
179
- * Features are returned in random tile order and as they are included in the tiles. This means
180
- * they can be clipped, duplicated across tiles, and simplified to the render resolution.
181
- *
182
- * @param {import("../extent.js").Extent} extent Extent.
183
- * @return {Array<FeatureType>} Features.
184
- * @api
185
- */
186
- getFeaturesInExtent(extent) {
187
- const features = [];
188
- const tileCache = this.tileCache;
189
- if (tileCache.getCount() === 0) {
190
- return features;
191
- }
192
- const z = fromKey(tileCache.peekFirstKey())[0];
193
- const tileGrid = this.tileGrid;
194
- tileCache.forEach(function (tile) {
195
- if (tile.tileCoord[0] !== z || tile.getState() !== TileState.LOADED) {
196
- return;
197
- }
198
- const sourceTiles = tile.getSourceTiles();
199
- for (let i = 0, ii = sourceTiles.length; i < ii; ++i) {
200
- const sourceTile = sourceTiles[i];
201
- const tileCoord = sourceTile.tileCoord;
202
- if (intersects(extent, tileGrid.getTileCoordExtent(tileCoord))) {
203
- const tileFeatures = sourceTile.getFeatures();
204
- if (tileFeatures) {
205
- for (let j = 0, jj = tileFeatures.length; j < jj; ++j) {
206
- const candidate = tileFeatures[j];
207
- const geometry = candidate.getGeometry();
208
- if (intersects(extent, geometry.getExtent())) {
209
- features.push(candidate);
210
- }
211
- }
212
- }
213
- }
214
- }
215
- });
216
- return features;
217
- }
218
-
219
173
  /**
220
174
  * @return {boolean} The source can have overlapping geometries.
221
175
  */
@@ -228,8 +182,7 @@ class VectorTile extends UrlTile {
228
182
  * @api
229
183
  */
230
184
  clear() {
231
- this.tileCache.clear();
232
- this.sourceTileCache.clear();
185
+ this.sourceTileCache_.clear();
233
186
  }
234
187
 
235
188
  /**
@@ -250,7 +203,7 @@ class VectorTile extends UrlTile {
250
203
  return acc;
251
204
  }, {});
252
205
  super.expireCache(projection, usedTiles);
253
- this.sourceTileCache.expireCache(usedSourceTiles);
206
+ this.sourceTileCache_.expireCache(usedSourceTiles);
254
207
  }
255
208
 
256
209
  /**
@@ -285,8 +238,8 @@ class VectorTile extends UrlTile {
285
238
  pixelRatio,
286
239
  projection,
287
240
  );
288
- const sourceTile = this.sourceTileCache.containsKey(tileUrl)
289
- ? this.sourceTileCache.get(tileUrl)
241
+ const sourceTile = this.sourceTileCache_.containsKey(tileUrl)
242
+ ? this.sourceTileCache_.get(tileUrl)
290
243
  : new this.tileClass(
291
244
  sourceTileCoord,
292
245
  tileUrl ? TileState.IDLE : TileState.EMPTY,
@@ -333,7 +286,7 @@ class VectorTile extends UrlTile {
333
286
  sourceTile.resolution = sourceTileGrid.getResolution(
334
287
  sourceTileCoord[0],
335
288
  );
336
- this.sourceTileCache.set(tileUrl, sourceTile);
289
+ this.sourceTileCache_.set(tileUrl, sourceTile);
337
290
  sourceTile.load();
338
291
  }
339
292
  });
@@ -360,15 +313,6 @@ class VectorTile extends UrlTile {
360
313
  * @return {!VectorRenderTile} Tile.
361
314
  */
362
315
  getTile(z, x, y, pixelRatio, projection) {
363
- const coordKey = getKeyZXY(z, x, y);
364
- const key = this.getKey();
365
- let tile;
366
- if (this.tileCache.containsKey(coordKey)) {
367
- tile = this.tileCache.get(coordKey);
368
- if (tile.key === key) {
369
- return tile;
370
- }
371
- }
372
316
  const tileCoord = [z, x, y];
373
317
  let urlTileCoord = this.getTileCoordForTileUrlFunction(
374
318
  tileCoord,
@@ -404,15 +348,7 @@ class VectorTile extends UrlTile {
404
348
  urlTileCoord,
405
349
  this.getSourceTiles.bind(this, pixelRatio, projection),
406
350
  );
407
-
408
- newTile.key = key;
409
- if (tile) {
410
- newTile.interimTile = tile;
411
- newTile.refreshInterimChain();
412
- this.tileCache.replace(coordKey, newTile);
413
- } else {
414
- this.tileCache.set(coordKey, newTile);
415
- }
351
+ newTile.key = this.getKey();
416
352
  return newTile;
417
353
  }
418
354
 
@@ -474,17 +410,6 @@ class VectorTile extends UrlTile {
474
410
  Math.round(tileSize[1] * pixelRatio),
475
411
  ];
476
412
  }
477
-
478
- /**
479
- * Increases the cache size if needed
480
- * @param {number} tileCount Minimum number of tiles needed.
481
- * @param {import("../proj/Projection.js").default} projection Projection.
482
- */
483
- updateCacheSize(tileCount, projection) {
484
- super.updateCacheSize(tileCount * 2, projection);
485
- this.sourceTileCache.highWaterMark =
486
- this.getTileCacheForProjection(projection).highWaterMark;
487
- }
488
413
  }
489
414
 
490
415
  export default VectorTile;
package/source/WMTS.d.ts CHANGED
@@ -38,7 +38,7 @@ export type Options = {
38
38
  */
39
39
  attributionsCollapsible?: boolean | undefined;
40
40
  /**
41
- * Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
41
+ * Deprecated. Use the cacheSize option on the layer instead.
42
42
  */
43
43
  cacheSize?: number | undefined;
44
44
  /**
@@ -150,7 +150,7 @@ export type Options = {
150
150
  * @typedef {Object} Options
151
151
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
152
152
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
153
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
153
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
154
154
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
155
155
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
156
156
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
package/source/WMTS.js CHANGED
@@ -3,10 +3,10 @@
3
3
  */
4
4
 
5
5
  import TileImage from './TileImage.js';
6
- import {appendParams} from '../uri.js';
6
+ import {appendParams, expandUrl} from '../uri.js';
7
7
  import {containsExtent} from '../extent.js';
8
8
  import {createFromCapabilitiesMatrixSet} from '../tilegrid/WMTS.js';
9
- import {createFromTileUrlFunctions, expandUrl} from '../tileurlfunction.js';
9
+ import {createFromTileUrlFunctions} from '../tileurlfunction.js';
10
10
  import {equivalent, get as getProjection, transformExtent} from '../proj.js';
11
11
 
12
12
  /**
@@ -18,7 +18,7 @@ import {equivalent, get as getProjection, transformExtent} from '../proj.js';
18
18
  * @typedef {Object} Options
19
19
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
20
20
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
21
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
21
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
22
22
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
23
23
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
24
24
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
package/source/XYZ.d.ts CHANGED
@@ -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.
32
28
  */
@@ -53,7 +49,8 @@ export type Options = {
53
49
  */
54
50
  tileGrid?: import("../tilegrid.js").TileGrid | undefined;
55
51
  /**
56
- * Optional function to load a tile given a URL. The default is
52
+ * Deprecated. Use an ImageTile source with a loader
53
+ * instead. Optional function to load a tile given a URL. The default is
57
54
  * ```js
58
55
  * function(imageTile, src) {
59
56
  * imageTile.getImage().src = src;
@@ -80,9 +77,8 @@ export type Options = {
80
77
  */
81
78
  gutter?: number | undefined;
82
79
  /**
83
- * Optional function to get
84
- * tile URL given a tile coordinate and the projection.
85
- * Required if `url` or `urls` are not provided.
80
+ * Deprecated. Use an ImageTile source and provide a function
81
+ * for the url option instead.
86
82
  */
87
83
  tileUrlFunction?: import("../Tile.js").UrlFunction | undefined;
88
84
  /**
@@ -92,7 +88,8 @@ export type Options = {
92
88
  */
93
89
  url?: string | undefined;
94
90
  /**
95
- * An array of URL templates.
91
+ * Deprecated. Use an ImageTile source and provide an array of URLs for the
92
+ * url option instead.
96
93
  */
97
94
  urls?: string[] | undefined;
98
95
  /**
@@ -114,13 +111,12 @@ export type Options = {
114
111
  * @typedef {Object} Options
115
112
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
116
113
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
117
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
114
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
118
115
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
119
116
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
120
117
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
121
118
  * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,
122
119
  * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
123
- * @property {boolean} [opaque=false] Whether the layer is opaque.
124
120
  * @property {import("../proj.js").ProjectionLike} [projection='EPSG:3857'] Projection.
125
121
  * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
126
122
  * Higher values can increase reprojection performance, but decrease precision.
@@ -128,7 +124,8 @@ export type Options = {
128
124
  * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.
129
125
  * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.
130
126
  * @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid.
131
- * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is
127
+ * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Deprecated. Use an ImageTile source with a loader
128
+ * instead. Optional function to load a tile given a URL. The default is
132
129
  * ```js
133
130
  * function(imageTile, src) {
134
131
  * imageTile.getImage().src = src;
@@ -143,13 +140,13 @@ export type Options = {
143
140
  * @property {number} [gutter=0] The size in pixels of the gutter around image tiles to ignore.
144
141
  * This allows artifacts of rendering at tile edges to be ignored.
145
142
  * Supported images should be wider and taller than the tile size by a value of `2 x gutter`.
146
- * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Optional function to get
147
- * tile URL given a tile coordinate and the projection.
148
- * Required if `url` or `urls` are not provided.
143
+ * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Deprecated. Use an ImageTile source and provide a function
144
+ * for the url option instead.
149
145
  * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,
150
146
  * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,
151
147
  * may be used instead of defining each one separately in the `urls` option.
152
- * @property {Array<string>} [urls] An array of URL templates.
148
+ * @property {Array<string>} [urls] Deprecated. Use an ImageTile source and provide an array of URLs for the
149
+ * url option instead.
153
150
  * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
154
151
  * @property {number} [transition=250] Duration of the opacity transition for rendering.
155
152
  * To disable the opacity transition, pass `transition: 0`.
@@ -1 +1 @@
1
- {"version":3,"file":"XYZ.d.ts","sourceRoot":"","sources":["XYZ.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBc,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAXjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IACE;;OAEG;IACH,2CA0CC;IALC;;;OAGG;IACH,gBAAgE;CASnE;sBA1HqB,gBAAgB"}
1
+ {"version":3,"file":"XYZ.d.ts","sourceRoot":"","sources":["XYZ.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBc,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAVjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IACE;;OAEG;IACH,2CAyCC;IALC;;;OAGG;IACH,gBAAgE;CASnE;sBAzHqB,gBAAgB"}
package/source/XYZ.js CHANGED
@@ -9,13 +9,12 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
9
9
  * @typedef {Object} Options
10
10
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
11
11
  * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
12
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
12
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
13
13
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
14
14
  * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
15
15
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
16
16
  * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,
17
17
  * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
18
- * @property {boolean} [opaque=false] Whether the layer is opaque.
19
18
  * @property {import("../proj.js").ProjectionLike} [projection='EPSG:3857'] Projection.
20
19
  * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
21
20
  * Higher values can increase reprojection performance, but decrease precision.
@@ -23,7 +22,8 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
23
22
  * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.
24
23
  * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.
25
24
  * @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid.
26
- * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is
25
+ * @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Deprecated. Use an ImageTile source with a loader
26
+ * instead. Optional function to load a tile given a URL. The default is
27
27
  * ```js
28
28
  * function(imageTile, src) {
29
29
  * imageTile.getImage().src = src;
@@ -38,13 +38,13 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
38
38
  * @property {number} [gutter=0] The size in pixels of the gutter around image tiles to ignore.
39
39
  * This allows artifacts of rendering at tile edges to be ignored.
40
40
  * Supported images should be wider and taller than the tile size by a value of `2 x gutter`.
41
- * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Optional function to get
42
- * tile URL given a tile coordinate and the projection.
43
- * Required if `url` or `urls` are not provided.
41
+ * @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Deprecated. Use an ImageTile source and provide a function
42
+ * for the url option instead.
44
43
  * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,
45
44
  * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,
46
45
  * may be used instead of defining each one separately in the `urls` option.
47
- * @property {Array<string>} [urls] An array of URL templates.
46
+ * @property {Array<string>} [urls] Deprecated. Use an ImageTile source and provide an array of URLs for the
47
+ * url option instead.
48
48
  * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
49
49
  * @property {number} [transition=250] Duration of the opacity transition for rendering.
50
50
  * To disable the opacity transition, pass `transition: 0`.
@@ -96,7 +96,6 @@ class XYZ extends TileImage {
96
96
  cacheSize: options.cacheSize,
97
97
  crossOrigin: options.crossOrigin,
98
98
  interpolate: options.interpolate,
99
- opaque: options.opaque,
100
99
  projection: projection,
101
100
  reprojectionErrorThreshold: options.reprojectionErrorThreshold,
102
101
  tileGrid: tileGrid,
@@ -30,7 +30,7 @@ export type Options = {
30
30
  */
31
31
  attributions?: import("./Source.js").AttributionLike | undefined;
32
32
  /**
33
- * Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
33
+ * Deprecated. Use the cacheSize option on the layer instead.
34
34
  */
35
35
  cacheSize?: number | undefined;
36
36
  /**
@@ -106,7 +106,7 @@ import ImageTile from '../ImageTile.js';
106
106
  /**
107
107
  * @typedef {Object} Options
108
108
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
109
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
109
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
110
110
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
111
111
  * you must provide a `crossOrigin` value you want to access pixel data with the Canvas renderer.
112
112
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
@@ -1 +1 @@
1
- {"version":3,"file":"Zoomify.d.ts","sourceRoot":"","sources":["Zoomify.js"],"names":[],"mappings":"AAcA;;GAEG;AAEH;IACE;;;;;;;;OAQG;IACH,sBARW,OAAO,YAAY,EAAE,IAAI,aACzB,OAAO,iBAAiB,EAAE,SAAS,mBAEnC,MAAM,eACL,MAAM,2BACP,OAAO,YAAY,EAAE,YAAY,sDAwB3C;IAVC;;;OAGG;IACH,sBAAyB;IAEzB;;OAEG;IACH,WAFU,OAAO,YAAY,EAAE,IAAI,CAEV;CAyB5B;;kCA1DY,SAAS,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;iBAqEtB,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;SAInC,MAAM;;;;;;;;UAYN,OAAO,YAAY,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;sBA/FjB,iBAAiB;AAsEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH;;;;;GAKG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA4JjB;CACF;sBAhRqB,gBAAgB"}
1
+ {"version":3,"file":"Zoomify.d.ts","sourceRoot":"","sources":["Zoomify.js"],"names":[],"mappings":"AAeA;;GAEG;AAEH;IACE;;;;;;;;OAQG;IACH,sBARW,OAAO,YAAY,EAAE,IAAI,aACzB,OAAO,iBAAiB,EAAE,SAAS,mBAEnC,MAAM,eACL,MAAM,2BACP,OAAO,YAAY,EAAE,YAAY,sDAwB3C;IAVC;;;OAGG;IACH,sBAAyB;IAEzB;;OAEG;IACH,WAFU,OAAO,YAAY,EAAE,IAAI,CAEV;CAyB5B;;kCA1DY,SAAS,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;iBAqEtB,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;SAInC,MAAM;;;;;;;;UAYN,OAAO,YAAY,EAAE,IAAI;;;;;;;;;;;;;;;;;;;;;;;;sBAhGjB,iBAAiB;AAuEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH;;;;;GAKG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EA4JjB;CACF;sBAjRqB,gBAAgB"}
package/source/Zoomify.js CHANGED
@@ -8,7 +8,8 @@ import TileGrid from '../tilegrid/TileGrid.js';
8
8
  import TileImage from './TileImage.js';
9
9
  import TileState from '../TileState.js';
10
10
  import {createCanvasContext2D} from '../dom.js';
11
- import {createFromTileUrlFunctions, expandUrl} from '../tileurlfunction.js';
11
+ import {createFromTileUrlFunctions} from '../tileurlfunction.js';
12
+ import {expandUrl} from '../uri.js';
12
13
  import {getCenter} from '../extent.js';
13
14
  import {toSize} from '../size.js';
14
15
 
@@ -76,7 +77,7 @@ export class CustomTile extends ImageTile {
76
77
  /**
77
78
  * @typedef {Object} Options
78
79
  * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
79
- * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
80
+ * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.
80
81
  * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
81
82
  * you must provide a `crossOrigin` value you want to access pixel data with the Canvas renderer.
82
83
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
package/source.d.ts CHANGED
@@ -23,6 +23,7 @@ export { default as ImageArcGISRest } from "./source/ImageArcGISRest.js";
23
23
  export { default as ImageCanvas } from "./source/ImageCanvas.js";
24
24
  export { default as ImageMapGuide } from "./source/ImageMapGuide.js";
25
25
  export { default as ImageStatic } from "./source/ImageStatic.js";
26
+ export { default as ImageTile } from "./source/ImageTile.js";
26
27
  export { default as ImageWMS } from "./source/ImageWMS.js";
27
28
  export { default as OGCMapTile } from "./source/OGCMapTile.js";
28
29
  export { default as OGCVectorTile } from "./source/OGCVectorTile.js";
package/source.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["source.js"],"names":[],"mappings":"AA4CA;;;;;;;;;;;GAWG;AACH,8CATW,OAAO,wBAAwB,EAAE,OAAO,kBAC/B,OAAO,gBAAgB,EAAE,SAAS,KAAG,OAAO,oBAAoB,EAAE,OAAO,UAKxE,OAAO,aAAa,EAAE,MAAM,QAAE,MAAM,KAAG,MAAM,OAAO,oBAAoB,EAAE,OAAO,CAAC,CAuBtG"}
1
+ {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["source.js"],"names":[],"mappings":"AA6CA;;;;;;;;;;;GAWG;AACH,8CATW,OAAO,wBAAwB,EAAE,OAAO,kBAC/B,OAAO,gBAAgB,EAAE,SAAS,KAAG,OAAO,oBAAoB,EAAE,OAAO,UAKxE,OAAO,aAAa,EAAE,MAAM,QAAE,MAAM,KAAG,MAAM,OAAO,oBAAoB,EAAE,OAAO,CAAC,CAuBtG"}
package/source.js CHANGED
@@ -17,6 +17,7 @@ export {default as ImageArcGISRest} from './source/ImageArcGISRest.js';
17
17
  export {default as ImageCanvas} from './source/ImageCanvas.js';
18
18
  export {default as ImageMapGuide} from './source/ImageMapGuide.js';
19
19
  export {default as ImageStatic} from './source/ImageStatic.js';
20
+ export {default as ImageTile} from './source/ImageTile.js';
20
21
  export {default as ImageWMS} from './source/ImageWMS.js';
21
22
  export {default as OGCMapTile} from './source/OGCMapTile.js';
22
23
  export {default as OGCVectorTile} from './source/OGCVectorTile.js';
package/tilecoord.d.ts CHANGED
@@ -45,6 +45,13 @@ export function fromKey(key: string): TileCoord;
45
45
  * @return {number} Hash.
46
46
  */
47
47
  export function hash(tileCoord: TileCoord): number;
48
+ /**
49
+ * @param {number} z The tile z coordinate.
50
+ * @param {number} x The tile x coordinate.
51
+ * @param {number} y The tile y coordinate.
52
+ * @return {number} Hash.
53
+ */
54
+ export function hashZXY(z: number, x: number, y: number): number;
48
55
  /**
49
56
  * @param {TileCoord} tileCoord Tile coordinate.
50
57
  * @param {!import("./tilegrid/TileGrid.js").default} tileGrid Tile grid.
@@ -1 +1 @@
1
- {"version":3,"file":"tilecoord.d.ts","sourceRoot":"","sources":["tilecoord.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AACH,kCANW,MAAM,KACN,MAAM,KACN,MAAM,gDAYhB;AAED;;;;;GAKG;AACH,6BALW,MAAM,KACN,MAAM,KACN,MAAM,GACL,MAAM,CAIjB;AAED;;;;GAIG;AACH,8CAFY,MAAM,CAIjB;AAED;;;;GAIG;AACH,+CAHW,MAAM,GACL,MAAM,CAQjB;AAED;;;;GAIG;AACH,6BAHW,MAAM,aAKhB;AAED;;;GAGG;AACH,4CAFY,MAAM,CAIjB;AAED;;;;GAIG;AACH,iEAHY,OAAO,wBAAwB,EAAE,OAAO,GACxC,OAAO,CAelB;;;;;wBAxFY,MAAM,MAAM,CAAC"}
1
+ {"version":3,"file":"tilecoord.d.ts","sourceRoot":"","sources":["tilecoord.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH;;;;;;GAMG;AACH,kCANW,MAAM,KACN,MAAM,KACN,MAAM,gDAYhB;AAED;;;;;GAKG;AACH,6BALW,MAAM,KACN,MAAM,KACN,MAAM,GACL,MAAM,CAIjB;AAED;;;;GAIG;AACH,8CAFY,MAAM,CAIjB;AAED;;;;GAIG;AACH,+CAHW,MAAM,GACL,MAAM,CAQjB;AAED;;;;GAIG;AACH,6BAHW,MAAM,aAKhB;AAED;;;GAGG;AACH,4CAFY,MAAM,CAIjB;AAED;;;;;GAKG;AACH,2BALW,MAAM,KACN,MAAM,KACN,MAAM,GACL,MAAM,CAIjB;AAED;;;;GAIG;AACH,iEAHY,OAAO,wBAAwB,EAAE,OAAO,GACxC,OAAO,CAelB;;;;;wBAlGY,MAAM,MAAM,CAAC"}
package/tilecoord.js CHANGED
@@ -72,7 +72,17 @@ export function fromKey(key) {
72
72
  * @return {number} Hash.
73
73
  */
74
74
  export function hash(tileCoord) {
75
- return (tileCoord[1] << tileCoord[0]) + tileCoord[2];
75
+ return hashZXY(tileCoord[0], tileCoord[1], tileCoord[2]);
76
+ }
77
+
78
+ /**
79
+ * @param {number} z The tile z coordinate.
80
+ * @param {number} x The tile x coordinate.
81
+ * @param {number} y The tile y coordinate.
82
+ * @return {number} Hash.
83
+ */
84
+ export function hashZXY(z, x, y) {
85
+ return (x << z) + y;
76
86
  }
77
87
 
78
88
  /**