ol 9.2.5-dev.1717010067861 → 9.2.5-dev.1717260235384
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 +19 -16
- package/VectorTile.d.ts.map +1 -1
- package/VectorTile.js +12 -9
- 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 +0 -7
- 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 +22 -17
- package/format/JSONFeature.d.ts +7 -27
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/JSONFeature.js +10 -12
- package/format/MVT.d.ts +12 -12
- package/format/MVT.d.ts.map +1 -1
- package/format/MVT.js +16 -18
- package/format/TextFeature.d.ts +0 -9
- package/format/TextFeature.d.ts.map +1 -1
- package/format/TopoJSON.d.ts +0 -7
- package/format/TopoJSON.d.ts.map +1 -1
- package/format/XMLFeature.d.ts +0 -9
- 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 +1 -2
- package/interaction/Select.d.ts.map +1 -1
- package/layer/BaseVector.d.ts +7 -6
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/BaseVector.js +6 -4
- package/layer/Graticule.d.ts +3 -2
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Graticule.js +1 -1
- package/layer/Heatmap.d.ts +8 -7
- package/layer/Heatmap.d.ts.map +1 -1
- package/layer/Heatmap.js +7 -5
- package/layer/Tile.d.ts +2 -2
- package/layer/Tile.js +1 -1
- package/layer/Vector.d.ts +19 -9
- package/layer/Vector.d.ts.map +1 -1
- package/layer/Vector.js +12 -5
- package/layer/VectorImage.d.ts +9 -7
- package/layer/VectorImage.d.ts.map +1 -1
- package/layer/VectorImage.js +6 -4
- package/layer/VectorTile.d.ts +19 -9
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/VectorTile.js +16 -9
- 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/source/OGCVectorTile.d.ts +7 -7
- package/source/OGCVectorTile.d.ts.map +1 -1
- package/source/OGCVectorTile.js +3 -3
- 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 +8 -7
- package/source/VectorTile.d.ts.map +1 -1
- package/source/VectorTile.js +3 -2
- package/util.js +1 -1
package/layer/VectorImage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default VectorImageLayer;
|
|
2
|
-
export type Options<
|
|
2
|
+
export type Options<FeatureType extends import("../Feature.js").FeatureLike = import("../Feature.js").default<import("../geom.js").Geometry>, VectorSourceType extends import("../source/Vector.js").default<FeatureType> = import("../source/Vector.js").default<FeatureType>> = {
|
|
3
3
|
/**
|
|
4
4
|
* A CSS class name to set to the layer element.
|
|
5
5
|
*/
|
|
@@ -99,7 +99,8 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
99
99
|
} | undefined;
|
|
100
100
|
};
|
|
101
101
|
/**
|
|
102
|
-
* @template {import("../
|
|
102
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../Feature.js").default]
|
|
103
|
+
* @template {import("../source/Vector.js").default<FeatureType>} [VectorSourceType=import("../source/Vector.js").default<FeatureType>]
|
|
103
104
|
* @typedef {Object} Options
|
|
104
105
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
105
106
|
* @property {number} [opacity=1] Opacity (0, 1).
|
|
@@ -154,15 +155,16 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
154
155
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
155
156
|
* options means that `title` is observable, and has get/set accessors.
|
|
156
157
|
*
|
|
157
|
-
* @template {import("../Feature.js").default} FeatureType
|
|
158
|
-
* @
|
|
158
|
+
* @template {import("../Feature.js").default} [FeatureType=import("../Feature.js").default]
|
|
159
|
+
* @template {import("../source/Vector.js").default<FeatureType>} [VectorSourceType=import("../source/Vector.js").default<FeatureType>]
|
|
160
|
+
* @extends {BaseVectorLayer<FeatureType, VectorSourceType, CanvasVectorImageLayerRenderer>}
|
|
159
161
|
* @api
|
|
160
162
|
*/
|
|
161
|
-
declare class VectorImageLayer<FeatureType extends import("../Feature.js").default<import("../geom.js").Geometry
|
|
163
|
+
declare class VectorImageLayer<FeatureType extends import("../Feature.js").default<import("../geom.js").Geometry> = import("../Feature.js").default<import("../geom.js").Geometry>, VectorSourceType extends import("../source/Vector.js").default<FeatureType> = import("../source/Vector.js").default<FeatureType>> extends BaseVectorLayer<FeatureType, VectorSourceType, CanvasVectorImageLayerRenderer> {
|
|
162
164
|
/**
|
|
163
|
-
* @param {Options<
|
|
165
|
+
* @param {Options<FeatureType, VectorSourceType>} [options] Options.
|
|
164
166
|
*/
|
|
165
|
-
constructor(options?: Options<
|
|
167
|
+
constructor(options?: Options<FeatureType, VectorSourceType> | undefined);
|
|
166
168
|
/**
|
|
167
169
|
* @type {number}
|
|
168
170
|
* @private
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorImage.d.ts","sourceRoot":"","sources":["VectorImage.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA
|
|
1
|
+
{"version":3,"file":"VectorImage.d.ts","sourceRoot":"","sources":["VectorImage.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH;;;;;;;;;;;;;;;GAeG;AACH;IACE;;OAEG;IACH,0EAaC;IANC;;;OAGG;IACH,oBAC2D;IAG7D;;OAEG;IACH,iBAFY,MAAM,CAIjB;CAKF;2CA9F0C,wCAAwC;4BADvD,iBAAiB"}
|
package/layer/VectorImage.js
CHANGED
|
@@ -5,7 +5,8 @@ import BaseVectorLayer from './BaseVector.js';
|
|
|
5
5
|
import CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @template {import("../
|
|
8
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../Feature.js").default]
|
|
9
|
+
* @template {import("../source/Vector.js").default<FeatureType>} [VectorSourceType=import("../source/Vector.js").default<FeatureType>]
|
|
9
10
|
* @typedef {Object} Options
|
|
10
11
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
11
12
|
* @property {number} [opacity=1] Opacity (0, 1).
|
|
@@ -61,13 +62,14 @@ import CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.
|
|
|
61
62
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
62
63
|
* options means that `title` is observable, and has get/set accessors.
|
|
63
64
|
*
|
|
64
|
-
* @template {import("../Feature.js").default} FeatureType
|
|
65
|
-
* @
|
|
65
|
+
* @template {import("../Feature.js").default} [FeatureType=import("../Feature.js").default]
|
|
66
|
+
* @template {import("../source/Vector.js").default<FeatureType>} [VectorSourceType=import("../source/Vector.js").default<FeatureType>]
|
|
67
|
+
* @extends {BaseVectorLayer<FeatureType, VectorSourceType, CanvasVectorImageLayerRenderer>}
|
|
66
68
|
* @api
|
|
67
69
|
*/
|
|
68
70
|
class VectorImageLayer extends BaseVectorLayer {
|
|
69
71
|
/**
|
|
70
|
-
* @param {Options<
|
|
72
|
+
* @param {Options<FeatureType, VectorSourceType>} [options] Options.
|
|
71
73
|
*/
|
|
72
74
|
constructor(options) {
|
|
73
75
|
options = options ? options : {};
|
package/layer/VectorTile.d.ts
CHANGED
|
@@ -4,7 +4,11 @@ export default VectorTileLayer;
|
|
|
4
4
|
*/
|
|
5
5
|
export type VectorTileLayerOnSignature<Return> = import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> & import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes | import("./Layer.js").LayerEventType | 'change:preload' | 'change:useInterimTilesOnError', import("../Object").ObjectEvent, Return> & import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> & import("../Observable").CombinedOnSignature<import("../Observable").EventTypes | import("./Base").BaseLayerObjectEventTypes | import("./Layer.js").LayerEventType | 'change:preload' | 'change:useInterimTilesOnError' | import("../render/EventType").LayerRenderEventTypes, Return>;
|
|
6
6
|
export type VectorTileRenderType = 'hybrid' | 'vector';
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* *
|
|
9
|
+
*/
|
|
10
|
+
export type ExtractedFeatureType<T> = T extends import("../source/VectorTile.js").default<infer U extends import("../Feature.js").FeatureLike> ? U : never;
|
|
11
|
+
export type Options<VectorTileSourceType extends import("../source/VectorTile.js").default<FeatureType> = import("../source/VectorTile.js").default<any>, FeatureType extends import("../Feature.js").FeatureLike = ExtractedFeatureType<VectorTileSourceType>> = {
|
|
8
12
|
/**
|
|
9
13
|
* A CSS class name to set to the layer element.
|
|
10
14
|
*/
|
|
@@ -77,7 +81,7 @@ export type Options<FeatureType extends import("../Feature").FeatureLike> = {
|
|
|
77
81
|
/**
|
|
78
82
|
* Source.
|
|
79
83
|
*/
|
|
80
|
-
source?:
|
|
84
|
+
source?: VectorTileSourceType | undefined;
|
|
81
85
|
/**
|
|
82
86
|
* Sets the layer as overlay on a map. The map will not manage
|
|
83
87
|
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
@@ -144,8 +148,13 @@ export type Options<FeatureType extends import("../Feature").FeatureLike> = {
|
|
|
144
148
|
/**
|
|
145
149
|
* @typedef {'hybrid' | 'vector'} VectorTileRenderType
|
|
146
150
|
*/
|
|
151
|
+
/***
|
|
152
|
+
* @template T
|
|
153
|
+
* @typedef {T extends import("../source/VectorTile.js").default<infer U extends import("../Feature.js").FeatureLike> ? U : never} ExtractedFeatureType
|
|
154
|
+
*/
|
|
147
155
|
/**
|
|
148
|
-
* @template {import(
|
|
156
|
+
* @template {import("../source/VectorTile.js").default<FeatureType>} [VectorTileSourceType=import("../source/VectorTile.js").default<*>]
|
|
157
|
+
* @template {import("../Feature").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]
|
|
149
158
|
* @typedef {Object} Options
|
|
150
159
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
151
160
|
* @property {number} [opacity=1] Opacity (0, 1).
|
|
@@ -180,7 +189,7 @@ export type Options<FeatureType extends import("../Feature").FeatureLike> = {
|
|
|
180
189
|
* this mode for improved performance and visual epxerience on vector tile layers with not too many
|
|
181
190
|
* rendered features (e.g. for highlighting a subset of features of another layer with the same
|
|
182
191
|
* source).
|
|
183
|
-
* @property {
|
|
192
|
+
* @property {VectorTileSourceType} [source] Source.
|
|
184
193
|
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
|
|
185
194
|
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
186
195
|
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
|
@@ -213,15 +222,16 @@ export type Options<FeatureType extends import("../Feature").FeatureLike> = {
|
|
|
213
222
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
214
223
|
* options means that `title` is observable, and has get/set accessors.
|
|
215
224
|
*
|
|
216
|
-
* @template {import(
|
|
217
|
-
* @
|
|
225
|
+
* @template {import("../source/VectorTile.js").default<FeatureType>} [VectorTileSourceType=import("../source/VectorTile.js").default<*>]
|
|
226
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]
|
|
227
|
+
* @extends {BaseVectorLayer<FeatureType, VectorTileSourceType, CanvasVectorTileLayerRenderer>}
|
|
218
228
|
* @api
|
|
219
229
|
*/
|
|
220
|
-
declare class VectorTileLayer<
|
|
230
|
+
declare class VectorTileLayer<VectorTileSourceType extends import("../source/VectorTile.js").default<FeatureType> = import("../source/VectorTile.js").default<any>, FeatureType extends import("../Feature.js").FeatureLike = ExtractedFeatureType<VectorTileSourceType>> extends BaseVectorLayer<FeatureType, VectorTileSourceType, CanvasVectorTileLayerRenderer> {
|
|
221
231
|
/**
|
|
222
|
-
* @param {Options<FeatureType>} [options] Options.
|
|
232
|
+
* @param {Options<VectorTileSourceType, FeatureType>} [options] Options.
|
|
223
233
|
*/
|
|
224
|
-
constructor(options?: Options<FeatureType> | undefined);
|
|
234
|
+
constructor(options?: Options<VectorTileSourceType, FeatureType> | undefined);
|
|
225
235
|
/***
|
|
226
236
|
* @type {VectorTileLayerOnSignature<import("../events").EventsKey>}
|
|
227
237
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorTile.d.ts","sourceRoot":"","sources":["VectorTile.js"],"names":[],"mappings":";;;;iDAUa,OAAO,eAAe,EAAE,WAAW,CAAC,O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,GAAC,OAAO,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,CAAC;mCAI3I,QAAQ,GAAG,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAXhC;;;;;;;;GAQG;AAEH;;GAEG;AAEH;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH;;;;;;;;;;;GAWG;AACH;IACE;;OAEG;IACH,8EAwDC;IA/CC;;OAEG;IACH,IAFU,2BAA2B,OAAO,WAAW,EAAE,SAAS,CAAC,CAE5D;IAEP;;OAEG;IACH,MAFU,2BAA2B,OAAO,WAAW,EAAE,SAAS,CAAC,CAE1D;IAET;;OAEG;IACH,IAFU,2BAA2B,IAAI,CAAC,CAEnC;IAQP;;;OAGG;IACH,oBAA6B;IAgD/B;;OAEG;IACH,iBAFY,oBAAoB,CAI/B;IAED;;;;;OAKG;IACH,cAJY,MAAM,CAMjB;IAED;;;;;OAKG;IACH,6BAJY,OAAO,CAQlB;IAED;;;;;OAKG;IACH,oBAJW,MAAM,QAMhB;IAED;;;;;OAKG;IACH,kDAJW,OAAO,QAMjB;CACF;0CAzOyC,uCAAuC;4BADrD,iBAAiB"}
|
package/layer/VectorTile.js
CHANGED
|
@@ -20,8 +20,14 @@ import {assert} from '../asserts.js';
|
|
|
20
20
|
* @typedef {'hybrid' | 'vector'} VectorTileRenderType
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
+
/***
|
|
24
|
+
* @template T
|
|
25
|
+
* @typedef {T extends import("../source/VectorTile.js").default<infer U extends import("../Feature.js").FeatureLike> ? U : never} ExtractedFeatureType
|
|
26
|
+
*/
|
|
27
|
+
|
|
23
28
|
/**
|
|
24
|
-
* @template {import(
|
|
29
|
+
* @template {import("../source/VectorTile.js").default<FeatureType>} [VectorTileSourceType=import("../source/VectorTile.js").default<*>]
|
|
30
|
+
* @template {import("../Feature").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]
|
|
25
31
|
* @typedef {Object} Options
|
|
26
32
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
27
33
|
* @property {number} [opacity=1] Opacity (0, 1).
|
|
@@ -56,7 +62,7 @@ import {assert} from '../asserts.js';
|
|
|
56
62
|
* this mode for improved performance and visual epxerience on vector tile layers with not too many
|
|
57
63
|
* rendered features (e.g. for highlighting a subset of features of another layer with the same
|
|
58
64
|
* source).
|
|
59
|
-
* @property {
|
|
65
|
+
* @property {VectorTileSourceType} [source] Source.
|
|
60
66
|
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
|
|
61
67
|
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
|
62
68
|
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
|
@@ -90,20 +96,19 @@ import {assert} from '../asserts.js';
|
|
|
90
96
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
91
97
|
* options means that `title` is observable, and has get/set accessors.
|
|
92
98
|
*
|
|
93
|
-
* @template {import(
|
|
94
|
-
* @
|
|
99
|
+
* @template {import("../source/VectorTile.js").default<FeatureType>} [VectorTileSourceType=import("../source/VectorTile.js").default<*>]
|
|
100
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]
|
|
101
|
+
* @extends {BaseVectorLayer<FeatureType, VectorTileSourceType, CanvasVectorTileLayerRenderer>}
|
|
95
102
|
* @api
|
|
96
103
|
*/
|
|
97
104
|
class VectorTileLayer extends BaseVectorLayer {
|
|
98
105
|
/**
|
|
99
|
-
* @param {Options<FeatureType>} [options] Options.
|
|
106
|
+
* @param {Options<VectorTileSourceType, FeatureType>} [options] Options.
|
|
100
107
|
*/
|
|
101
108
|
constructor(options) {
|
|
102
109
|
options = options ? options : {};
|
|
103
110
|
|
|
104
|
-
const baseOptions =
|
|
105
|
-
Object.assign({}, options)
|
|
106
|
-
);
|
|
111
|
+
const baseOptions = Object.assign({}, options);
|
|
107
112
|
delete baseOptions.preload;
|
|
108
113
|
delete baseOptions.useInterimTilesOnError;
|
|
109
114
|
|
|
@@ -159,7 +164,9 @@ class VectorTileLayer extends BaseVectorLayer {
|
|
|
159
164
|
}
|
|
160
165
|
|
|
161
166
|
createRenderer() {
|
|
162
|
-
return new CanvasVectorTileLayerRenderer(
|
|
167
|
+
return new CanvasVectorTileLayerRenderer(
|
|
168
|
+
/** @type {VectorTileLayer} */ (this),
|
|
169
|
+
);
|
|
163
170
|
}
|
|
164
171
|
|
|
165
172
|
/**
|
package/package.json
CHANGED
|
@@ -3,10 +3,10 @@ export default CanvasTileLayerRenderer;
|
|
|
3
3
|
* @classdesc
|
|
4
4
|
* Canvas renderer for tile layers.
|
|
5
5
|
* @api
|
|
6
|
-
* @template {import("../../layer/Tile.js").default
|
|
6
|
+
* @template {import("../../layer/Tile.js").default|import("../../layer/VectorTile.js").default} [LayerType=import("../../layer/Tile.js").default<import("../../source/Tile.js").default>|import("../../layer/VectorTile.js").default]
|
|
7
7
|
* @extends {CanvasLayerRenderer<LayerType>}
|
|
8
8
|
*/
|
|
9
|
-
declare class CanvasTileLayerRenderer<LayerType extends import("../../layer/Tile.js").default<import("../../source/Tile.js").default> | import("../../layer/VectorTile.js").default<any> = import("../../layer/Tile.js").default<import("../../source/Tile.js").default> | import("../../layer/VectorTile.js").default<any>> extends CanvasLayerRenderer<LayerType> {
|
|
9
|
+
declare class CanvasTileLayerRenderer<LayerType extends import("../../layer/Tile.js").default<import("../../source/Tile.js").default> | import("../../layer/VectorTile.js").default<import("../../source.js").VectorTile<any>, any> = import("../../layer/Tile.js").default<import("../../source/Tile.js").default> | import("../../layer/VectorTile.js").default<import("../../source.js").VectorTile<any>, any>> extends CanvasLayerRenderer<LayerType> {
|
|
10
10
|
/**
|
|
11
11
|
* @param {LayerType} tileLayer Tile layer.
|
|
12
12
|
*/
|
|
@@ -28,7 +28,7 @@ import {toSize} from '../../size.js';
|
|
|
28
28
|
* @classdesc
|
|
29
29
|
* Canvas renderer for tile layers.
|
|
30
30
|
* @api
|
|
31
|
-
* @template {import("../../layer/Tile.js").default
|
|
31
|
+
* @template {import("../../layer/Tile.js").default|import("../../layer/VectorTile.js").default} [LayerType=import("../../layer/Tile.js").default<import("../../source/Tile.js").default>|import("../../layer/VectorTile.js").default]
|
|
32
32
|
* @extends {CanvasLayerRenderer<LayerType>}
|
|
33
33
|
*/
|
|
34
34
|
class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
@@ -8,7 +8,7 @@ declare class CanvasVectorImageLayerRenderer extends CanvasImageLayerRenderer {
|
|
|
8
8
|
/**
|
|
9
9
|
* @param {import("../../layer/VectorImage.js").default} layer Vector image layer.
|
|
10
10
|
*/
|
|
11
|
-
constructor(layer: import("../../layer/VectorImage.js").default
|
|
11
|
+
constructor(layer: import("../../layer/VectorImage.js").default);
|
|
12
12
|
/**
|
|
13
13
|
* @private
|
|
14
14
|
* @type {import("./VectorLayer.js").default}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorImageLayer.d.ts","sourceRoot":"","sources":["VectorImageLayer.js"],"names":[],"mappings":";AAcA;;;;GAIG;AACH;IACE;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"VectorImageLayer.d.ts","sourceRoot":"","sources":["VectorImageLayer.js"],"names":[],"mappings":";AAcA;;;;GAIG;AACH;IACE;;OAEG;IACH,mBAFW,OAAO,4BAA4B,EAAE,OAAO,EA4BtD;IAvBC;;;OAGG;IACH,wBAA2D;IAE3D;;;OAGG;IACH,yBAA6C;IAE7C;;;OAGG;IACH,0CAAiD;IAEjD;;;OAGG;IACH,4CAA+C;IAWjD;;;;OAIG;IACH,mBAHW,OAAO,gBAAgB,EAAE,KAAK,GAC7B,QAAQ,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,CAAC,CAW1D;IAgHD;OACG;IACH,kBAAc;IAEd;OACG;IACH,mBAAe;IAEf;OACG;IACH,wBAAoB;CAmCrB;qCAnOoC,iBAAiB"}
|
|
@@ -8,7 +8,7 @@ declare class CanvasVectorLayerRenderer extends CanvasLayerRenderer<any> {
|
|
|
8
8
|
/**
|
|
9
9
|
* @param {import("../../layer/BaseVector.js").default} vectorLayer Vector layer.
|
|
10
10
|
*/
|
|
11
|
-
constructor(vectorLayer: import("../../layer/BaseVector.js").default<any, any>);
|
|
11
|
+
constructor(vectorLayer: import("../../layer/BaseVector.js").default<any, any, any>);
|
|
12
12
|
/** @private */
|
|
13
13
|
private boundHandleStyleImageChange_;
|
|
14
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorLayer.d.ts","sourceRoot":"","sources":["VectorLayer.js"],"names":[],"mappings":";AA4CA;;;;GAIG;AACH;IACE;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"VectorLayer.d.ts","sourceRoot":"","sources":["VectorLayer.js"],"names":[],"mappings":";AA4CA;;;;GAIG;AACH;IACE;;OAEG;IACH,qFAqHC;IAlHC,eAAe;IACf,qCAA2E;IAE3E;;OAEG;IACH,yBAFU,OAAO,CAEW;IAE5B;;OAEG;IACH,wBAFU,SAAS,GAAC,IAAI,CAEU;IAElC;;;OAGG;IACH,iBAAqB;IAErB;;;OAGG;IACH,0BAA6B;IAE7B;;;OAGG;IACH,0BAA2B;IAE3B;;;OAGG;IACH,4BAA8B;IAE9B;;;OAGG;IACH,wBAAoC;IAEpC;;;OAGG;IACH,+BAA2C;IAE3C;;;OAGG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,wBAA2B;IAE3B;;;OAGG;IACH,4BAA+B;IAE/B;;;OAGG;IACH,4BAA4B;IAE5B;;;OAGG;IACH,6BAAgC;IAEhC;;;OAGG;IACH,gCAA4B;IAE5B;;;OAGG;IACH,qBAAwB;IAExB;;;OAGG;IACH,oBAFU,OAAO,CAEa;IAE9B;;;OAGG;IACH,UAFU,OAAO,CAEG;IAEpB;;;OAGG;IACH,uBAA0B;IAE1B;;;OAGG;IACH,iBAAiB;IAGnB;;;;;OAKG;IACH,4BALW,aAAa,cACb,OAAO,cAAc,EAAE,UAAU,6CA4D3C;IAED;;OAEG;IACH,wBASC;IAED;;OAEG;IACH,0BAWC;IAED;;;OAGG;IACH,4BAFW,OAAO,cAAc,EAAE,UAAU,QAO3C;IAmFD;;;;;OAKG;IACH,mBAJW,OAAO,gBAAgB,EAAE,KAAK,GAC7B,QAAQ,MAAM,OAAO,eAAe,EAAE,OAAO,CAAC,CAAC,CA8F1D;IA4FD;;;;OAIG;IACH,gCAEC;IA0MD;;;;;;;;;OASG;IACH,uBATW,OAAO,kBAAkB,EAAE,OAAO,oBAClC,MAAM,UACN,OAAO,sBAAsB,EAAE,OAAO,GAAC,MAAM,OAAO,sBAAsB,EAAE,OAAO,CAAC,gBACpF,OAAO,qCAAqC,EAAE,OAAO,mIAIpD,OAAO,CA0ClB;CACF;gCAnyB6C,YAAY;0BAKnD,sCAAsC"}
|
|
@@ -3,13 +3,13 @@ export default CanvasVectorTileLayerRenderer;
|
|
|
3
3
|
* @classdesc
|
|
4
4
|
* Canvas renderer for vector tile layers.
|
|
5
5
|
* @api
|
|
6
|
-
* @extends {CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default
|
|
6
|
+
* @extends {CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default<import('../../source/VectorTile.js').default<import('../../Feature.js').FeatureLike>>>}
|
|
7
7
|
*/
|
|
8
|
-
declare class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default<
|
|
8
|
+
declare class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default<import("../../source/VectorTile.js").default<import("../../Feature.js").FeatureLike>, import("../../Feature.js").FeatureLike>> {
|
|
9
9
|
/**
|
|
10
10
|
* @param {import("../../layer/VectorTile.js").default} layer VectorTile layer.
|
|
11
11
|
*/
|
|
12
|
-
constructor(layer: import("../../layer/VectorTile.js").default
|
|
12
|
+
constructor(layer: import("../../layer/VectorTile.js").default);
|
|
13
13
|
/** @private */
|
|
14
14
|
private boundHandleStyleImageChange_;
|
|
15
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorTileLayer.d.ts","sourceRoot":"","sources":["VectorTileLayer.js"],"names":[],"mappings":";AA4DA;;;;;GAKG;AACH;IACE;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"VectorTileLayer.d.ts","sourceRoot":"","sources":["VectorTileLayer.js"],"names":[],"mappings":";AA4DA;;;;;GAKG;AACH;IACE;;OAEG;IACH,mBAFW,OAAO,2BAA2B,EAAE,OAAO,EA2CrD;IAtCC,eAAe;IACf,qCAA2E;IAE3E;;;OAGG;IACH,+BAA2B;IAE3B;;;OAGG;IACH,4CAA+C;IAE/C;;;OAGG;IACH,0BAAsB;IAEtB;;;OAGG;IACH,yBAAyB;IAEzB;;;OAGG;IACH,sBAAsC;IAEtC;;;OAGG;IACH,0BAA6B;IAG/B;;;;;OAKG;IACH,kBALW,OAAO,2BAA2B,EAAE,OAAO,cAC3C,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,GACtC,OAAO,GAAC,SAAS,CAY5B;IAkCD;;;OAGG;IACH,qBAHW,OAAO,2BAA2B,EAAE,OAAO,GAC1C,OAAO,CAUlB;IAED;;OAEG;IACH,6BAEC;IAgBD;;;;;OAKG;IACH,6BAqHC;IAyND;;;;OAIG;IACH,gCAEC;IAED;;;;OAIG;IACH,4BAHW,OAAO,cAAc,EAAE,UAAU,cACjC,OAAO,sBAAsB,EAAE,KAAK,QAiC9C;IA0DD,6DA+BC;IAkID;;;;;;;;OAQG;IACH,uBARW,OAAO,kBAAkB,EAAE,WAAW,oBACtC,MAAM,UACN,OAAO,sBAAsB,EAAE,OAAO,GAAC,MAAM,OAAO,sBAAsB,EAAE,OAAO,CAAC,gBACpF,OAAO,qCAAqC,EAAE,OAAO,gEAGpD,OAAO,CAyClB;IAED;;;;OAIG;IACH,8BAcC;IAED;;;;OAIG;IACH,yBAwDC;CACF;oCAh6BmC,gBAAgB"}
|
|
@@ -62,7 +62,7 @@ const VECTOR_REPLAYS = {
|
|
|
62
62
|
* @classdesc
|
|
63
63
|
* Canvas renderer for vector tile layers.
|
|
64
64
|
* @api
|
|
65
|
-
* @extends {CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default
|
|
65
|
+
* @extends {CanvasTileLayerRenderer<import("../../layer/VectorTile.js").default<import('../../source/VectorTile.js').default<import('../../Feature.js').FeatureLike>>>}
|
|
66
66
|
*/
|
|
67
67
|
class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
|
68
68
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default OGCVectorTile;
|
|
2
|
-
export type Options<FeatureType extends import("../Feature.js").FeatureLike> = {
|
|
2
|
+
export type Options<FeatureType extends import("../Feature.js").FeatureLike = import("../render/Feature.js").default> = {
|
|
3
3
|
/**
|
|
4
4
|
* URL to the OGC Vector Tileset endpoint.
|
|
5
5
|
*/
|
|
@@ -10,9 +10,9 @@ export type Options<FeatureType extends import("../Feature.js").FeatureLike> = {
|
|
|
10
10
|
*/
|
|
11
11
|
context?: any;
|
|
12
12
|
/**
|
|
13
|
-
* Feature
|
|
13
|
+
* Feature format for tiles. Used and required by the default.
|
|
14
14
|
*/
|
|
15
|
-
format
|
|
15
|
+
format?: import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>> | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* The content type for the tiles (e.g. "application/vnd.mapbox-vector-tile"). If not provided,
|
|
18
18
|
* the source will try to find a link with rel="item" that uses a vector type supported by the configured format.
|
|
@@ -70,12 +70,12 @@ export type Options<FeatureType extends import("../Feature.js").FeatureLike> = {
|
|
|
70
70
|
collections?: string[] | undefined;
|
|
71
71
|
};
|
|
72
72
|
/**
|
|
73
|
-
* @template {import("../Feature.js").FeatureLike} FeatureType
|
|
73
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../render/Feature.js").default]
|
|
74
74
|
* @typedef {Object} Options
|
|
75
75
|
* @property {string} url URL to the OGC Vector Tileset endpoint.
|
|
76
76
|
* @property {Object} [context] A lookup of values to use in the tile URL template. The `{tileMatrix}`
|
|
77
77
|
* (zoom level), `{tileRow}`, and `{tileCol}` variables in the URL will always be provided by the source.
|
|
78
|
-
* @property {import("../format/Feature.js").default<import(
|
|
78
|
+
* @property {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>} [format] Feature format for tiles. Used and required by the default.
|
|
79
79
|
* @property {string} [mediaType] The content type for the tiles (e.g. "application/vnd.mapbox-vector-tile"). If not provided,
|
|
80
80
|
* the source will try to find a link with rel="item" that uses a vector type supported by the configured format.
|
|
81
81
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
@@ -112,10 +112,10 @@ export type Options<FeatureType extends import("../Feature.js").FeatureLike> = {
|
|
|
112
112
|
* which of the advertised media types is used. If you need to force the use of a particular media type, you can
|
|
113
113
|
* provide the `mediaType` option.
|
|
114
114
|
* @api
|
|
115
|
-
* @template {import("../Feature.js").FeatureLike} FeatureType
|
|
115
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../render/Feature.js").default]
|
|
116
116
|
* @extends {VectorTileSource<FeatureType>}
|
|
117
117
|
*/
|
|
118
|
-
declare class OGCVectorTile<FeatureType extends import("../Feature.js").FeatureLike> extends VectorTileSource<FeatureType> {
|
|
118
|
+
declare class OGCVectorTile<FeatureType extends import("../Feature.js").FeatureLike = import("../render/Feature.js").default> extends VectorTileSource<FeatureType> {
|
|
119
119
|
/**
|
|
120
120
|
* @param {Options<FeatureType>} options OGC vector tile options.
|
|
121
121
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OGCVectorTile.d.ts","sourceRoot":"","sources":["OGCVectorTile.js"],"names":[],"mappings":";;;;;SAWc,MAAM
|
|
1
|
+
{"version":3,"file":"OGCVectorTile.d.ts","sourceRoot":"","sources":["OGCVectorTile.js"],"names":[],"mappings":";;;;;SAWc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaN,OAAO,YAAY,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhBjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;;;;GAcG;AACH;IACE;;OAEG;IACH,qBAFW,QAAQ,WAAW,CAAC,EA6B9B;IAED;;;OAGG;IACH,2BAIC;IAED;;;OAGG;IACH,qBAGC;CACF;6BAtG4B,iBAAiB"}
|
package/source/OGCVectorTile.js
CHANGED
|
@@ -7,12 +7,12 @@ import {getTileSetInfo} from './ogcTileUtil.js';
|
|
|
7
7
|
import {error as logError} from '../console.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* @template {import("../Feature.js").FeatureLike} FeatureType
|
|
10
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../render/Feature.js").default]
|
|
11
11
|
* @typedef {Object} Options
|
|
12
12
|
* @property {string} url URL to the OGC Vector Tileset endpoint.
|
|
13
13
|
* @property {Object} [context] A lookup of values to use in the tile URL template. The `{tileMatrix}`
|
|
14
14
|
* (zoom level), `{tileRow}`, and `{tileCol}` variables in the URL will always be provided by the source.
|
|
15
|
-
* @property {import("../format/Feature.js").default<import(
|
|
15
|
+
* @property {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>} [format] Feature format for tiles. Used and required by the default.
|
|
16
16
|
* @property {string} [mediaType] The content type for the tiles (e.g. "application/vnd.mapbox-vector-tile"). If not provided,
|
|
17
17
|
* the source will try to find a link with rel="item" that uses a vector type supported by the configured format.
|
|
18
18
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
@@ -50,7 +50,7 @@ import {error as logError} from '../console.js';
|
|
|
50
50
|
* which of the advertised media types is used. If you need to force the use of a particular media type, you can
|
|
51
51
|
* provide the `mediaType` option.
|
|
52
52
|
* @api
|
|
53
|
-
* @template {import("../Feature.js").FeatureLike} FeatureType
|
|
53
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../render/Feature.js").default]
|
|
54
54
|
* @extends {VectorTileSource<FeatureType>}
|
|
55
55
|
*/
|
|
56
56
|
class OGCVectorTile extends VectorTileSource {
|
package/source/Vector.d.ts
CHANGED
|
@@ -10,27 +10,27 @@
|
|
|
10
10
|
* @classdesc
|
|
11
11
|
* Events emitted by {@link module:ol/source/Vector~VectorSource} instances are instances of this
|
|
12
12
|
* type.
|
|
13
|
-
* @template {import("../Feature.js").FeatureLike} [
|
|
13
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../Feature.js").default]
|
|
14
14
|
*/
|
|
15
|
-
export class VectorSourceEvent<
|
|
15
|
+
export class VectorSourceEvent<FeatureType extends import("../Feature.js").FeatureLike = import("../Feature.js").default<import("../geom.js").Geometry>> extends Event {
|
|
16
16
|
/**
|
|
17
17
|
* @param {string} type Type.
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {Array<
|
|
18
|
+
* @param {FeatureType} [feature] Feature.
|
|
19
|
+
* @param {Array<FeatureType>} [features] Features.
|
|
20
20
|
*/
|
|
21
|
-
constructor(type: string, feature?:
|
|
21
|
+
constructor(type: string, feature?: FeatureType | undefined, features?: FeatureType[] | undefined);
|
|
22
22
|
/**
|
|
23
23
|
* The added or removed feature for the `ADDFEATURE` and `REMOVEFEATURE` events, `undefined` otherwise.
|
|
24
|
-
* @type {
|
|
24
|
+
* @type {FeatureType|undefined}
|
|
25
25
|
* @api
|
|
26
26
|
*/
|
|
27
|
-
feature:
|
|
27
|
+
feature: FeatureType | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* The loaded features for the `FEATURESLOADED` event, `undefined` otherwise.
|
|
30
|
-
* @type {Array<
|
|
30
|
+
* @type {Array<FeatureType>|undefined}
|
|
31
31
|
* @api
|
|
32
32
|
*/
|
|
33
|
-
features: Array<
|
|
33
|
+
features: Array<FeatureType> | undefined;
|
|
34
34
|
}
|
|
35
35
|
export default VectorSource;
|
|
36
36
|
/**
|
|
@@ -47,7 +47,7 @@ export type FeatureClassOrArrayOfRenderFeatures<T extends import("../Feature.js"
|
|
|
47
47
|
* *
|
|
48
48
|
*/
|
|
49
49
|
export type VectorSourceOnSignature<Return, FeatureType extends import("../Feature.js").FeatureLike = import("../Feature.js").default<import("../geom.js").Geometry>> = import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> & import("../Observable").OnSignature<import("../ObjectEventType").Types, import("../Object").ObjectEvent, Return> & import("../Observable").OnSignature<import("./VectorEventType").VectorSourceEventTypes, VectorSourceEvent<FeatureType>, Return> & import("../Observable").CombinedOnSignature<import("../Observable").EventTypes | import("../ObjectEventType").Types | import("./VectorEventType").VectorSourceEventTypes, Return>;
|
|
50
|
-
export type Options<FeatureType extends import("../Feature.js").FeatureLike
|
|
50
|
+
export type Options<FeatureType extends import("../Feature.js").FeatureLike = import("../Feature.js").default<import("../geom.js").Geometry>> = {
|
|
51
51
|
/**
|
|
52
52
|
* Attributions.
|
|
53
53
|
*/
|
|
@@ -174,7 +174,7 @@ import Event from '../events/Event.js';
|
|
|
174
174
|
* import("./VectorEventType").VectorSourceEventTypes, Return>} VectorSourceOnSignature
|
|
175
175
|
*/
|
|
176
176
|
/**
|
|
177
|
-
* @template {import("../Feature.js").FeatureLike} FeatureType
|
|
177
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../Feature.js").default]
|
|
178
178
|
* @typedef {Object} Options
|
|
179
179
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
180
180
|
* @property {Array<FeatureType>|Collection<FeatureType>} [features]
|
|
@@ -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(
|
|
302
|
+
* @type {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<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(
|
|
568
|
+
* @return {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>|null}} The feature format.
|
|
569
569
|
* @api
|
|
570
570
|
*/
|
|
571
|
-
getFormat(): import("../format/Feature.js").default<import(
|
|
571
|
+
getFormat(): import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>> | null;
|
|
572
572
|
/**
|
|
573
573
|
* @return {boolean} The source can have overlapping geometries.
|
|
574
574
|
*/
|
package/source/Vector.d.ts.map
CHANGED
|
@@ -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,
|
|
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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yB,sBAAsB;uBANzB,kBAAkB;mBAOtB,aAAa"}
|
package/source/Vector.js
CHANGED
|
@@ -34,27 +34,27 @@ import {xhr} from '../featureloader.js';
|
|
|
34
34
|
* @classdesc
|
|
35
35
|
* Events emitted by {@link module:ol/source/Vector~VectorSource} instances are instances of this
|
|
36
36
|
* type.
|
|
37
|
-
* @template {import("../Feature.js").FeatureLike} [
|
|
37
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../Feature.js").default]
|
|
38
38
|
*/
|
|
39
39
|
export class VectorSourceEvent extends Event {
|
|
40
40
|
/**
|
|
41
41
|
* @param {string} type Type.
|
|
42
|
-
* @param {
|
|
43
|
-
* @param {Array<
|
|
42
|
+
* @param {FeatureType} [feature] Feature.
|
|
43
|
+
* @param {Array<FeatureType>} [features] Features.
|
|
44
44
|
*/
|
|
45
45
|
constructor(type, feature, features) {
|
|
46
46
|
super(type);
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* The added or removed feature for the `ADDFEATURE` and `REMOVEFEATURE` events, `undefined` otherwise.
|
|
50
|
-
* @type {
|
|
50
|
+
* @type {FeatureType|undefined}
|
|
51
51
|
* @api
|
|
52
52
|
*/
|
|
53
53
|
this.feature = feature;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* The loaded features for the `FEATURESLOADED` event, `undefined` otherwise.
|
|
57
|
-
* @type {Array<
|
|
57
|
+
* @type {Array<FeatureType>|undefined}
|
|
58
58
|
* @api
|
|
59
59
|
*/
|
|
60
60
|
this.features = features;
|
|
@@ -77,7 +77,7 @@ export class VectorSourceEvent extends Event {
|
|
|
77
77
|
*/
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* @template {import("../Feature.js").FeatureLike} FeatureType
|
|
80
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureType=import("../Feature.js").default]
|
|
81
81
|
* @typedef {Object} Options
|
|
82
82
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
83
83
|
* @property {Array<FeatureType>|Collection<FeatureType>} [features]
|
|
@@ -217,9 +217,9 @@ class VectorSource extends Source {
|
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
219
|
* @private
|
|
220
|
-
* @type {import("../format/Feature.js").default<import(
|
|
220
|
+
* @type {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>|null}
|
|
221
221
|
*/
|
|
222
|
-
this.format_ = options.format;
|
|
222
|
+
this.format_ = options.format || null;
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
225
|
* @private
|
|
@@ -448,7 +448,7 @@ class VectorSource extends Source {
|
|
|
448
448
|
const extents = [];
|
|
449
449
|
/** @type {Array<FeatureType>} */
|
|
450
450
|
const newFeatures = [];
|
|
451
|
-
/** @type Array<FeatureType> */
|
|
451
|
+
/** @type {Array<FeatureType>} */
|
|
452
452
|
const geometryFeatures = [];
|
|
453
453
|
|
|
454
454
|
for (let i = 0, length = features.length; i < length; i++) {
|
|
@@ -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(
|
|
892
|
+
* @return {import("../format/Feature.js").default<import("../format/Feature.js").FeatureToFeatureClass<FeatureType>>|null}} The feature format.
|
|
893
893
|
* @api
|
|
894
894
|
*/
|
|
895
895
|
getFormat() {
|