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
@@ -36,7 +36,7 @@
36
36
  /**
37
37
  * @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").default]
38
38
  * @param {string|FeatureUrlFunction} url Feature URL service.
39
- * @param {import("./format/Feature.js").default<import("./format/Feature.js").FeatureToFeatureClass<FeatureType>>} format Feature format.
39
+ * @param {import("./format/Feature.js").default<FeatureType>} format Feature format.
40
40
  * @param {import("./extent.js").Extent} extent Extent.
41
41
  * @param {number} resolution Resolution.
42
42
  * @param {import("./proj/Projection.js").default} projection Projection.
@@ -45,18 +45,18 @@
45
45
  * @param {function(): void} failure Failure
46
46
  * Function called when loading failed.
47
47
  */
48
- export function loadFeaturesXhr<FeatureType extends import("./Feature.js").FeatureLike = import("./Feature.js").default<import("./geom.js").Geometry>>(url: string | FeatureUrlFunction, format: import("./format/Feature.js").default<import("./format/Feature.js").FeatureToFeatureClass<FeatureType>>, extent: import("./extent.js").Extent, resolution: number, projection: import("./proj/Projection.js").default, success: (arg0: FeatureType[], arg1: import("./proj/Projection.js").default) => void, failure: () => void): void;
48
+ export function loadFeaturesXhr<FeatureType extends import("./Feature.js").FeatureLike = import("./Feature.js").default<import("./geom.js").Geometry>>(url: string | FeatureUrlFunction, format: import("./format/Feature.js").default<FeatureType>, extent: import("./extent.js").Extent, resolution: number, projection: import("./proj/Projection.js").default, success: (arg0: FeatureType[], arg1: import("./proj/Projection.js").default) => void, failure: () => void): void;
49
49
  /**
50
50
  * Create an XHR feature loader for a `url` and `format`. The feature loader
51
51
  * loads features (with XHR), parses the features, and adds them to the
52
52
  * vector source.
53
53
  * @template {import("./Feature.js").FeatureLike} FeatureType
54
54
  * @param {string|FeatureUrlFunction} url Feature URL service.
55
- * @param {import("./format/Feature.js").default<import("./format/Feature.js").FeatureToFeatureClass<FeatureType>>} format Feature format.
55
+ * @param {import("./format/Feature.js").default<FeatureType>} format Feature format.
56
56
  * @return {FeatureLoader<FeatureType>} The feature loader.
57
57
  * @api
58
58
  */
59
- export function xhr<FeatureType extends import("./Feature.js").FeatureLike>(url: string | FeatureUrlFunction, format: import("./format/Feature.js").default<import("./format/Feature.js").FeatureToFeatureClass<FeatureType>>): FeatureLoader<FeatureType>;
59
+ export function xhr<FeatureType extends import("./Feature.js").FeatureLike>(url: string | FeatureUrlFunction, format: import("./format/Feature.js").default<FeatureType>): FeatureLoader<FeatureType>;
60
60
  /**
61
61
  * Setter for the withCredentials configuration for the XHR.
62
62
  *
@@ -1 +1 @@
1
- {"version":3,"file":"featureloader.d.ts","sourceRoot":"","sources":["featureloader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;GAWG;AACH,4JAVW,MAAM,GAAC,kBAAkB,2HAEzB,OAAO,aAAa,EAAE,MAAM,cAC5B,MAAM,cACN,OAAO,sBAAsB,EAAE,OAAO,uCACT,OAAO,sBAAsB,EAAE,OAAO,KAAG,IAAI,iBAE9D,IAAI,QAkE1B;AAED;;;;;;;;;GASG;AACH,iFALW,MAAM,GAAC,kBAAkB,+IAsCnC;AAED;;;;;;GAMG;AACH,uDAJW,OAAO,QAMjB;;;;;;;;;;;;;;;;0JAxJ0B,CAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAAC,yCAAkC,CAAC,QAC5G,OAAmB,aAAa,EAAE,MAAM,QACxC,MAAkB,QAClB,OAAmB,sBAAsB,EAAE,OAAO,gBAC7B,MAAM,WAAW,CAAC,KAAG,IAAI,4BACtB,IAAI,kBAAI,IAAI;;;;;;;;;;wCAYf,OAAO,aAAa,EAAE,MAAM,QAAE,MAAM,QAAE,OAAO,sBAAsB,EAAE,OAAO,KAAG,MAAM"}
1
+ {"version":3,"file":"featureloader.d.ts","sourceRoot":"","sources":["featureloader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;GAWG;AACH,4JAVW,MAAM,GAAC,kBAAkB,sEAEzB,OAAO,aAAa,EAAE,MAAM,cAC5B,MAAM,cACN,OAAO,sBAAsB,EAAE,OAAO,uCACT,OAAO,sBAAsB,EAAE,OAAO,KAAG,IAAI,iBAE9D,IAAI,QAkE1B;AAED;;;;;;;;;GASG;AACH,iFALW,MAAM,GAAC,kBAAkB,0FAsCnC;AAED;;;;;;GAMG;AACH,uDAJW,OAAO,QAMjB;;;;;;;;;;;;;;;;0JAxJ0B,CAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAAC,yCAAkC,CAAC,QAC5G,OAAmB,aAAa,EAAE,MAAM,QACxC,MAAkB,QAClB,OAAmB,sBAAsB,EAAE,OAAO,gBAC7B,MAAM,WAAW,CAAC,KAAG,IAAI,4BACtB,IAAI,kBAAI,IAAI;;;;;;;;;;wCAYf,OAAO,aAAa,EAAE,MAAM,QAAE,MAAM,QAAE,OAAO,sBAAsB,EAAE,OAAO,KAAG,MAAM"}
package/featureloader.js CHANGED
@@ -50,7 +50,7 @@ let withCredentials = false;
50
50
  /**
51
51
  * @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").default]
52
52
  * @param {string|FeatureUrlFunction} url Feature URL service.
53
- * @param {import("./format/Feature.js").default<import("./format/Feature.js").FeatureToFeatureClass<FeatureType>>} format Feature format.
53
+ * @param {import("./format/Feature.js").default<FeatureType>} format Feature format.
54
54
  * @param {import("./extent.js").Extent} extent Extent.
55
55
  * @param {number} resolution Resolution.
56
56
  * @param {import("./proj/Projection.js").default} projection Projection.
@@ -130,7 +130,7 @@ export function loadFeaturesXhr(
130
130
  * vector source.
131
131
  * @template {import("./Feature.js").FeatureLike} FeatureType
132
132
  * @param {string|FeatureUrlFunction} url Feature URL service.
133
- * @param {import("./format/Feature.js").default<import("./format/Feature.js").FeatureToFeatureClass<FeatureType>>} format Feature format.
133
+ * @param {import("./format/Feature.js").default<FeatureType>} format Feature format.
134
134
  * @return {FeatureLoader<FeatureType>} The feature loader.
135
135
  * @api
136
136
  */
