ol 9.2.5-dev.1717260235384 → 9.2.5-sh.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VectorRenderTile.d.ts +3 -3
- package/VectorRenderTile.d.ts.map +1 -1
- package/VectorTile.d.ts +16 -19
- package/VectorTile.d.ts.map +1 -1
- package/VectorTile.js +9 -12
- package/dist/ol.d.ts +2 -0
- package/dist/ol.d.ts.map +1 -1
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/featureloader.d.ts +8 -8
- package/featureloader.d.ts.map +1 -1
- package/featureloader.js +5 -5
- package/format/EsriJSON.d.ts +7 -0
- package/format/EsriJSON.d.ts.map +1 -1
- package/format/Feature.d.ts +10 -10
- package/format/Feature.d.ts.map +1 -1
- package/format/Feature.js +6 -6
- package/format/GeoJSON.d.ts +9 -9
- package/format/GeoJSON.d.ts.map +1 -1
- package/format/GeoJSON.js +17 -22
- package/format/JSONFeature.d.ts +27 -7
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/JSONFeature.js +12 -10
- package/format/MVT.d.ts +12 -12
- package/format/MVT.d.ts.map +1 -1
- package/format/MVT.js +18 -16
- package/format/TextFeature.d.ts +9 -0
- package/format/TextFeature.d.ts.map +1 -1
- package/format/TopoJSON.d.ts +7 -0
- package/format/TopoJSON.d.ts.map +1 -1
- package/format/XMLFeature.d.ts +9 -0
- package/format/XMLFeature.d.ts.map +1 -1
- package/interaction/Draw.d.ts +1 -1
- package/interaction/Draw.d.ts.map +1 -1
- package/interaction/Modify.d.ts +3 -3
- package/interaction/Modify.d.ts.map +1 -1
- package/interaction/Select.d.ts +2 -1
- package/interaction/Select.d.ts.map +1 -1
- package/layer/BaseVector.d.ts +6 -7
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/BaseVector.js +4 -6
- package/layer/Graticule.d.ts +2 -3
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Graticule.js +1 -1
- package/layer/Heatmap.d.ts +7 -8
- package/layer/Heatmap.d.ts.map +1 -1
- package/layer/Heatmap.js +5 -7
- package/layer/Tile.d.ts +2 -2
- package/layer/Tile.js +1 -1
- package/layer/Vector.d.ts +9 -19
- package/layer/Vector.d.ts.map +1 -1
- package/layer/Vector.js +5 -12
- package/layer/VectorImage.d.ts +7 -9
- package/layer/VectorImage.d.ts.map +1 -1
- package/layer/VectorImage.js +4 -6
- package/layer/VectorTile.d.ts +9 -19
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/VectorTile.js +9 -16
- package/package.json +1 -1
- package/renderer/canvas/TileLayer.d.ts +2 -2
- package/renderer/canvas/TileLayer.js +1 -1
- package/renderer/canvas/VectorImageLayer.d.ts +1 -1
- package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorLayer.d.ts +1 -1
- package/renderer/canvas/VectorLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.d.ts +3 -3
- package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.js +1 -1
- package/renderer/webgl/TileLayerBase.d.ts +6 -1
- package/renderer/webgl/TileLayerBase.d.ts.map +1 -1
- package/renderer/webgl/TileLayerBase.js +6 -1
- package/source/OGCVectorTile.d.ts +7 -7
- package/source/OGCVectorTile.d.ts.map +1 -1
- package/source/OGCVectorTile.js +3 -3
- package/source/SentinelHub.d.ts +507 -0
- package/source/SentinelHub.d.ts.map +1 -0
- package/source/SentinelHub.js +616 -0
- package/source/Vector.d.ts +14 -14
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +10 -10
- package/source/VectorTile.d.ts +7 -8
- package/source/VectorTile.d.ts.map +1 -1
- package/source/VectorTile.js +2 -3
- package/util.d.ts.map +1 -1
- package/util.js +1 -1
package/featureloader.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* source.
|
|
15
15
|
*
|
|
16
16
|
* @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").default]
|
|
17
|
-
* @typedef {function(this:(import("./source/Vector").default
|
|
17
|
+
* @typedef {function(this:(import("./source/Vector").default|import("./VectorTile.js").default),
|
|
18
18
|
* import("./extent.js").Extent,
|
|
19
19
|
* number,
|
|
20
20
|
* import("./proj/Projection.js").default,
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
* @api
|
|
35
35
|
*/
|
|
36
36
|
/**
|
|
37
|
-
* @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").
|
|
37
|
+
* @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").FeatureLike]
|
|
38
38
|
* @param {string|FeatureUrlFunction} url Feature URL service.
|
|
39
|
-
* @param {import("./format/Feature.js").default<import(
|
|
39
|
+
* @param {import("./format/Feature.js").default<import('./format/Feature.js').FeatureToFeatureClass<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").
|
|
48
|
+
export function loadFeaturesXhr<FeatureType extends import("./Feature.js").FeatureLike = import("./Feature.js").FeatureLike>(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;
|
|
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
|
-
* @template {import("./Feature.js").FeatureLike} FeatureType
|
|
53
|
+
* @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").FeatureLike]
|
|
54
54
|
* @param {string|FeatureUrlFunction} url Feature URL service.
|
|
55
|
-
* @param {import("./format/Feature.js").default<import(
|
|
55
|
+
* @param {import("./format/Feature.js").default<import('./format/Feature.js').FeatureToFeatureClass<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 = import("./Feature.js").FeatureLike>(url: string | FeatureUrlFunction, format: import("./format/Feature.js").default<import("./format/Feature.js").FeatureToFeatureClass<FeatureType>>): FeatureLoader<FeatureType>;
|
|
60
60
|
/**
|
|
61
61
|
* Setter for the withCredentials configuration for the XHR.
|
|
62
62
|
*
|
|
@@ -80,7 +80,7 @@ export function setWithCredentials(xhrWithCredentials: boolean): void;
|
|
|
80
80
|
* The function is responsible for loading the features and adding them to the
|
|
81
81
|
* source.
|
|
82
82
|
*/
|
|
83
|
-
export type FeatureLoader<FeatureType extends import("./Feature.js").FeatureLike = import("./Feature.js").default<import("./geom.js").Geometry>> = (this: (import("./source/Vector").default
|
|
83
|
+
export type FeatureLoader<FeatureType extends import("./Feature.js").FeatureLike = import("./Feature.js").default<import("./geom.js").Geometry>> = (this: (import("./source/Vector").default | import("./VectorTile.js").default), arg1: import("./extent.js").Extent, arg2: number, arg3: import("./proj/Projection.js").default, arg4: ((arg0: Array<FeatureType>) => void) | undefined, arg5: (() => void) | undefined) => void;
|
|
84
84
|
/**
|
|
85
85
|
* {@link module :ol/source/Vector~VectorSource} sources use a function of this type to
|
|
86
86
|
* get the url to load features from.
|
package/featureloader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureloader.d.ts","sourceRoot":"","sources":["featureloader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;GAWG;AACH,
|
|
1
|
+
{"version":3,"file":"featureloader.d.ts","sourceRoot":"","sources":["featureloader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;GAWG;AACH,kIAVW,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,sHALW,MAAM,GAAC,kBAAkB,+IAsCnC;AAED;;;;;;GAMG;AACH,uDAJW,OAAO,QAMjB;;;;;;;;;;;;;;;;0JAxJ0B,CAAC,OAAO,iBAAiB,EAAE,OAAO,GAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC,QAC/F,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
|
@@ -26,7 +26,7 @@ let withCredentials = false;
|
|
|
26
26
|
* source.
|
|
27
27
|
*
|
|
28
28
|
* @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").default]
|
|
29
|
-
* @typedef {function(this:(import("./source/Vector").default
|
|
29
|
+
* @typedef {function(this:(import("./source/Vector").default|import("./VectorTile.js").default),
|
|
30
30
|
* import("./extent.js").Extent,
|
|
31
31
|
* number,
|
|
32
32
|
* import("./proj/Projection.js").default,
|
|
@@ -48,9 +48,9 @@ let withCredentials = false;
|
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").
|
|
51
|
+
* @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").FeatureLike]
|
|
52
52
|
* @param {string|FeatureUrlFunction} url Feature URL service.
|
|
53
|
-
* @param {import("./format/Feature.js").default<import(
|
|
53
|
+
* @param {import("./format/Feature.js").default<import('./format/Feature.js').FeatureToFeatureClass<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.
|
|
@@ -128,9 +128,9 @@ export function loadFeaturesXhr(
|
|
|
128
128
|
* Create an XHR feature loader for a `url` and `format`. The feature loader
|
|
129
129
|
* loads features (with XHR), parses the features, and adds them to the
|
|
130
130
|
* vector source.
|
|
131
|
-
* @template {import("./Feature.js").FeatureLike} FeatureType
|
|
131
|
+
* @template {import("./Feature.js").FeatureLike} [FeatureType=import("./Feature.js").FeatureLike]
|
|
132
132
|
* @param {string|FeatureUrlFunction} url Feature URL service.
|
|
133
|
-
* @param {import("./format/Feature.js").default<import(
|
|
133
|
+
* @param {import("./format/Feature.js").default<import('./format/Feature.js').FeatureToFeatureClass<FeatureType>>} format Feature format.
|
|
134
134
|
* @return {FeatureLoader<FeatureType>} The feature loader.
|
|
135
135
|
* @api
|
|
136
136
|
*/
|
package/format/EsriJSON.d.ts
CHANGED
|
@@ -62,6 +62,13 @@ declare class EsriJSON extends JSONFeature<typeof Feature> {
|
|
|
62
62
|
* @return {import("../Feature.js").default} Feature.
|
|
63
63
|
*/
|
|
64
64
|
protected readFeatureFromObject(object: any, options?: import("./Feature.js").ReadOptions | undefined, idField?: string | undefined): import("../Feature.js").default;
|
|
65
|
+
/**
|
|
66
|
+
* @param {Object} object Object.
|
|
67
|
+
* @param {import("./Feature.js").ReadOptions} [options] Read options.
|
|
68
|
+
* @protected
|
|
69
|
+
* @return {Array<Feature>} Features.
|
|
70
|
+
*/
|
|
71
|
+
protected readFeaturesFromObject(object: any, options?: import("./Feature.js").ReadOptions | undefined): Array<Feature>;
|
|
65
72
|
/**
|
|
66
73
|
* @param {EsriJSONGeometry} object Object.
|
|
67
74
|
* @param {import("./Feature.js").ReadOptions} [options] Read options.
|
package/format/EsriJSON.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EsriJSON.d.ts","sourceRoot":"","sources":["EsriJSON.js"],"names":[],"mappings":";8BAoBa,OAAO,iBAAiB,EAAE,OAAO;iCACjC,OAAO,iBAAiB,EAAE,UAAU;+BACpC,OAAO,iBAAiB,EAAE,QAAQ;4BAClC,OAAO,iBAAiB,EAAE,KAAK;+BAC/B,OAAO,iBAAiB,EAAE,QAAQ;8BAClC,OAAO,iBAAiB,EAAE,OAAO;iCACjC,OAAO,iBAAiB,EAAE,UAAU;4BACpC,OAAO,iBAAiB,EAAE,KAAK;+BAC/B,OAAO,iBAAiB,EAAE,QAAQ;2CAClC,OAAO,iBAAiB,EAAE,oBAAoB;;;;;WAK7C,MAAM,MAAM,MAAM,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;AAgChD;;;GAGG;AAEH;;;;;GAKG;AACH;IACE;;OAEG;IACH,2CAWC;IANC;;;;OAIG;IACH,sBAAyC;IAG3C;;;;;;OAMG;IACH,sIAFY,OAAO,eAAe,EAAE,OAAO,CAkB1C;
|
|
1
|
+
{"version":3,"file":"EsriJSON.d.ts","sourceRoot":"","sources":["EsriJSON.js"],"names":[],"mappings":";8BAoBa,OAAO,iBAAiB,EAAE,OAAO;iCACjC,OAAO,iBAAiB,EAAE,UAAU;+BACpC,OAAO,iBAAiB,EAAE,QAAQ;4BAClC,OAAO,iBAAiB,EAAE,KAAK;+BAC/B,OAAO,iBAAiB,EAAE,QAAQ;8BAClC,OAAO,iBAAiB,EAAE,OAAO;iCACjC,OAAO,iBAAiB,EAAE,UAAU;4BACpC,OAAO,iBAAiB,EAAE,KAAK;+BAC/B,OAAO,iBAAiB,EAAE,QAAQ;2CAClC,OAAO,iBAAiB,EAAE,oBAAoB;;;;;WAK7C,MAAM,MAAM,MAAM,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;AAgChD;;;GAGG;AAEH;;;;;GAKG;AACH;IACE;;OAEG;IACH,2CAWC;IANC;;;;OAIG;IACH,sBAAyC;IAG3C;;;;;;OAMG;IACH,sIAFY,OAAO,eAAe,EAAE,OAAO,CAkB1C;IAED;;;;;OAKG;IACH,yGAFY,MAAM,OAAO,CAAC,CAqBzB;IAED;;;;;OAKG;IACH,yCALW,gBAAgB,6DAGf,OAAO,qBAAqB,EAAE,OAAO,CAIhD;IAqBD;;;;;;;OAOG;IACH,8BALW,OAAO,qBAAqB,EAAE,OAAO,8DAEpC,gBAAgB,CAK3B;IAuCD;;;;;;;OAOG;IACH,8BALW,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,8DAErC,kBAAkB,CAY7B;CACF;oBA/OmB,eAAe;wBACX,kBAAkB"}
|
package/format/Feature.d.ts
CHANGED
|
@@ -123,7 +123,7 @@ export type FeatureObject = {
|
|
|
123
123
|
/**
|
|
124
124
|
* *
|
|
125
125
|
*/
|
|
126
|
-
export type FeatureToFeatureClass<T extends import("../
|
|
126
|
+
export type FeatureToFeatureClass<T extends Feature<import("../geom.js").Geometry> | RenderFeature> = T extends RenderFeature ? typeof RenderFeature : typeof Feature;
|
|
127
127
|
/**
|
|
128
128
|
* *
|
|
129
129
|
*/
|
|
@@ -191,7 +191,7 @@ import RenderFeature from '../render/Feature.js';
|
|
|
191
191
|
* @property {Object<string, *>} [properties] Properties.
|
|
192
192
|
*/
|
|
193
193
|
/***
|
|
194
|
-
* @template {
|
|
194
|
+
* @template {Feature|RenderFeature} T
|
|
195
195
|
* @typedef {T extends RenderFeature ? typeof RenderFeature : typeof Feature} FeatureToFeatureClass
|
|
196
196
|
*/
|
|
197
197
|
/***
|
|
@@ -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} [
|
|
210
|
+
* @template {import('../Feature.js').FeatureClass} [T=typeof import('../Feature.js').default]
|
|
211
211
|
* @abstract
|
|
212
212
|
* @api
|
|
213
213
|
*/
|
|
214
|
-
declare class FeatureFormat<
|
|
214
|
+
declare class FeatureFormat<T extends import("../Feature.js").FeatureClass = typeof Feature> {
|
|
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 {
|
|
227
|
+
* @type {T}
|
|
228
228
|
*/
|
|
229
|
-
protected featureClass:
|
|
229
|
+
protected featureClass: T;
|
|
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 {
|
|
264
|
+
* @return {import("../Feature.js").FeatureLike|Array<import("../render/Feature.js").default>} Feature.
|
|
265
265
|
*/
|
|
266
|
-
readFeature(source: Document | Element | any | string, options?: ReadOptions | undefined):
|
|
266
|
+
readFeature(source: Document | Element | any | string, options?: ReadOptions | undefined): import("../Feature.js").FeatureLike | Array<import("../render/Feature.js").default>;
|
|
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<
|
|
273
|
+
* @return {Array<import('../Feature.js').FeatureLike|FeatureClassToFeature<T>>} Features.
|
|
274
274
|
*/
|
|
275
|
-
readFeatures(source: Document | Element | ArrayBuffer | any | string, options?: ReadOptions | undefined): Array<FeatureClassToFeature<
|
|
275
|
+
readFeatures(source: Document | Element | ArrayBuffer | any | string, options?: ReadOptions | undefined): Array<import('../Feature.js').FeatureLike | FeatureClassToFeature<T>>;
|
|
276
276
|
/**
|
|
277
277
|
* Read a single geometry from a source.
|
|
278
278
|
*
|
package/format/Feature.d.ts.map
CHANGED
|
@@ -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;;;;;;;;;;;;;wBASnC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;qBAOnC,OAAO,YAAY,EAAE,cAAc;;;;;;wBAInC,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;mBAoBpC,aAAa,GAAG,M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;;OAOG;IACH,wBAJW,OAAO,qBAAqB,EAAE,OAAO,uCAEpC,MAAM,GAAC,WAAW,CAI7B;CACF;oBAzRmB,eAAe"}
|
package/format/Feature.js
CHANGED
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
*/
|
|
96
96
|
|
|
97
97
|
/***
|
|
98
|
-
* @template {
|
|
98
|
+
* @template {Feature|RenderFeature} T
|
|
99
99
|
* @typedef {T extends RenderFeature ? typeof RenderFeature : typeof Feature} FeatureToFeatureClass
|
|
100
100
|
*/
|
|
101
101
|
|
|
@@ -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} [
|
|
116
|
+
* @template {import('../Feature.js').FeatureClass} [T=typeof import('../Feature.js').default]
|
|
117
117
|
* @abstract
|
|
118
118
|
* @api
|
|
119
119
|
*/
|
|
@@ -133,9 +133,9 @@ class FeatureFormat {
|
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* @protected
|
|
136
|
-
* @type {
|
|
136
|
+
* @type {T}
|
|
137
137
|
*/
|
|
138
|
-
this.featureClass = /** @type {
|
|
138
|
+
this.featureClass = /** @type {T} */ (Feature);
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* A list media types supported by the format in descending order of preference.
|
|
@@ -206,7 +206,7 @@ class FeatureFormat {
|
|
|
206
206
|
* @abstract
|
|
207
207
|
* @param {Document|Element|Object|string} source Source.
|
|
208
208
|
* @param {ReadOptions} [options] Read options.
|
|
209
|
-
* @return {
|
|
209
|
+
* @return {import("../Feature.js").FeatureLike|Array<import("../render/Feature.js").default>} Feature.
|
|
210
210
|
*/
|
|
211
211
|
readFeature(source, options) {
|
|
212
212
|
return abstract();
|
|
@@ -218,7 +218,7 @@ class FeatureFormat {
|
|
|
218
218
|
* @abstract
|
|
219
219
|
* @param {Document|Element|ArrayBuffer|Object|string} source Source.
|
|
220
220
|
* @param {ReadOptions} [options] Read options.
|
|
221
|
-
* @return {Array<FeatureClassToFeature<
|
|
221
|
+
* @return {Array<import('../Feature.js').FeatureLike|FeatureClassToFeature<T>>} Features.
|
|
222
222
|
*/
|
|
223
223
|
readFeatures(source, options) {
|
|
224
224
|
return abstract();
|
package/format/GeoJSON.d.ts
CHANGED
|
@@ -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<
|
|
13
|
+
export type Options<FeatureClassToFeature extends import("../Feature.js").FeatureClass> = {
|
|
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?:
|
|
40
|
+
featureClass?: FeatureClassToFeature | 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}
|
|
56
|
+
* @template {import("../Feature.js").FeatureClass} FeatureClassToFeature
|
|
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 {
|
|
67
|
+
* @property {FeatureClassToFeature} [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} [
|
|
77
|
-
* @extends {JSONFeature<
|
|
76
|
+
* @template {import('../Feature.js').FeatureClass} [T=typeof Feature]
|
|
77
|
+
* @extends {JSONFeature<T>}
|
|
78
78
|
* @api
|
|
79
79
|
*/
|
|
80
|
-
declare class GeoJSON<
|
|
80
|
+
declare class GeoJSON<T extends import("../Feature.js").FeatureClass = typeof Feature> extends JSONFeature<T> {
|
|
81
81
|
/**
|
|
82
|
-
* @param {Options<
|
|
82
|
+
* @param {Options<T>} [options] Options.
|
|
83
83
|
*/
|
|
84
|
-
constructor(options?: Options<
|
|
84
|
+
constructor(options?: Options<T> | undefined);
|
|
85
85
|
/**
|
|
86
86
|
* Name of the geometry attribute for features.
|
|
87
87
|
* @type {string|undefined}
|
package/format/GeoJSON.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoJSON.d.ts","sourceRoot":"","sources":["GeoJSON.js"],"names":[],"mappings":";4BAqBa,OAAO,SAAS,EAAE,OAAO;6BACzB,OAAO,SAAS,EAAE,OAAO;uCACzB,OAAO,S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,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;oBAnSmB,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}
|
|
36
|
+
* @template {import("../Feature.js").FeatureClass} FeatureClassToFeature
|
|
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 {
|
|
47
|
+
* @property {FeatureClassToFeature} [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} [
|
|
58
|
-
* @extends {JSONFeature<
|
|
57
|
+
* @template {import('../Feature.js').FeatureClass} [T=typeof Feature]
|
|
58
|
+
* @extends {JSONFeature<T>}
|
|
59
59
|
* @api
|
|
60
60
|
*/
|
|
61
61
|
class GeoJSON extends JSONFeature {
|
|
62
62
|
/**
|
|
63
|
-
* @param {Options<
|
|
63
|
+
* @param {Options<T>} [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 {
|
|
112
|
+
* @return {Feature|RenderFeature|Array<RenderFeature>}.default} Feature.
|
|
113
113
|
*/
|
|
114
114
|
readFeatureFromObject(object, options) {
|
|
115
115
|
/**
|
|
@@ -128,15 +128,13 @@ class GeoJSON extends JSONFeature {
|
|
|
128
128
|
|
|
129
129
|
const geometry = readGeometryInternal(geoJSONFeature['geometry'], options);
|
|
130
130
|
if (this.featureClass === RenderFeature) {
|
|
131
|
-
return
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
options,
|
|
139
|
-
)
|
|
131
|
+
return createRenderFeature(
|
|
132
|
+
{
|
|
133
|
+
geometry,
|
|
134
|
+
id: geoJSONFeature['id'],
|
|
135
|
+
properties: geoJSONFeature['properties'],
|
|
136
|
+
},
|
|
137
|
+
options,
|
|
140
138
|
);
|
|
141
139
|
}
|
|
142
140
|
|
|
@@ -155,19 +153,18 @@ class GeoJSON extends JSONFeature {
|
|
|
155
153
|
if (geoJSONFeature['properties']) {
|
|
156
154
|
feature.setProperties(geoJSONFeature['properties'], true);
|
|
157
155
|
}
|
|
158
|
-
return
|
|
159
|
-
feature
|
|
160
|
-
);
|
|
156
|
+
return feature;
|
|
161
157
|
}
|
|
162
158
|
|
|
163
159
|
/**
|
|
164
160
|
* @param {Object} object Object.
|
|
165
161
|
* @param {import("./Feature.js").ReadOptions} [options] Read options.
|
|
166
162
|
* @protected
|
|
167
|
-
* @return {Array<
|
|
163
|
+
* @return {Array<Feature|RenderFeature>} Features.
|
|
168
164
|
*/
|
|
169
165
|
readFeaturesFromObject(object, options) {
|
|
170
166
|
const geoJSONObject = /** @type {GeoJSONObject} */ (object);
|
|
167
|
+
/** @type {Array<Feature|RenderFeature|Array<RenderFeature>>} */
|
|
171
168
|
let features = null;
|
|
172
169
|
if (geoJSONObject['type'] === 'FeatureCollection') {
|
|
173
170
|
const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (
|
|
@@ -188,9 +185,7 @@ class GeoJSON extends JSONFeature {
|
|
|
188
185
|
} else {
|
|
189
186
|
features = [this.readFeatureFromObject(object, options)];
|
|
190
187
|
}
|
|
191
|
-
return
|
|
192
|
-
features.flat()
|
|
193
|
-
);
|
|
188
|
+
return features.flat();
|
|
194
189
|
}
|
|
195
190
|
|
|
196
191
|
/**
|
package/format/JSONFeature.d.ts
CHANGED
|
@@ -5,27 +5,47 @@ export default JSONFeature;
|
|
|
5
5
|
* instantiated in apps.
|
|
6
6
|
* Base class for JSON feature formats.
|
|
7
7
|
*
|
|
8
|
-
* @template {import('../Feature.js').FeatureClass} [
|
|
9
|
-
* @extends {FeatureFormat<
|
|
8
|
+
* @template {import('../Feature.js').FeatureClass} [T=typeof import('../Feature.js').default]
|
|
9
|
+
* @extends {FeatureFormat<T>}
|
|
10
10
|
* @abstract
|
|
11
11
|
*/
|
|
12
|
-
declare class JSONFeature<
|
|
12
|
+
declare class JSONFeature<T extends import("../Feature.js").FeatureClass = typeof import("../Feature.js").default> extends FeatureFormat<T> {
|
|
13
|
+
/**
|
|
14
|
+
* Read a feature. Only works for a single feature. Use `readFeatures` to
|
|
15
|
+
* read a feature collection.
|
|
16
|
+
*
|
|
17
|
+
* @param {ArrayBuffer|Document|Element|Object|string} source Source.
|
|
18
|
+
* @param {import("./Feature.js").ReadOptions} [options] Read options.
|
|
19
|
+
* @return {import('./Feature.js').FeatureClassToFeature<T>} Feature.
|
|
20
|
+
* @api
|
|
21
|
+
*/
|
|
22
|
+
readFeature(source: ArrayBuffer | Document | Element | any | string, options?: import("./Feature.js").ReadOptions | undefined): import('./Feature.js').FeatureClassToFeature<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Read all features. Works with both a single feature and a feature
|
|
25
|
+
* collection.
|
|
26
|
+
*
|
|
27
|
+
* @param {ArrayBuffer|Document|Element|Object|string} source Source.
|
|
28
|
+
* @param {import("./Feature.js").ReadOptions} [options] Read options.
|
|
29
|
+
* @return {Array<import('./Feature.js').FeatureClassToFeature<T>>} Features.
|
|
30
|
+
* @api
|
|
31
|
+
*/
|
|
32
|
+
readFeatures(source: ArrayBuffer | Document | Element | any | string, options?: import("./Feature.js").ReadOptions | undefined): Array<import('./Feature.js').FeatureClassToFeature<T>>;
|
|
13
33
|
/**
|
|
14
34
|
* @abstract
|
|
15
35
|
* @param {Object} object Object.
|
|
16
36
|
* @param {import("./Feature.js").ReadOptions} [options] Read options.
|
|
17
37
|
* @protected
|
|
18
|
-
* @return {import(
|
|
38
|
+
* @return {import("../Feature.js").default|import("../render/Feature.js").default|Array<import("../render/Feature.js").default>} Feature.
|
|
19
39
|
*/
|
|
20
|
-
protected readFeatureFromObject(object: any, options?: import("./Feature.js").ReadOptions | undefined): import(
|
|
40
|
+
protected readFeatureFromObject(object: any, options?: import("./Feature.js").ReadOptions | undefined): import("../Feature.js").default | import("../render/Feature.js").default | Array<import("../render/Feature.js").default>;
|
|
21
41
|
/**
|
|
22
42
|
* @abstract
|
|
23
43
|
* @param {Object} object Object.
|
|
24
44
|
* @param {import("./Feature.js").ReadOptions} [options] Read options.
|
|
25
45
|
* @protected
|
|
26
|
-
* @return {Array<import(
|
|
46
|
+
* @return {Array<import("../Feature.js").default|import("../render/Feature.js").default>} Features.
|
|
27
47
|
*/
|
|
28
|
-
protected readFeaturesFromObject(object: any, options?: import("./Feature.js").ReadOptions | undefined): Array<import(
|
|
48
|
+
protected readFeaturesFromObject(object: any, options?: import("./Feature.js").ReadOptions | undefined): Array<import("../Feature.js").default | import("../render/Feature.js").default>;
|
|
29
49
|
/**
|
|
30
50
|
* @abstract
|
|
31
51
|
* @param {Object} object Object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSONFeature.d.ts","sourceRoot":"","sources":["JSONFeature.js"],"names":[],"mappings":";AAMA;;;;;;;;;GASG;AACH;
|
|
1
|
+
{"version":3,"file":"JSONFeature.d.ts","sourceRoot":"","sources":["JSONFeature.js"],"names":[],"mappings":";AAMA;;;;;;;;;GASG;AACH;IAYE;;;;;;;;OAQG;IACH,oBALW,WAAW,GAAC,QAAQ,GAAC,OAAO,SAAQ,MAAM,6DAEzC,OAAO,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAU1D;IAED;;;;;;;;OAQG;IACH,qBALW,WAAW,GAAC,QAAQ,GAAC,OAAO,SAAQ,MAAM,6DAEzC,MAAM,OAAO,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAUjE;IAED;;;;;;OAMG;IACH,wGAFY,OAAO,eAAe,EAAE,OAAO,GAAC,OAAO,sBAAsB,EAAE,OAAO,GAAC,MAAM,OAAO,sBAAsB,EAAE,OAAO,CAAC,CAI/H;IAED;;;;;;OAMG;IACH,yGAFY,MAAM,OAAO,eAAe,EAAE,OAAO,GAAC,OAAO,sBAAsB,EAAE,OAAO,CAAC,CAIxF;IAiBD;;;;;;OAMG;IACH,yGAFY,OAAO,qBAAqB,EAAE,OAAO,CAIhD;IAED;;;;;;OAMG;IACH,uBAJW,WAAW,GAAC,QAAQ,GAAC,OAAO,SAAQ,MAAM,GACzC,OAAO,uBAAuB,EAAE,OAAO,CAKlD;IAED;;;;;OAKG;IACH,iDAFY,OAAO,uBAAuB,EAAE,OAAO,CAIlD;IAED;;;;;;;OAOG;IACH,sBALW,OAAO,eAAe,EAAE,OAAO,8DAE9B,MAAM,CAKjB;IAED;;;;;OAKG;IACH,4BAJW,OAAO,eAAe,EAAE,OAAO,kEAMzC;IAED;;;;;;;OAOG;IACH,wBALW,MAAM,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;0BAnMyB,cAAc"}
|
package/format/JSONFeature.js
CHANGED
|
@@ -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} [
|
|
14
|
-
* @extends {FeatureFormat<
|
|
13
|
+
* @template {import('../Feature.js').FeatureClass} [T=typeof import('../Feature.js').default]
|
|
14
|
+
* @extends {FeatureFormat<T>}
|
|
15
15
|
* @abstract
|
|
16
16
|
*/
|
|
17
17
|
class JSONFeature extends FeatureFormat {
|
|
@@ -32,13 +32,15 @@ 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<
|
|
35
|
+
* @return {import('./Feature.js').FeatureClassToFeature<T>} Feature.
|
|
36
36
|
* @api
|
|
37
37
|
*/
|
|
38
38
|
readFeature(source, options) {
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
return /** @type {import('./Feature.js').FeatureClassToFeature<T>} */ (
|
|
40
|
+
this.readFeatureFromObject(
|
|
41
|
+
getObject(source),
|
|
42
|
+
this.getReadOptions(source, options),
|
|
43
|
+
)
|
|
42
44
|
);
|
|
43
45
|
}
|
|
44
46
|
|
|
@@ -48,11 +50,11 @@ class JSONFeature extends FeatureFormat {
|
|
|
48
50
|
*
|
|
49
51
|
* @param {ArrayBuffer|Document|Element|Object|string} source Source.
|
|
50
52
|
* @param {import("./Feature.js").ReadOptions} [options] Read options.
|
|
51
|
-
* @return {Array<import('./Feature.js').FeatureClassToFeature<
|
|
53
|
+
* @return {Array<import('./Feature.js').FeatureClassToFeature<T>>} Features.
|
|
52
54
|
* @api
|
|
53
55
|
*/
|
|
54
56
|
readFeatures(source, options) {
|
|
55
|
-
return /** @type {Array<import('./Feature.js').FeatureClassToFeature<
|
|
57
|
+
return /** @type {Array<import('./Feature.js').FeatureClassToFeature<T>>} */ (
|
|
56
58
|
this.readFeaturesFromObject(
|
|
57
59
|
getObject(source),
|
|
58
60
|
this.getReadOptions(source, options),
|
|
@@ -65,7 +67,7 @@ class JSONFeature extends FeatureFormat {
|
|
|
65
67
|
* @param {Object} object Object.
|
|
66
68
|
* @param {import("./Feature.js").ReadOptions} [options] Read options.
|
|
67
69
|
* @protected
|
|
68
|
-
* @return {import(
|
|
70
|
+
* @return {import("../Feature.js").default|import("../render/Feature.js").default|Array<import("../render/Feature.js").default>} Feature.
|
|
69
71
|
*/
|
|
70
72
|
readFeatureFromObject(object, options) {
|
|
71
73
|
return abstract();
|
|
@@ -76,7 +78,7 @@ class JSONFeature extends FeatureFormat {
|
|
|
76
78
|
* @param {Object} object Object.
|
|
77
79
|
* @param {import("./Feature.js").ReadOptions} [options] Read options.
|
|
78
80
|
* @protected
|
|
79
|
-
* @return {Array<import(
|
|
81
|
+
* @return {Array<import("../Feature.js").default|import("../render/Feature.js").default>} Features.
|
|
80
82
|
*/
|
|
81
83
|
readFeaturesFromObject(object, options) {
|
|
82
84
|
return abstract();
|
package/format/MVT.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export default MVT;
|
|
2
|
-
export type Options<
|
|
2
|
+
export type Options<FeatureClassToFeature extends import("../Feature.js").FeatureClass> = {
|
|
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?:
|
|
9
|
+
featureClass?: FeatureClassToFeature | 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}
|
|
29
|
+
* @template {import("../Feature.js").FeatureClass} FeatureClassToFeature
|
|
30
30
|
* @typedef {Object} Options
|
|
31
|
-
* @property {
|
|
31
|
+
* @property {FeatureClassToFeature} [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} [
|
|
46
|
-
* @extends {FeatureFormat<
|
|
45
|
+
* @template {import('../Feature.js').FeatureClass} [T=typeof import("../render/Feature.js").default]
|
|
46
|
+
* @extends {FeatureFormat<T>}
|
|
47
47
|
* @api
|
|
48
48
|
*/
|
|
49
|
-
declare class MVT<
|
|
49
|
+
declare class MVT<T extends import("../Feature.js").FeatureClass = typeof RenderFeature> extends FeatureFormat<T> {
|
|
50
50
|
/**
|
|
51
|
-
* @param {Options<
|
|
51
|
+
* @param {Options<T>} [options] Options.
|
|
52
52
|
*/
|
|
53
|
-
constructor(options?: Options<
|
|
53
|
+
constructor(options?: Options<T> | 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(
|
|
89
|
+
* @return {import("../Feature.js").FeatureLike|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<
|
|
97
|
+
* @return {Array<import('./Feature.js').FeatureClassToFeature<T>>} Features.
|
|
98
98
|
* @api
|
|
99
99
|
*/
|
|
100
|
-
readFeatures(source: ArrayBuffer, options?: import("./Feature.js").ReadOptions | undefined): Array<import('./Feature.js').FeatureClassToFeature<
|
|
100
|
+
readFeatures(source: ArrayBuffer, options?: import("./Feature.js").ReadOptions | undefined): Array<import('./Feature.js').FeatureClassToFeature<T>>;
|
|
101
101
|
/**
|
|
102
102
|
* Read the projection from the source.
|
|
103
103
|
*
|
package/format/MVT.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MVT.d.ts","sourceRoot":"","sources":["MVT.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"MVT.d.ts","sourceRoot":"","sources":["MVT.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,8CA6CC;IA5BC;;;OAGG;IACH,sBAAyC;IAEzC;;;OAGG;IACH,mBAAiE;IAEjE;;;OAGG;IACH,gBAAqD;IAErD;;;OAGG;IACH,oBAAqC;IAQvC;;;;;;;;OAQG;IACH,yBAoDC;IAED;;;;;;OAMG;IACH,uBAuEC;IASD;;;;;;;OAOG;IACH,qBALW,WAAW,6DAEV,MAAM,OAAO,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAkCjE;IAED;;;;;;OAMG;IACH,uBAJW,QAAQ,GAAC,OAAO,SAAQ,MAAM,GAC7B,OAAO,uBAAuB,EAAE,OAAO,CAKlD;IAED;;;;OAIG;IACH,kBAHW,MAAM,MAAM,CAAC,QAKvB;CACF;0BA/RyB,sBAAsB;0BATU,cAAc"}
|