ol 8.1.1-dev.1694608919656 → 8.1.1-dev.1694687206621
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/Feature.d.ts +2 -2
- package/Feature.d.ts.map +1 -1
- package/Feature.js +1 -1
- package/color.d.ts +1 -1
- package/color.d.ts.map +1 -1
- package/color.js +12 -11
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/format/EsriJSON.d.ts +8 -0
- package/format/EsriJSON.d.ts.map +1 -1
- package/format/Feature.d.ts +79 -5
- package/format/Feature.d.ts.map +1 -1
- package/format/Feature.js +151 -11
- package/format/GeoJSON.d.ts +11 -0
- package/format/GeoJSON.d.ts.map +1 -1
- package/format/GeoJSON.js +144 -52
- package/format/JSONFeature.d.ts +4 -24
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/JSONFeature.js +4 -4
- package/format/MVT.d.ts.map +1 -1
- package/format/MVT.js +3 -2
- package/format/TopoJSON.d.ts +8 -0
- package/format/TopoJSON.d.ts.map +1 -1
- package/geom/SimpleGeometry.d.ts +5 -0
- package/geom/SimpleGeometry.d.ts.map +1 -1
- package/geom/SimpleGeometry.js +1 -1
- package/interaction/DragAndDrop.d.ts +1 -1
- package/interaction/Draw.d.ts +2 -2
- package/interaction/Modify.d.ts +1 -1
- package/interaction/Snap.d.ts +1 -1
- package/layer/BaseVector.d.ts +2 -2
- package/layer/Graticule.d.ts +2 -1
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Heatmap.d.ts +2 -2
- package/layer/Heatmap.js +1 -1
- package/layer/Vector.d.ts +1 -1
- package/layer/VectorImage.d.ts +2 -2
- package/layer/WebGLPoints.d.ts +4 -4
- package/layer/WebGLPoints.js +2 -2
- package/package.json +2 -1
- package/render/Feature.d.ts +33 -11
- package/render/Feature.d.ts.map +1 -1
- package/render/Feature.js +115 -21
- package/render/webgl/MixedGeometryBatch.d.ts.map +1 -1
- package/render/webgl/MixedGeometryBatch.js +1 -3
- package/source/Cluster.d.ts +2 -2
- package/source/Vector.d.ts +74 -66
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +98 -67
- package/util.js +1 -1
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("../
|
|
13
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureClass=import("../Feature.js").default]
|
|
14
14
|
*/
|
|
15
|
-
export class VectorSourceEvent<
|
|
15
|
+
export class VectorSourceEvent<FeatureClass extends import("../Feature.js").FeatureLike = import("../Feature.js").default<import("../geom/Geometry.js").default>> extends Event {
|
|
16
16
|
/**
|
|
17
17
|
* @param {string} type Type.
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {Array<
|
|
18
|
+
* @param {FeatureClass} [feature] Feature.
|
|
19
|
+
* @param {Array<FeatureClass>} [features] Features.
|
|
20
20
|
*/
|
|
21
|
-
constructor(type: string, feature?:
|
|
21
|
+
constructor(type: string, feature?: FeatureClass | undefined, features?: FeatureClass[] | undefined);
|
|
22
22
|
/**
|
|
23
23
|
* The added or removed feature for the `ADDFEATURE` and `REMOVEFEATURE` events, `undefined` otherwise.
|
|
24
|
-
* @type {
|
|
24
|
+
* @type {FeatureClass|undefined}
|
|
25
25
|
* @api
|
|
26
26
|
*/
|
|
27
|
-
feature:
|
|
27
|
+
feature: FeatureClass | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* The loaded features for the `FEATURESLOADED` event, `undefined` otherwise.
|
|
30
|
-
* @type {Array<
|
|
30
|
+
* @type {Array<FeatureClass>|undefined}
|
|
31
31
|
* @api
|
|
32
32
|
*/
|
|
33
|
-
features: Array<
|
|
33
|
+
features: Array<FeatureClass> | undefined;
|
|
34
34
|
}
|
|
35
35
|
export default VectorSource;
|
|
36
36
|
/**
|
|
@@ -43,7 +43,7 @@ export type LoadingStrategy = (arg0: import("../extent.js").Extent, arg1: number
|
|
|
43
43
|
* *
|
|
44
44
|
*/
|
|
45
45
|
export type VectorSourceOnSignature<Return> = 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, Return> & import("../Observable").CombinedOnSignature<import("../Observable").EventTypes | import("../ObjectEventType").Types | import("./VectorEventType").VectorSourceEventTypes, Return>;
|
|
46
|
-
export type Options<
|
|
46
|
+
export type Options<FeatureClass extends import("../Feature.js").FeatureLike = import("../Feature.js").default<import("../geom/Geometry.js").default>> = {
|
|
47
47
|
/**
|
|
48
48
|
* Attributions.
|
|
49
49
|
*/
|
|
@@ -52,7 +52,7 @@ export type Options<Geometry extends import("../geom/Geometry.js").default = imp
|
|
|
52
52
|
* Features. If provided as {@link module :ol/Collection~Collection}, the features in the source
|
|
53
53
|
* and the collection will stay in sync.
|
|
54
54
|
*/
|
|
55
|
-
features?:
|
|
55
|
+
features?: FeatureClass[] | Collection<FeatureClass> | undefined;
|
|
56
56
|
/**
|
|
57
57
|
* The feature format used by the XHR
|
|
58
58
|
* feature loader when `url` is set. Required if `url` is set, otherwise ignored.
|
|
@@ -165,10 +165,10 @@ import Event from '../events/Event.js';
|
|
|
165
165
|
* import("./VectorEventType").VectorSourceEventTypes, Return>} VectorSourceOnSignature
|
|
166
166
|
*/
|
|
167
167
|
/**
|
|
168
|
-
* @template {import("../
|
|
168
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureClass=import("../Feature.js").default]
|
|
169
169
|
* @typedef {Object} Options
|
|
170
170
|
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
|
171
|
-
* @property {Array<
|
|
171
|
+
* @property {Array<FeatureClass>|Collection<FeatureClass>} [features]
|
|
172
172
|
* Features. If provided as {@link module:ol/Collection~Collection}, the features in the source
|
|
173
173
|
* and the collection will stay in sync.
|
|
174
174
|
* @property {import("../format/Feature.js").default} [format] The feature format used by the XHR
|
|
@@ -264,13 +264,13 @@ import Event from '../events/Event.js';
|
|
|
264
264
|
*
|
|
265
265
|
* @fires VectorSourceEvent
|
|
266
266
|
* @api
|
|
267
|
-
* @template {import("../
|
|
267
|
+
* @template {import("../Feature.js").FeatureLike} [FeatureClass=import("../Feature.js").default]
|
|
268
268
|
*/
|
|
269
|
-
declare class VectorSource<
|
|
269
|
+
declare class VectorSource<FeatureClass extends import("../Feature.js").FeatureLike = import("../Feature.js").default<import("../geom/Geometry.js").default>> extends Source {
|
|
270
270
|
/**
|
|
271
|
-
* @param {Options<
|
|
271
|
+
* @param {Options<FeatureClass>} [options] Vector source options.
|
|
272
272
|
*/
|
|
273
|
-
constructor(options?: Options<
|
|
273
|
+
constructor(options?: Options<FeatureClass> | undefined);
|
|
274
274
|
/***
|
|
275
275
|
* @type {VectorSourceOnSignature<import("../events").EventsKey>}
|
|
276
276
|
*/
|
|
@@ -310,7 +310,7 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
310
310
|
private strategy_;
|
|
311
311
|
/**
|
|
312
312
|
* @private
|
|
313
|
-
* @type {RBush<
|
|
313
|
+
* @type {RBush<FeatureClass>}
|
|
314
314
|
*/
|
|
315
315
|
private featuresRtree_;
|
|
316
316
|
/**
|
|
@@ -325,19 +325,19 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
325
325
|
private loadingExtentsCount_;
|
|
326
326
|
/**
|
|
327
327
|
* @private
|
|
328
|
-
* @type {!Object<string,
|
|
328
|
+
* @type {!Object<string, FeatureClass>}
|
|
329
329
|
*/
|
|
330
330
|
private nullGeometryFeatures_;
|
|
331
331
|
/**
|
|
332
332
|
* A lookup of features by id (the return from feature.getId()).
|
|
333
333
|
* @private
|
|
334
|
-
* @type {!Object<string,
|
|
334
|
+
* @type {!Object<string, FeatureClass|Array<RenderFeature>>}
|
|
335
335
|
*/
|
|
336
336
|
private idIndex_;
|
|
337
337
|
/**
|
|
338
338
|
* A lookup of features by uid (using getUid(feature)).
|
|
339
339
|
* @private
|
|
340
|
-
* @type {!Object<string,
|
|
340
|
+
* @type {!Object<string, FeatureClass>}
|
|
341
341
|
*/
|
|
342
342
|
private uidIndex_;
|
|
343
343
|
/**
|
|
@@ -347,7 +347,7 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
347
347
|
private featureChangeKeys_;
|
|
348
348
|
/**
|
|
349
349
|
* @private
|
|
350
|
-
* @type {Collection<
|
|
350
|
+
* @type {Collection<FeatureClass>|null}
|
|
351
351
|
*/
|
|
352
352
|
private featuresCollection_;
|
|
353
353
|
/**
|
|
@@ -359,25 +359,25 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
359
359
|
* Note: this also applies if an {@link module:ol/Collection~Collection} is used for features,
|
|
360
360
|
* meaning that if a feature with a duplicate id is added in the collection, it will
|
|
361
361
|
* be removed from it right away.
|
|
362
|
-
* @param {
|
|
362
|
+
* @param {FeatureClass} feature Feature to add.
|
|
363
363
|
* @api
|
|
364
364
|
*/
|
|
365
|
-
addFeature(feature:
|
|
365
|
+
addFeature(feature: FeatureClass): void;
|
|
366
366
|
/**
|
|
367
367
|
* Add a feature without firing a `change` event.
|
|
368
|
-
* @param {
|
|
368
|
+
* @param {FeatureClass} feature Feature.
|
|
369
369
|
* @protected
|
|
370
370
|
*/
|
|
371
|
-
protected addFeatureInternal(feature:
|
|
371
|
+
protected addFeatureInternal(feature: FeatureClass): void;
|
|
372
372
|
/**
|
|
373
373
|
* @param {string} featureKey Unique identifier for the feature.
|
|
374
|
-
* @param {
|
|
374
|
+
* @param {FeatureClass} feature The feature.
|
|
375
375
|
* @private
|
|
376
376
|
*/
|
|
377
377
|
private setupChangeEvents_;
|
|
378
378
|
/**
|
|
379
379
|
* @param {string} featureKey Unique identifier for the feature.
|
|
380
|
-
* @param {
|
|
380
|
+
* @param {FeatureClass} feature The feature.
|
|
381
381
|
* @return {boolean} The feature is "valid", in the sense that it is also a
|
|
382
382
|
* candidate for insertion into the Rtree.
|
|
383
383
|
* @private
|
|
@@ -385,18 +385,18 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
385
385
|
private addToIndex_;
|
|
386
386
|
/**
|
|
387
387
|
* Add a batch of features to the source.
|
|
388
|
-
* @param {Array<
|
|
388
|
+
* @param {Array<FeatureClass>} features Features to add.
|
|
389
389
|
* @api
|
|
390
390
|
*/
|
|
391
|
-
addFeatures(features: Array<
|
|
391
|
+
addFeatures(features: Array<FeatureClass>): void;
|
|
392
392
|
/**
|
|
393
393
|
* Add features without firing a `change` event.
|
|
394
|
-
* @param {Array<
|
|
394
|
+
* @param {Array<FeatureClass>} features Features.
|
|
395
395
|
* @protected
|
|
396
396
|
*/
|
|
397
|
-
protected addFeaturesInternal(features: Array<
|
|
397
|
+
protected addFeaturesInternal(features: Array<FeatureClass>): void;
|
|
398
398
|
/**
|
|
399
|
-
* @param {!Collection<
|
|
399
|
+
* @param {!Collection<FeatureClass>} collection Collection.
|
|
400
400
|
* @private
|
|
401
401
|
*/
|
|
402
402
|
private bindFeaturesCollection_;
|
|
@@ -412,26 +412,29 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
412
412
|
* stop and the function will return the same value.
|
|
413
413
|
* Note: this function only iterate through the feature that have a defined geometry.
|
|
414
414
|
*
|
|
415
|
-
* @param {function(
|
|
415
|
+
* @param {function(FeatureClass): T} callback Called with each feature
|
|
416
416
|
* on the source. Return a truthy value to stop iteration.
|
|
417
417
|
* @return {T|undefined} The return value from the last call to the callback.
|
|
418
418
|
* @template T
|
|
419
419
|
* @api
|
|
420
420
|
*/
|
|
421
|
-
forEachFeature<T>(callback: (arg0:
|
|
421
|
+
forEachFeature<T>(callback: (arg0: FeatureClass) => T): T | undefined;
|
|
422
422
|
/**
|
|
423
423
|
* Iterate through all features whose geometries contain the provided
|
|
424
424
|
* coordinate, calling the callback with each feature. If the callback returns
|
|
425
425
|
* a "truthy" value, iteration will stop and the function will return the same
|
|
426
426
|
* value.
|
|
427
427
|
*
|
|
428
|
+
* For {@link module:ol/render/Feature~RenderFeature} features, the callback will be
|
|
429
|
+
* called for all features.
|
|
430
|
+
*
|
|
428
431
|
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
|
|
429
|
-
* @param {function(
|
|
432
|
+
* @param {function(FeatureClass): T} callback Called with each feature
|
|
430
433
|
* whose goemetry contains the provided coordinate.
|
|
431
434
|
* @return {T|undefined} The return value from the last call to the callback.
|
|
432
435
|
* @template T
|
|
433
436
|
*/
|
|
434
|
-
forEachFeatureAtCoordinateDirect<T_1>(coordinate: import("../coordinate.js").Coordinate, callback: (arg0:
|
|
437
|
+
forEachFeatureAtCoordinateDirect<T_1>(coordinate: import("../coordinate.js").Coordinate, callback: (arg0: FeatureClass) => T_1): T_1 | undefined;
|
|
435
438
|
/**
|
|
436
439
|
* Iterate through all features whose bounding box intersects the provided
|
|
437
440
|
* extent (note that the feature's geometry may not intersect the extent),
|
|
@@ -445,13 +448,13 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
445
448
|
* features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.
|
|
446
449
|
*
|
|
447
450
|
* @param {import("../extent.js").Extent} extent Extent.
|
|
448
|
-
* @param {function(
|
|
451
|
+
* @param {function(FeatureClass): T} callback Called with each feature
|
|
449
452
|
* whose bounding box intersects the provided extent.
|
|
450
453
|
* @return {T|undefined} The return value from the last call to the callback.
|
|
451
454
|
* @template T
|
|
452
455
|
* @api
|
|
453
456
|
*/
|
|
454
|
-
forEachFeatureInExtent<T_2>(extent: import("../extent.js").Extent, callback: (arg0:
|
|
457
|
+
forEachFeatureInExtent<T_2>(extent: import("../extent.js").Extent, callback: (arg0: FeatureClass) => T_2): T_2 | undefined;
|
|
455
458
|
/**
|
|
456
459
|
* Iterate through all features whose geometry intersects the provided extent,
|
|
457
460
|
* calling the callback with each feature. If the callback returns a "truthy"
|
|
@@ -461,35 +464,35 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
461
464
|
* {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.
|
|
462
465
|
*
|
|
463
466
|
* @param {import("../extent.js").Extent} extent Extent.
|
|
464
|
-
* @param {function(
|
|
467
|
+
* @param {function(FeatureClass): T} callback Called with each feature
|
|
465
468
|
* whose geometry intersects the provided extent.
|
|
466
469
|
* @return {T|undefined} The return value from the last call to the callback.
|
|
467
470
|
* @template T
|
|
468
471
|
* @api
|
|
469
472
|
*/
|
|
470
|
-
forEachFeatureIntersectingExtent<T_3>(extent: import("../extent.js").Extent, callback: (arg0:
|
|
473
|
+
forEachFeatureIntersectingExtent<T_3>(extent: import("../extent.js").Extent, callback: (arg0: FeatureClass) => T_3): T_3 | undefined;
|
|
471
474
|
/**
|
|
472
475
|
* Get the features collection associated with this source. Will be `null`
|
|
473
476
|
* unless the source was configured with `useSpatialIndex` set to `false`, or
|
|
474
477
|
* with an {@link module:ol/Collection~Collection} as `features`.
|
|
475
|
-
* @return {Collection<
|
|
478
|
+
* @return {Collection<FeatureClass>|null} The collection of features.
|
|
476
479
|
* @api
|
|
477
480
|
*/
|
|
478
|
-
getFeaturesCollection(): Collection<
|
|
481
|
+
getFeaturesCollection(): Collection<FeatureClass> | null;
|
|
479
482
|
/**
|
|
480
483
|
* Get a snapshot of the features currently on the source in random order. The returned array
|
|
481
484
|
* is a copy, the features are references to the features in the source.
|
|
482
|
-
* @return {Array<
|
|
485
|
+
* @return {Array<FeatureClass>} Features.
|
|
483
486
|
* @api
|
|
484
487
|
*/
|
|
485
|
-
getFeatures(): Array<
|
|
488
|
+
getFeatures(): Array<FeatureClass>;
|
|
486
489
|
/**
|
|
487
490
|
* Get all features whose geometry intersects the provided coordinate.
|
|
488
491
|
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
|
|
489
|
-
* @return {Array<import("../Feature.js").default
|
|
492
|
+
* @return {Array<import("../Feature.js").default>} Features.
|
|
490
493
|
* @api
|
|
491
494
|
*/
|
|
492
|
-
getFeaturesAtCoordinate(coordinate: import("../coordinate.js").Coordinate): Array<import("../Feature.js").default
|
|
495
|
+
getFeaturesAtCoordinate(coordinate: import("../coordinate.js").Coordinate): Array<import("../Feature.js").default>;
|
|
493
496
|
/**
|
|
494
497
|
* Get all features whose bounding box intersects the provided extent. Note that this returns an array of
|
|
495
498
|
* all features intersecting the given extent in random order (so it may include
|
|
@@ -501,23 +504,24 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
501
504
|
* @param {import("../extent.js").Extent} extent Extent.
|
|
502
505
|
* @param {import("../proj/Projection.js").default} [projection] Include features
|
|
503
506
|
* where `extent` exceeds the x-axis bounds of `projection` and wraps around the world.
|
|
504
|
-
* @return {Array<
|
|
507
|
+
* @return {Array<FeatureClass>} Features.
|
|
505
508
|
* @api
|
|
506
509
|
*/
|
|
507
|
-
getFeaturesInExtent(extent: import("../extent.js").Extent, projection?: import("../proj/Projection.js").default | undefined): Array<
|
|
510
|
+
getFeaturesInExtent(extent: import("../extent.js").Extent, projection?: import("../proj/Projection.js").default | undefined): Array<FeatureClass>;
|
|
508
511
|
/**
|
|
509
512
|
* Get the closest feature to the provided coordinate.
|
|
510
513
|
*
|
|
511
514
|
* This method is not available when the source is configured with
|
|
512
|
-
* `useSpatialIndex` set to `false
|
|
515
|
+
* `useSpatialIndex` set to `false` and the features in this source are of type
|
|
516
|
+
* {@link module:ol/Feature~Feature}.
|
|
513
517
|
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
|
|
514
|
-
* @param {function(
|
|
518
|
+
* @param {function(FeatureClass):boolean} [filter] Feature filter function.
|
|
515
519
|
* The filter function will receive one argument, the {@link module:ol/Feature~Feature feature}
|
|
516
520
|
* and it should return a boolean value. By default, no filtering is made.
|
|
517
|
-
* @return {
|
|
521
|
+
* @return {FeatureClass} Closest feature.
|
|
518
522
|
* @api
|
|
519
523
|
*/
|
|
520
|
-
getClosestFeatureToCoordinate(coordinate: import("../coordinate.js").Coordinate, filter?: ((arg0:
|
|
524
|
+
getClosestFeatureToCoordinate(coordinate: import("../coordinate.js").Coordinate, filter?: ((arg0: FeatureClass) => boolean) | undefined): FeatureClass;
|
|
521
525
|
/**
|
|
522
526
|
* Get the extent of the features currently in the source.
|
|
523
527
|
*
|
|
@@ -530,22 +534,25 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
530
534
|
*/
|
|
531
535
|
getExtent(extent?: import("../extent.js").Extent | undefined): import("../extent.js").Extent;
|
|
532
536
|
/**
|
|
533
|
-
* Get a feature by its identifier (the value returned by feature.getId()).
|
|
537
|
+
* Get a feature by its identifier (the value returned by feature.getId()). When `RenderFeature`s
|
|
538
|
+
* are used, `getFeatureById()` can return an array of `RenderFeature`s. This allows for handling
|
|
539
|
+
* of `GeometryCollection` geometries, where format readers create one `RenderFeature` per
|
|
540
|
+
* `GeometryCollection` member.
|
|
534
541
|
* Note that the index treats string and numeric identifiers as the same. So
|
|
535
542
|
* `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.
|
|
536
543
|
*
|
|
537
544
|
* @param {string|number} id Feature identifier.
|
|
538
|
-
* @return {
|
|
545
|
+
* @return {FeatureClass|Array<RenderFeature>|null} The feature (or `null` if not found).
|
|
539
546
|
* @api
|
|
540
547
|
*/
|
|
541
|
-
getFeatureById(id: string | number):
|
|
548
|
+
getFeatureById(id: string | number): FeatureClass | Array<RenderFeature> | null;
|
|
542
549
|
/**
|
|
543
550
|
* Get a feature by its internal unique identifier (using `getUid`).
|
|
544
551
|
*
|
|
545
552
|
* @param {string} uid Feature identifier.
|
|
546
|
-
* @return {
|
|
553
|
+
* @return {FeatureClass|null} The feature (or `null` if not found).
|
|
547
554
|
*/
|
|
548
|
-
getFeatureByUid(uid: string):
|
|
555
|
+
getFeatureByUid(uid: string): FeatureClass | null;
|
|
549
556
|
/**
|
|
550
557
|
* Get the format associated with this source.
|
|
551
558
|
*
|
|
@@ -571,11 +578,11 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
571
578
|
private handleFeatureChange_;
|
|
572
579
|
/**
|
|
573
580
|
* Returns true if the feature is contained within the source.
|
|
574
|
-
* @param {
|
|
581
|
+
* @param {FeatureClass} feature Feature.
|
|
575
582
|
* @return {boolean} Has feature.
|
|
576
583
|
* @api
|
|
577
584
|
*/
|
|
578
|
-
hasFeature(feature:
|
|
585
|
+
hasFeature(feature: FeatureClass): boolean;
|
|
579
586
|
/**
|
|
580
587
|
* @return {boolean} Is empty.
|
|
581
588
|
*/
|
|
@@ -596,22 +603,22 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
596
603
|
* Remove a single feature from the source. If you want to remove all features
|
|
597
604
|
* at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method
|
|
598
605
|
* instead.
|
|
599
|
-
* @param {
|
|
606
|
+
* @param {FeatureClass} feature Feature to remove.
|
|
600
607
|
* @api
|
|
601
608
|
*/
|
|
602
|
-
removeFeature(feature:
|
|
609
|
+
removeFeature(feature: FeatureClass): void;
|
|
603
610
|
/**
|
|
604
611
|
* Remove feature without firing a `change` event.
|
|
605
|
-
* @param {
|
|
606
|
-
* @return {
|
|
612
|
+
* @param {FeatureClass} feature Feature.
|
|
613
|
+
* @return {FeatureClass|undefined} The removed feature
|
|
607
614
|
* (or undefined if the feature was not found).
|
|
608
615
|
* @protected
|
|
609
616
|
*/
|
|
610
|
-
protected removeFeatureInternal(feature:
|
|
617
|
+
protected removeFeatureInternal(feature: FeatureClass): FeatureClass | undefined;
|
|
611
618
|
/**
|
|
612
619
|
* Remove a feature from the id index. Called internally when the feature id
|
|
613
620
|
* may have changed.
|
|
614
|
-
* @param {
|
|
621
|
+
* @param {FeatureClass} feature The feature.
|
|
615
622
|
* @return {boolean} Removed the feature from the index.
|
|
616
623
|
* @private
|
|
617
624
|
*/
|
|
@@ -632,4 +639,5 @@ declare class VectorSource<Geometry extends import("../geom/Geometry.js").defaul
|
|
|
632
639
|
}
|
|
633
640
|
import Collection from '../Collection.js';
|
|
634
641
|
import Source from './Source.js';
|
|
642
|
+
import RenderFeature from '../render/Feature.js';
|
|
635
643
|
//# sourceMappingURL=Vector.d.ts.map
|
package/source/Vector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["Vector.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["Vector.js"],"names":[],"mappings":"AAuBA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,kBAJW,MAAM,6EAoBhB;IAbC;;;;OAIG;IACH,SAHU,YAAY,GAAC,SAAS,CAGV;IAEtB;;;;OAIG;IACH,UAHU,MAAM,YAAY,CAAC,GAAC,SAAS,CAGf;CAE3B;;;;;;;qCAjCqB,OAAO,cAAc,EAAE,MAAM,QAAE,MAAM,QAAE,OAAO,uBAAuB,EAAE,OAAO,KAAG,MAAM,OAAO,cAAc,EAAE,MAAM,CAAC;;;;8CAqC9H,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,oBAAoB,EAAE,KAAK,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GACpH,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,mBAAmB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,CAAC,GACtH,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,GAAC,OAAO,oBAAoB,EAAE,KAAK,GACrH,OAAa,mBAAmB,EAAE,sBAA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