@@ -43,7 +43,7 @@ export type Options = {
43
43
  *
44
44
  * @api
45
45
  */
46
- declare class EsriJSON extends JSONFeature<typeof Feature> {
46
+ declare class EsriJSON extends JSONFeature<Feature<import("../geom/Geometry.js").default>> {
47
47
  /**
48
48
  * @param {Options} [options] Options.
49
49
  */
@@ -207,11 +207,11 @@ import RenderFeature from '../render/Feature.js';
207
207
  * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial
208
208
  * file formats. See the documentation for each format for more details.
209
209
  *
210
- * @template {import('../Feature.js').FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../Feature.js").default>]
210
+ * @template {import('../Feature.js').FeatureLike} [FeatureType=import("../Feature.js").default]
211
211
  * @abstract
212
212
  * @api
213
213
  */
214
- declare class FeatureFormat<FeatureClassType extends import("../Feature.js").FeatureClass = typeof Feature> {
214
+ declare class FeatureFormat<FeatureType extends import("../Feature.js").FeatureLike = Feature<import("../geom.js").Geometry>> {
215
215
  /**
216
216
  * @protected
217
217
  * @type {import("../proj/Projection.js").default|undefined}
@@ -224,9 +224,9 @@ declare class FeatureFormat<FeatureClassType extends import("../Feature.js").Fea
224
224
  protected defaultFeatureProjection: import("../proj/Projection.js").default | undefined;
225
225
  /**
226
226
  * @protected
227
- * @type {FeatureClassType}
227
+ * @type {FeatureToFeatureClass<FeatureType>}
228
228
  */
229
- protected featureClass: FeatureClassType;
229
+ protected featureClass: FeatureToFeatureClass<FeatureType>;
230
230
  /**
231
231
  * A list media types supported by the format in descending order of preference.
232
232
  * @type {Array<string>}
@@ -261,18 +261,18 @@ declare class FeatureFormat<FeatureClassType extends import("../Feature.js").Fea
261
261
  * @abstract
262
262
  * @param {Document|Element|Object|string} source Source.
263
263
  * @param {ReadOptions} [options] Read options.
264
- * @return {FeatureClassToFeature<FeatureClassType>|Array<FeatureClassToFeature<FeatureClassType>>} Feature.
264
+ * @return {FeatureType|Array<FeatureType>} Feature.
265
265
  */
266
- readFeature(source: Document | Element | any | string, options?: ReadOptions | undefined): FeatureClassToFeature<FeatureClassType> | Array<FeatureClassToFeature<FeatureClassType>>;
266
+ readFeature(source: Document | Element | any | string, options?: ReadOptions | undefined): FeatureType | Array<FeatureType>;
267
267
  /**
268
268
  * Read all features from a source.
269
269
  *
270
270
  * @abstract
271
271
  * @param {Document|Element|ArrayBuffer|Object|string} source Source.
272
272
  * @param {ReadOptions} [options] Read options.
273
- * @return {Array<FeatureClassToFeature<FeatureClassType>>} Features.
273
+ * @return {Array<FeatureType>} Features.
274
274
  */
275
- readFeatures(source: Document | Element | ArrayBuffer | any | string, options?: ReadOptions | undefined): Array<FeatureClassToFeature<FeatureClassType>>;
275
+ readFeatures(source: Document | Element | ArrayBuffer | any | string, options?: ReadOptions | undefined): Array<FeatureType>;
276
276
  /**
277
277
  * Read a single geometry from a source.
278
278
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["Feature.js"],"names":[],"mappings":"AAgSA;;;;;;GAMG;AACH,0HAJW,OAAO,uDAkDjB;AAED;;;;GAIG;AACH,mDAJW,OAAO,cAAc,EAAE,MAAM,sCAE5B,OAAO,cAAc,EAAE,MAAM,CAgBxC;AA2BD;;;;GAIG;AACH,4CAJW,aAAa,qDAEZ,aAAa,GAAC,MAAM,aAAa,CAAC,CAkC7C;AAED;;;;GAIG;AACH,uCAJW,cAAc,GAAC,IAAI,qDAElB,OAAO,qBAAqB,EAAE,OAAO,CAkBhD;;;;;;;;;;qBAnaa,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;wBASn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Q,MAAM,sCAEzC,MAAM,WAAW,CAAC,CAI7B;IAED;;;;;;;OAOG;IACH,qBAJW,QAAQ,GAAC,OAAO,SAAQ,MAAM,sCAE7B,OAAO,qBAAqB,EAAE,OAAO,CAIhD;IAED;;;;;;OAMG;IACH,uBAHW,QAAQ,GAAC,OAAO,SAAQ,MAAM,GAC7B,OAAO,uBAAuB,EAAE,OAAO,GAAC,SAAS,CAI5D;IAED;;;;;;;OAOG;IACH,sBAJW,OAAO,uCAEN,MAAM,GAAC,WAAW,CAI7B;IAED;;;;;;;OAOG;IACH,wBAJW,MAAM,OAAO,CAAC,uCAEb,MAAM,GAAC,WAAW,CAI7B;IAED;;;;;;;OAOG;IACH,wBAJW,OAAO,qBAAqB,EAAE,OAAO,uCAEpC,MAAM,GAAC,WAAW,CAI7B;CACF;oBA3RmB,eAAe"}
package/format/Feature.js CHANGED
@@ -113,7 +113,7 @@ import {
113
113
  * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial
114
114
  * file formats. See the documentation for each format for more details.
115
115
  *
116
- * @template {import('../Feature.js').FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../Feature.js").default>]
116
+ * @template {import('../Feature.js').FeatureLike} [FeatureType=import("../Feature.js").default]
117
117
  * @abstract
118
118
  * @api
119
119
  */
@@ -133,9 +133,11 @@ class FeatureFormat {
133
133
 
134
134
  /**
135
135
  * @protected
136
- * @type {FeatureClassType}
136
+ * @type {FeatureToFeatureClass<FeatureType>}
137
137
  */
138
- this.featureClass = /** @type {FeatureClassType} */ (Feature);
138
+ this.featureClass = /** @type {FeatureToFeatureClass<FeatureType>} */ (
139
+ Feature
140
+ );
139
141
 
140
142
  /**
141
143
  * A list media types supported by the format in descending order of preference.
@@ -206,7 +208,7 @@ class FeatureFormat {
206
208
  * @abstract
207
209
  * @param {Document|Element|Object|string} source Source.
208
210
  * @param {ReadOptions} [options] Read options.
209
- * @return {FeatureClassToFeature<FeatureClassType>|Array<FeatureClassToFeature<FeatureClassType>>} Feature.
211
+ * @return {FeatureType|Array<FeatureType>} Feature.
210
212
  */
211
213
  readFeature(source, options) {
212
214
  return abstract();
@@ -218,7 +220,7 @@ class FeatureFormat {
218
220
  * @abstract
219
221
  * @param {Document|Element|ArrayBuffer|Object|string} source Source.
220
222
  * @param {ReadOptions} [options] Read options.
221
- * @return {Array<FeatureClassToFeature<FeatureClassType>>} Features.
223
+ * @return {Array<FeatureType>} Features.
222
224
  */
223
225
  readFeatures(source, options) {
224
226
  return abstract();
@@ -10,7 +10,7 @@ export type GeoJSONMultiPoint = import("geojson").MultiPoint;
10
10
  export type GeoJSONMultiLineString = import("geojson").MultiLineString;
11
11
  export type GeoJSONMultiPolygon = import("geojson").MultiPolygon;
12
12
  export type GeoJSONGeometryCollection = import("geojson").GeometryCollection;
13
- export type Options<FeatureClassType extends import("../Feature.js").FeatureClass = typeof Feature> = {
13
+ export type Options<FeatureType extends import("../Feature.js").FeatureLike = Feature<import("../geom/Geometry.js").default>> = {
14
14
  /**
15
15
  * Default data projection.
16
16
  */
@@ -37,7 +37,7 @@ export type Options<FeatureClassType extends import("../Feature.js").FeatureClas
37
37
  * the primary concern, and features are not going to be modified or round-tripped through the format,
38
38
  * consider using {@link module :ol/render/Feature~RenderFeature}
39
39
  */
40
- featureClass?: FeatureClassType | undefined;
40
+ featureClass?: import("./Feature.js").FeatureToFeatureClass<FeatureType> | undefined;
41
41
  };
42
42
  /**
43
43
  * @typedef {import("geojson").GeoJSON} GeoJSONObject
@@ -53,7 +53,7 @@ export type Options<FeatureClassType extends import("../Feature.js").FeatureClas
53
53
  * @typedef {import("geojson").GeometryCollection} GeoJSONGeometryCollection
54
54
  */
55
55
  /**
56
- * @template {import("../Feature.js").FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../Feature.js").default>]
56
+ * @template {import("../Feature.js").FeatureLike} [FeatureType=import("../Feature.js").default]
57
57
  * @typedef {Object} Options
58
58
  *
59
59
  * @property {import("../proj.js").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.
@@ -64,7 +64,7 @@ export type Options<FeatureClassType extends import("../Feature.js").FeatureClas
64
64
  * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader
65
65
  * will look for that field to set the geometry name. If both this field is set to `true`
66
66
  * and a `geometryName` is provided, the `geometryName` will take precedence.
67
- * @property {FeatureClassType} [featureClass] Feature class
67
+ * @property {import('./Feature.js').FeatureToFeatureClass<FeatureType>} [featureClass] Feature class
68
68
  * to be used when reading features. The default is {@link module:ol/Feature~Feature}. If performance is
69
69
  * the primary concern, and features are not going to be modified or round-tripped through the format,
70
70
  * consider using {@link module:ol/render/Feature~RenderFeature}
@@ -73,15 +73,15 @@ export type Options<FeatureClassType extends import("../Feature.js").FeatureClas
73
73
  * @classdesc
74
74
  * Feature format for reading and writing data in the GeoJSON format.
75
75
  *
76
- * @template {import('../Feature.js').FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../Feature.js").default>]
77
- * @extends {JSONFeature<FeatureClassType>}
76
+ * @template {import('../Feature.js').FeatureLike} [FeatureType=import("../Feature.js").default]
77
+ * @extends {JSONFeature<FeatureType>}
78
78
  * @api
79
79
  */
80
- declare class GeoJSON<FeatureClassType extends import("../Feature.js").FeatureClass = typeof Feature> extends JSONFeature<FeatureClassType> {
80
+ declare class GeoJSON<FeatureType extends import("../Feature.js").FeatureLike = Feature<import("../geom/Geometry.js").default>> extends JSONFeature<FeatureType> {
81
81
  /**
82
- * @param {Options<FeatureClassType>} [options] Options.
82
+ * @param {Options<FeatureType>} [options] Options.
83
83
  */
84
- constructor(options?: Options<FeatureClassType> | undefined);
84
+ constructor(options?: Options<FeatureType> | undefined);
85
85
  /**
86
86
  * Name of the geometry attribute for features.
87
87
  * @type {string|undefined}
@@ -1 +1 @@
1
- {"version":3,"file":"GeoJSON.d.ts","sourceRoot":"","sources":["GeoJSON.js"],"names":[],"mappings":";4BAqBa,OAAO,SAAS,EAAE,OAAO;6BACzB,O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AAS,EAAE,OAAO;gCACzB,OAAO,SAAS,EAAE,UAAU;qCAC5B,OAAO,SAAS,EAAE,eAAe;kCACjC,OAAO,SAAS,EAAE,YAAY;wCAC9B,OAAO,SAAS,EAAE,kBAAkB;;;;;qBAOnC,OAAO,YAAY,EAAE,cAAc;;;;;wBACnC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;AAnBjD;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,wDAyCC;IAlBC;;;;OAIG;IACH,sBAAyC;IAEzC;;;;OAIG;IACH,6BAAuD;IA4FzD;;;;;OAKG;IACH,yCALW,eAAe,6DAGd,OAAO,qBAAqB,EAAE,OAAO,CAIhD;IAwBD;;;;;;;OAOG;IACH,4BALW,OAAO,eAAe,EAAE,OAAO,8DAE9B,cAAc,CAmCzB;IAED;;;;;;;OAOG;IACH,8BALW,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,8DAErC,wBAAwB,CAanC;IAED;;;;;;;OAOG;IACH,8BALW,OAAO,qBAAqB,EAAE,OAAO,8DAEpC,eAAe,GAAC,yBAAyB,CAKpD;CACF;oBApSmB,eAAe;wBACX,kBAAkB"}
package/format/GeoJSON.js CHANGED
@@ -33,7 +33,7 @@ import {isEmpty} from '../obj.js';
33
33
  */
34
34
 
35
35
  /**
36
- * @template {import("../Feature.js").FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../Feature.js").default>]
36
+ * @template {import("../Feature.js").FeatureLike} [FeatureType=import("../Feature.js").default]
37
37
  * @typedef {Object} Options
38
38
  *
39
39
  * @property {import("../proj.js").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.
@@ -44,7 +44,7 @@ import {isEmpty} from '../obj.js';
44
44
  * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader
45
45
  * will look for that field to set the geometry name. If both this field is set to `true`
46
46
  * and a `geometryName` is provided, the `geometryName` will take precedence.
47
- * @property {FeatureClassType} [featureClass] Feature class
47
+ * @property {import('./Feature.js').FeatureToFeatureClass<FeatureType>} [featureClass] Feature class
48
48
  * to be used when reading features. The default is {@link module:ol/Feature~Feature}. If performance is
49
49
  * the primary concern, and features are not going to be modified or round-tripped through the format,
50
50
  * consider using {@link module:ol/render/Feature~RenderFeature}
@@ -54,13 +54,13 @@ import {isEmpty} from '../obj.js';
54
54
  * @classdesc
55
55
  * Feature format for reading and writing data in the GeoJSON format.
56
56
  *
57
- * @template {import('../Feature.js').FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../Feature.js").default>]
58
- * @extends {JSONFeature<FeatureClassType>}
57
+ * @template {import('../Feature.js').FeatureLike} [FeatureType=import("../Feature.js").default]
58
+ * @extends {JSONFeature<FeatureType>}
59
59
  * @api
60
60
  */
61
61
  class GeoJSON extends JSONFeature {
62
62
  /**
63
- * @param {Options<FeatureClassType>} [options] Options.
63
+ * @param {Options<FeatureType>} [options] Options.
64
64
  */
65
65
  constructor(options) {
66
66
  options = options ? options : {};
@@ -109,7 +109,7 @@ class GeoJSON extends JSONFeature {
109
109
  * @param {Object} object Object.
110
110
  * @param {import("./Feature.js").ReadOptions} [options] Read options.
111
111
  * @protected
112
- * @return {import('./Feature.js').FeatureClassToFeature<FeatureClassType>|Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} Feature.
112
+ * @return {FeatureType|Array<FeatureType>} Feature.
113
113
  */
114
114
  readFeatureFromObject(object, options) {
115
115
  /**
@@ -128,7 +128,7 @@ class GeoJSON extends JSONFeature {
128
128
 
129
129
  const geometry = readGeometryInternal(geoJSONFeature['geometry'], options);
130
130
  if (this.featureClass === RenderFeature) {
131
- return /** @type {import('./Feature.js').FeatureClassToFeature<FeatureClassType>|Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} */ (
131
+ return /** @type {FeatureType|Array<FeatureType>} */ (
132
132
  createRenderFeature(
133
133
  {
134
134
  geometry,
@@ -155,16 +155,14 @@ class GeoJSON extends JSONFeature {
155
155
  if (geoJSONFeature['properties']) {
156
156
  feature.setProperties(geoJSONFeature['properties'], true);
157
157
  }
158
- return /** @type {import('./Feature.js').FeatureClassToFeature<FeatureClassType>|Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} */ (
159
- feature
160
- );
158
+ return /** @type {FeatureType|Array<FeatureType>} */ (feature);
161
159
  }
162
160
 
163
161
  /**
164
162
  * @param {Object} object Object.
165
163
  * @param {import("./Feature.js").ReadOptions} [options] Read options.
166
164
  * @protected
167
- * @return {Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} Features.
165
+ * @return {Array<FeatureType>} Features.
168
166
  */
169
167
  readFeaturesFromObject(object, options) {
170
168
  const geoJSONObject = /** @type {GeoJSONObject} */ (object);
@@ -188,9 +186,7 @@ class GeoJSON extends JSONFeature {
188
186
  } else {
189
187
  features = [this.readFeatureFromObject(object, options)];
190
188
  }
191
- return /** @type {Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} */ (
192
- features.flat()
193
- );
189
+ return /** @type {Array<FeatureType>} */ (features.flat());
194
190
  }
195
191
 
196
192
  /**
@@ -5,27 +5,27 @@ export default JSONFeature;
5
5
  * instantiated in apps.
6
6
  * Base class for JSON feature formats.
7
7
  *
8
- * @template {import('../Feature.js').FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../Feature.js").default>]
9
- * @extends {FeatureFormat<FeatureClassType>}
8
+ * @template {import('../Feature.js').FeatureLike} [FeatureType=import("../Feature.js").default]
9
+ * @extends {FeatureFormat<FeatureType>}
10
10
  * @abstract
11
11
  */
12
- declare class JSONFeature<FeatureClassType extends import("../Feature.js").FeatureClass = typeof import("../Feature.js").default> extends FeatureFormat<FeatureClassType> {
12
+ declare class JSONFeature<FeatureType extends import("../Feature.js").FeatureLike = import("../Feature.js").default<import("../geom/Geometry.js").default>> extends FeatureFormat<FeatureType> {
13
13
  /**
14
14
  * @abstract
15
15
  * @param {Object} object Object.
16
16
  * @param {import("./Feature.js").ReadOptions} [options] Read options.
17
17
  * @protected
18
- * @return {import('./Feature.js').FeatureClassToFeature<FeatureClassType>|Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} Feature.
18
+ * @return {FeatureType|Array<FeatureType>} Feature.
19
19
  */
20
- protected readFeatureFromObject(object: any, options?: import("./Feature.js").ReadOptions | undefined): import('./Feature.js').FeatureClassToFeature<FeatureClassType> | Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>;
20
+ protected readFeatureFromObject(object: any, options?: import("./Feature.js").ReadOptions | undefined): FeatureType | Array<FeatureType>;
21
21
  /**
22
22
  * @abstract
23
23
  * @param {Object} object Object.
24
24
  * @param {import("./Feature.js").ReadOptions} [options] Read options.
25
25
  * @protected
26
- * @return {Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} Features.
26
+ * @return {Array<FeatureType>} Features.
27
27
  */
28
- protected readFeaturesFromObject(object: any, options?: import("./Feature.js").ReadOptions | undefined): Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>;
28
+ protected readFeaturesFromObject(object: any, options?: import("./Feature.js").ReadOptions | undefined): Array<FeatureType>;
29
29
  /**
30
30
  * @abstract
31
31
  * @param {Object} object Object.
@@ -1 +1 @@
1
- {"version":3,"file":"JSONFeature.d.ts","sourceRoot":"","sources":["JSONFeature.js"],"names":[],"mappings":";AAMA;;;;;;;;;GASG;AACH;IA8CE;;;;;;OAMG;IACH,wGAFY,OAAO,cAAc,EAAE,qBAAqB,CAAC,gBAAgB,CAAC,GAAC,MAAM,OAAO,cAAc,EAAE,qBAAqB,CAAC,gBAAgB,CAAC,CAAC,CAI/I;IAED;;;;;;OAMG;IACH,yGAFY,MAAM,OAAO,cAAc,EAAE,qBAAqB,CAAC,gBAAgB,CAAC,CAAC,CAIhF;IAiBD;;;;;;OAMG;IACH,yGAFY,OAAO,qBAAqB,EAAE,OAAO,CAIhD;IAED;;;;;;OAMG;IACH,uB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M,OAAO,eAAe,EAAE,OAAO,CAAC,8DAErC,MAAM,CAKjB;IAED;;;;;OAKG;IACH,8BAJW,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,kEAMhD;IAED;;;;;;;OAOG;IACH,wBALW,OAAO,qBAAqB,EAAE,OAAO,8DAEpC,MAAM,CAKjB;IAED;;;;;OAKG;IACH,8BAJW,OAAO,qBAAqB,EAAE,OAAO,kEAM/C;CACF;0BA/LyB,cAAc"}
@@ -10,8 +10,8 @@ import {abstract} from '../util.js';
10
10
  * instantiated in apps.
11
11
  * Base class for JSON feature formats.
12
12
  *
13
- * @template {import('../Feature.js').FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../Feature.js").default>]
14
- * @extends {FeatureFormat<FeatureClassType>}
13
+ * @template {import('../Feature.js').FeatureLike} [FeatureType=import("../Feature.js").default]
14
+ * @extends {FeatureFormat<FeatureType>}
15
15
  * @abstract
16
16
  */
17
17
  class JSONFeature extends FeatureFormat {
@@ -32,7 +32,7 @@ class JSONFeature extends FeatureFormat {
32
32
  *
33
33
  * @param {ArrayBuffer|Document|Element|Object|string} source Source.
34
34
  * @param {import("./Feature.js").ReadOptions} [options] Read options.
35
- * @return {import('./Feature.js').FeatureClassToFeature<FeatureClassType>|Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} Feature.
35
+ * @return {FeatureType|Array<FeatureType>} Feature.
36
36
  * @api
37
37
  */
38
38
  readFeature(source, options) {
@@ -48,15 +48,13 @@ class JSONFeature extends FeatureFormat {
48
48
  *
49
49
  * @param {ArrayBuffer|Document|Element|Object|string} source Source.
50
50
  * @param {import("./Feature.js").ReadOptions} [options] Read options.
51
- * @return {Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} Features.
51
+ * @return {Array<FeatureType>} Features.
52
52
  * @api
53
53
  */
54
54
  readFeatures(source, options) {
55
- return /** @type {Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} */ (
56
- this.readFeaturesFromObject(
57
- getObject(source),
58
- this.getReadOptions(source, options),
59
- )
55
+ return this.readFeaturesFromObject(
56
+ getObject(source),
57
+ this.getReadOptions(source, options),
60
58
  );
61
59
  }
62
60
 
@@ -65,7 +63,7 @@ class JSONFeature extends FeatureFormat {
65
63
  * @param {Object} object Object.
66
64
  * @param {import("./Feature.js").ReadOptions} [options] Read options.
67
65
  * @protected
68
- * @return {import('./Feature.js').FeatureClassToFeature<FeatureClassType>|Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} Feature.
66
+ * @return {FeatureType|Array<FeatureType>} Feature.
69
67
  */
70
68
  readFeatureFromObject(object, options) {
71
69
  return abstract();
@@ -76,7 +74,7 @@ class JSONFeature extends FeatureFormat {
76
74
  * @param {Object} object Object.
77
75
  * @param {import("./Feature.js").ReadOptions} [options] Read options.
78
76
  * @protected
79
- * @return {Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} Features.
77
+ * @return {Array<FeatureType>} Features.
80
78
  */
81
79
  readFeaturesFromObject(object, options) {
82
80
  return abstract();
package/format/MVT.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  export default MVT;
2
- export type Options<FeatureClassType extends import("../Feature.js").FeatureClass = typeof RenderFeature> = {
2
+ export type Options<FeatureType extends import("../Feature.js").FeatureLike = RenderFeature> = {
3
3
  /**
4
4
  * Class for features returned by
5
5
  * {@link module :ol/format/MVT~MVT#readFeatures}. Set to {@link module :ol/Feature~Feature} to get full editing and geometry
6
6
  * support at the cost of decreased rendering performance. The default is
7
7
  * {@link module :ol/render/Feature~RenderFeature}, which is optimized for rendering and hit detection.
8
8
  */
9
- featureClass?: FeatureClassType | undefined;
9
+ featureClass?: import("./Feature.js").FeatureToFeatureClass<FeatureType> | undefined;
10
10
  /**
11
11
  * Geometry name to use when creating features.
12
12
  */
@@ -26,9 +26,9 @@ export type Options<FeatureClassType extends import("../Feature.js").FeatureClas
26
26
  idProperty?: string | undefined;
27
27
  };
28
28
  /**
29
- * @template {import("../Feature.js").FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../render/Feature.js").default>]
29
+ * @template {import("../Feature.js").FeatureLike} [FeatureType=import("../render/Feature.js").default]
30
30
  * @typedef {Object} Options
31
- * @property {FeatureClassType} [featureClass] Class for features returned by
31
+ * @property {import('./Feature.js').FeatureToFeatureClass<FeatureType>} [featureClass] Class for features returned by
32
32
  * {@link module:ol/format/MVT~MVT#readFeatures}. Set to {@link module:ol/Feature~Feature} to get full editing and geometry
33
33
  * support at the cost of decreased rendering performance. The default is
34
34
  * {@link module:ol/render/Feature~RenderFeature}, which is optimized for rendering and hit detection.
@@ -42,15 +42,15 @@ export type Options<FeatureClassType extends import("../Feature.js").FeatureClas
42
42
  * @classdesc
43
43
  * Feature format for reading data in the Mapbox MVT format.
44
44
  *
45
- * @template {import('../Feature.js').FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../render/Feature.js").default>]
46
- * @extends {FeatureFormat<FeatureClassType>}
45
+ * @template {import('../Feature.js').FeatureLike} [FeatureType=RenderFeature]
46
+ * @extends {FeatureFormat<FeatureType>}
47
47
  * @api
48
48
  */
49
- declare class MVT<FeatureClassType extends import("../Feature.js").FeatureClass = typeof RenderFeature> extends FeatureFormat<FeatureClassType> {
49
+ declare class MVT<FeatureType extends import("../Feature.js").FeatureLike = RenderFeature> extends FeatureFormat<FeatureType> {
50
50
  /**
51
- * @param {Options<FeatureClassType>} [options] Options.
51
+ * @param {Options<FeatureType>} [options] Options.
52
52
  */
53
- constructor(options?: Options<FeatureClassType> | undefined);
53
+ constructor(options?: Options<FeatureType> | undefined);
54
54
  /**
55
55
  * @private
56
56
  * @type {string|undefined}
@@ -86,7 +86,7 @@ declare class MVT<FeatureClassType extends import("../Feature.js").FeatureClass
86
86
  * @param {PBF} pbf PBF
87
87
  * @param {Object} rawFeature Raw Mapbox feature.
88
88
  * @param {import("./Feature.js").ReadOptions} options Read options.
89
- * @return {import('./Feature.js').FeatureClassToFeature<FeatureClassType>|null} Feature.
89
+ * @return {FeatureType|null} Feature.
90
90
  */
91
91
  private createFeature_;
92
92
  /**
@@ -94,10 +94,10 @@ declare class MVT<FeatureClassType extends import("../Feature.js").FeatureClass
94
94
  *
95
95
  * @param {ArrayBuffer} source Source.
96
96
  * @param {import("./Feature.js").ReadOptions} [options] Read options.
97
- * @return {Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} Features.
97
+ * @return {Array<FeatureType>} Features.
98
98
  * @api
99
99
  */
100
- readFeatures(source: ArrayBuffer, options?: import("./Feature.js").ReadOptions | undefined): Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>;
100
+ readFeatures(source: ArrayBuffer, options?: import("./Feature.js").ReadOptions | undefined): Array<FeatureType>;
101
101
  /**
102
102
  * Read the projection from the source.
103
103
  *
@@ -1 +1 @@
1
- {"version":3,"file":"MVT.d.ts","sourceRoot":"","sources":["MVT.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,6DA6CC;IA5BC;;;OAGG;IACH,sBAAyC;IAEzC;;;OAGG;IACH,mBAAiE;IAEjE;;;OAGG;IACH,gBAAqD;IAErD;;;OAGG;IACH,oBAAqC;IAQvC;;;;;;;;OAQG;IACH,yBAoDC;IAED;;;;;;OAMG;IACH,uBAqEC;IASD;;;;;;;OAOG;IACH,qBALW,WAAW,6DAEV,MAAM,OAAO,cAAc,EAAE,qBAAqB,CAAC,gBAAgB,CAAC,CAAC,CAkChF;IAED;;;;;;OAMG;IACH,uBAJW,QAAQ,GAAC,OAAO,SAAQ,MAAM,GAC7B,OAAO,uBAAuB,EAAE,OAAO,CAKlD;IAED;;;;OAIG;IACH,kBAHW,MAAM,MAAM,CAAC,QAKvB;CACF;0BA7RyB,sBAAsB;0BATU,cAAc"}
1
+ {"version":3,"file":"MVT.d.ts","sourceRoot":"","sources":["MVT.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,wDA+CC;IA5BC;;;OAGG;IACH,sBAAyC;IAEzC;;;OAGG;IACH,mBAAiE;IAEjE;;;OAGG;IACH,gBAAqD;IAErD;;;OAGG;IACH,oBAAqC;IAQvC;;;;;;;;OAQG;IACH,yBAoDC;IAED;;;;;;OAMG;IACH,uBAmEC;IASD;;;;;;;OAOG;IACH,qBALW,WAAW,6DAEV,MAAM,WAAW,CAAC,CAgC7B;IAED;;;;;;OAMG;IACH,uBAJW,QAAQ,GAAC,OAAO,SAAQ,MAAM,GAC7B,OAAO,uBAAuB,EAAE,OAAO,CAKlD;IAED;;;;OAIG;IACH,kBAHW,MAAM,MAAM,CAAC,QAKvB;CACF;0BA3RyB,sBAAsB;0BATU,cAAc"}
package/format/MVT.js CHANGED
@@ -17,9 +17,9 @@ import {get} from '../proj.js';
17
17
  import {inflateEnds} from '../geom/flat/orient.js';
18
18
 
19
19
  /**
20
- * @template {import("../Feature.js").FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../render/Feature.js").default>]
20
+ * @template {import("../Feature.js").FeatureLike} [FeatureType=import("../render/Feature.js").default]
21
21
  * @typedef {Object} Options
22
- * @property {FeatureClassType} [featureClass] Class for features returned by
22
+ * @property {import('./Feature.js').FeatureToFeatureClass<FeatureType>} [featureClass] Class for features returned by
23
23
  * {@link module:ol/format/MVT~MVT#readFeatures}. Set to {@link module:ol/Feature~Feature} to get full editing and geometry
24
24
  * support at the cost of decreased rendering performance. The default is
25
25
  * {@link module:ol/render/Feature~RenderFeature}, which is optimized for rendering and hit detection.
@@ -34,13 +34,13 @@ import {inflateEnds} from '../geom/flat/orient.js';
34
34
  * @classdesc
35
35
  * Feature format for reading data in the Mapbox MVT format.
36
36
  *
37
- * @template {import('../Feature.js').FeatureClass} [FeatureClassType=import('./Feature.js').FeatureToFeatureClass<import("../render/Feature.js").default>]
38
- * @extends {FeatureFormat<FeatureClassType>}
37
+ * @template {import('../Feature.js').FeatureLike} [FeatureType=RenderFeature]
38
+ * @extends {FeatureFormat<FeatureType>}
39
39
  * @api
40
40
  */
41
41
  class MVT extends FeatureFormat {
42
42
  /**
43
- * @param {Options<FeatureClassType>} [options] Options.
43
+ * @param {Options<FeatureType>} [options] Options.
44
44
  */
45
45
  constructor(options) {
46
46
  super();
@@ -57,7 +57,9 @@ class MVT extends FeatureFormat {
57
57
 
58
58
  this.featureClass = options.featureClass
59
59
  ? options.featureClass
60
- : /** @type {FeatureClassType} */ (RenderFeature);
60
+ : /** @type {import('./Feature.js').FeatureToFeatureClass<FeatureType>} */ (
61
+ RenderFeature
62
+ );
61
63
 
62
64
  /**
63
65
  * @private
@@ -157,7 +159,7 @@ class MVT extends FeatureFormat {
157
159
  * @param {PBF} pbf PBF
158
160
  * @param {Object} rawFeature Raw Mapbox feature.
159
161
  * @param {import("./Feature.js").ReadOptions} options Read options.
160
- * @return {import('./Feature.js').FeatureClassToFeature<FeatureClassType>|null} Feature.
162
+ * @return {FeatureType|null} Feature.
161
163
  */
162
164
  createFeature_(pbf, rawFeature, options) {
163
165
  const type = rawFeature.type;
@@ -225,9 +227,7 @@ class MVT extends FeatureFormat {
225
227
  feature.setProperties(values, true);
226
228
  }
227
229
 
228
- return /** @type {import('./Feature.js').FeatureClassToFeature<FeatureClassType>} */ (
229
- feature
230
- );
230
+ return /** @type {FeatureType} */ (feature);
231
231
  }
232
232
 
233
233
  /**
@@ -242,7 +242,7 @@ class MVT extends FeatureFormat {
242
242
  *
243
243
  * @param {ArrayBuffer} source Source.
244
244
  * @param {import("./Feature.js").ReadOptions} [options] Read options.
245
- * @return {Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} Features.
245
+ * @return {Array<FeatureType>} Features.
246
246
  * @api
247
247
  */
248
248
  readFeatures(source, options) {
@@ -273,9 +273,7 @@ class MVT extends FeatureFormat {
273
273
  }
274
274
  }
275
275
 
276
- return /** @type {Array<import('./Feature.js').FeatureClassToFeature<FeatureClassType>>} */ (
277
- features
278
- );
276
+ return /** @type {Array<FeatureType>} */ (features);
279
277
  }
280
278
 
281
279
  /**
@@ -7,7 +7,7 @@ export default TextFeature;
7
7
  *
8
8
  * @abstract
9
9
  */
10
- declare class TextFeature extends FeatureFormat<typeof import("../Feature.js").default> {
10
+ declare class TextFeature extends FeatureFormat<import("../Feature.js").default<import("../geom/Geometry.js").default>> {
11
11
  constructor();
12
12
  /**
13
13
  * Read the feature from the source.
@@ -79,7 +79,7 @@ export type Options = {
79
79
  *
80
80
  * @api
81
81
  */
82
- declare class TopoJSON extends JSONFeature<typeof Feature> {
82
+ declare class TopoJSON extends JSONFeature<Feature<import("../geom/Geometry.js").default>> {
83
83
  /**
84
84
  * @param {Options} [options] Options.
85
85
  */
package/format/WKB.d.ts CHANGED
@@ -51,7 +51,7 @@ export type Options = {
51
51
  *
52
52
  * @api
53
53
  */
54
- declare class WKB extends FeatureFormat<typeof Feature> {
54
+ declare class WKB extends FeatureFormat<Feature<import("../geom/Geometry.js").default>> {
55
55
  /**
56
56
  * @param {Options} [options] Optional configuration object.
57
57
  */
@@ -7,7 +7,7 @@ export default XMLFeature;
7
7
  *
8
8
  * @abstract
9
9
  */
10
- declare class XMLFeature extends FeatureFormat<typeof import("../Feature.js").default> {
10
+ declare class XMLFeature extends FeatureFormat<import("../Feature.js").default<import("../geom/Geometry.js").default>> {
11
11
  constructor();
12
12
  /**
13
13
  * @type {XMLSerializer}
@@ -36,7 +36,7 @@ export type Options = {
36
36
  * Format constructors
37
37
  * (and/or formats pre-constructed with options).
38
38
  */
39
- formatConstructors?: (typeof import("../format/Feature.js").default | import("../format/Feature.js").default<typeof import("../Feature.js").default>)[] | undefined;
39
+ formatConstructors?: (typeof import("../format/Feature.js").default | import("../format/Feature.js").default<import("../Feature.js").default<import("../geom.js").Geometry>>)[] | undefined;
40
40
  /**
41
41
  * Optional vector source where features will be added. If a source is provided
42
42
  * all existing features will be removed and new features will be added when