Skip to content

Documentation / @geoverse/core-ol / SuperClusterSource

Class: SuperClusterSource

Defined in: packages/core-ol/src/sources/superClusterSource.ts:36

基于 supercluster 的聚合数据源(十万级点位)。 内部维护原始 VectorSource,本身作为聚合结果源供图层渲染。

Extends

  • VectorSource

Constructors

Constructor

ts
new SuperClusterSource(options): SuperClusterSource;

Defined in: packages/core-ol/src/sources/superClusterSource.ts:50

Parameters

options

SuperClusterSourceOptions

Returns

SuperClusterSource

Overrides

ts
VectorSource.constructor

Properties

disposed

ts
protected disposed: boolean;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Disposable.d.ts:15

The object has already been disposed.

Inherited from

ts
VectorSource.disposed

loading

ts
loading: number | boolean;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:114

This source is currently loading data. Sources that defer loading to the map's tile queue never set this to a truthy value.

Inherited from

ts
VectorSource.loading

on

ts
on: VectorSourceOnSignature<EventsKey, Feature<Geometry, {
[x: string]: any;
}>>;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:289

Inherited from

ts
VectorSource.on

once

ts
once: VectorSourceOnSignature<EventsKey, Feature<Geometry, {
[x: string]: any;
}>>;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:293

Inherited from

ts
VectorSource.once

projection

ts
protected projection: Projection | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:98

Inherited from

ts
VectorSource.projection

un

ts
un: VectorSourceOnSignature<void>;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:297

Inherited from

ts
VectorSource.un

viewRejector

ts
protected viewRejector: (arg0) => void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:139

Parameters

arg0

Error

Returns

void

Inherited from

ts
VectorSource.viewRejector

viewResolver

ts
protected viewResolver: (arg0) => void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:134

Parameters

arg0

ViewOptions

Returns

void

Inherited from

ts
VectorSource.viewResolver

Methods

addChangeListener()

ts
addChangeListener(key, listener): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:145

Parameters

key

string

Key name.

listener

Listener

Listener.

Returns

void

Inherited from

ts
VectorSource.addChangeListener

addEventListener()

ts
addEventListener(type, listener): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/events/Target.d.ts:50

Parameters

type

string

Type.

listener

Listener

Listener.

Returns

void

Inherited from

ts
VectorSource.addEventListener

addFeature()

ts
addFeature(feature): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:372

Add a single feature to the source. If you want to add a batch of features at once, call module:ol/source/Vector~VectorSource#addFeatures #addFeatures() instead. A feature will not be added to the source if feature with the same id is already there. The reason for this behavior is to avoid feature duplication when using bbox or tile loading strategies. Note: this also applies if a module:ol/Collection~Collection is used for features, meaning that if a feature with a duplicate id is added in the collection, it will be removed from it right away.

Parameters

feature

Feature

Feature to add.

Returns

void

Api

Inherited from

ts
VectorSource.addFeature

addFeatureInternal()

ts
protected addFeatureInternal(feature): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:378

Add a feature without firing a change event.

Parameters

feature

Feature

Feature.

Returns

void

Inherited from

ts
VectorSource.addFeatureInternal

addFeatures()

ts
addFeatures(features): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:398

Add a batch of features to the source.

Parameters

features

Feature<Geometry, { [x: string]: any; }>[]

Features to add.

Returns

void

Api

Inherited from

ts
VectorSource.addFeatures

addFeaturesInternal()

ts
protected addFeaturesInternal(features): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:404

Add features without firing a change event.

Parameters

features

Feature<Geometry, { [x: string]: any; }>[]

Features.

Returns

void

Inherited from

ts
VectorSource.addFeaturesInternal

applyProperties()

ts
protected applyProperties(source): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:172

Apply any properties from another object without triggering events.

Parameters

source

BaseObject

The source object.

Returns

void

Inherited from

ts
VectorSource.applyProperties

changed()

ts
changed(): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Observable.d.ts:65

Increases the revision counter and dispatches a 'change' event.

Returns

void

Api

Inherited from

ts
VectorSource.changed

clear()

ts
clear(fast?): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:415

Remove all features from the source.

Parameters

fast?

boolean

Skip dispatching of module:ol/source/Vector.VectorSourceEvent#event:removefeature events.

Returns

void

Api

Inherited from

ts
VectorSource.clear

dispatchEvent()

ts
dispatchEvent(event): boolean | undefined;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/events/Target.d.ts:61

Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a type property.

Parameters

event

string | BaseEvent

Event object.

Returns

boolean | undefined

false if anyone called preventDefault on the event object or if any of the listeners returned false.

Api

Inherited from

ts
VectorSource.dispatchEvent

dispose()

ts
dispose(): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Disposable.d.ts:19

Clean up.

Returns

void

Inherited from

ts
VectorSource.dispose

disposeInternal()

ts
protected disposeInternal(): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Disposable.d.ts:24

Extension point for disposable objects.

Returns

void

Inherited from

ts
VectorSource.disposeInternal

forEachFeature()

ts
forEachFeature<T>(callback): T | undefined;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:428

Iterate through all features on the source, calling the provided callback with each one. If the callback returns any "truthy" value, iteration will stop and the function will return the same value. Note: this function only iterate through the feature that have a defined geometry.

Type Parameters

T

T

Parameters

callback

(arg0) => T

Called with each feature on the source. Return a truthy value to stop iteration.

Returns

T | undefined

The return value from the last call to the callback.

Api

Inherited from

ts
VectorSource.forEachFeature

forEachFeatureAtCoordinateDirect()

ts
forEachFeatureAtCoordinateDirect<T>(coordinate, callback): T | undefined;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:444

Iterate through all features whose geometries contain the provided coordinate, calling the callback with each feature. If the callback returns a "truthy" value, iteration will stop and the function will return the same value.

For module:ol/render/Feature~RenderFeature features, the callback will be called for all features.

Type Parameters

T

T

Parameters

coordinate

Coordinate

Coordinate.

callback

(arg0) => T

Called with each feature whose goemetry contains the provided coordinate.

Returns

T | undefined

The return value from the last call to the callback.

Inherited from

ts
VectorSource.forEachFeatureAtCoordinateDirect

forEachFeatureInExtent()

ts
forEachFeatureInExtent<T>(extent, callback): T | undefined;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:464

Iterate through all features whose bounding box intersects the provided extent (note that the feature's geometry may not intersect the extent), calling the callback with each feature. If the callback returns a "truthy" value, iteration will stop and the function will return the same value.

If you are interested in features whose geometry intersects an extent, call the module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent() method instead.

When useSpatialIndex is set to false, this method will loop through all features, equivalent to module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature().

Type Parameters

T

T

Parameters

extent

Extent

Extent.

callback

(arg0) => T

Called with each feature whose bounding box intersects the provided extent.

Returns

T | undefined

The return value from the last call to the callback.

Api

Inherited from

ts
VectorSource.forEachFeatureInExtent

forEachFeatureIntersectingExtent()

ts
forEachFeatureIntersectingExtent<T>(extent, callback): T | undefined;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:480

Iterate through all features whose geometry intersects the provided extent, calling the callback with each feature. If the callback returns a "truthy" value, iteration will stop and the function will return the same value.

If you only want to test for bounding box intersection, call the module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent() method instead.

Type Parameters

T

T

Parameters

extent

Extent

Extent.

callback

(arg0) => T

Called with each feature whose geometry intersects the provided extent.

Returns

T | undefined

The return value from the last call to the callback.

Api

Inherited from

ts
VectorSource.forEachFeatureIntersectingExtent

get()

ts
get(key): any;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:114

Gets a value.

Parameters

key

string

Key name.

Returns

any

Value.

Api

Inherited from

ts
VectorSource.get

getAttributions()

ts
getAttributions(): Attribution | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:150

Get the attribution function for the source.

Returns

Attribution | null

Attribution function.

Api

Inherited from

ts
VectorSource.getAttributions

getAttributionsCollapsible()

ts
getAttributionsCollapsible(): boolean;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:155

Returns

boolean

Attributions are collapsible.

Api

Inherited from

ts
VectorSource.getAttributionsCollapsible

getClosestFeatureToCoordinate()

ts
getClosestFeatureToCoordinate(coordinate, filter?): 
  | Feature<Geometry, {
[x: string]: any;
}>
  | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:531

Get the closest feature to the provided coordinate.

This method is not available when the source is configured with useSpatialIndex set to false and the features in this source are of type module:ol/Feature~Feature.

Parameters

coordinate

Coordinate

Coordinate.

filter?

(arg0) => boolean

Feature filter function. The filter function will receive one argument, the module:ol/Feature~Feature feature and it should return a boolean value. By default, no filtering is made.

Returns

| Feature<Geometry, { [x: string]: any; }> | null

Closest feature (or null if none found).

Api

Inherited from

ts
VectorSource.getClosestFeatureToCoordinate

getClusterExpansionZoom()

ts
getClusterExpansionZoom(feature): number;

Defined in: packages/core-ol/src/sources/superClusterSource.ts:179

聚合点散开所需的层级

Parameters

feature

Feature

Returns

number


getExtent()

ts
getExtent(extent?): Extent | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:542

Get the extent of the features currently in the source.

This will return null when the source is configured with useSpatialIndex set to false.

Parameters

extent?

Extent

Destination extent. If provided, no new extent will be created. Instead, that extent's coordinates will be overwritten.

Returns

Extent | null

Extent.

Api

Inherited from

ts
VectorSource.getExtent

getFeatureById()

ts
getFeatureById(id): 
  | Feature<Geometry, {
[x: string]: any;
}>
  | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:555

Get a feature by its identifier (the value returned by feature.getId()). When RenderFeatures are used, getFeatureById() can return an array of RenderFeatures. This allows for handling of GeometryCollection geometries, where format readers create one RenderFeature per GeometryCollection member. Note that the index treats string and numeric identifiers as the same. So source.getFeatureById(2) will return a feature with id '2' or 2.

Parameters

id

string | number

Feature identifier.

Returns

| Feature<Geometry, { [x: string]: any; }> | null

The feature (or null if not found).

Api

Inherited from

ts
VectorSource.getFeatureById

getFeatureByUid()

ts
getFeatureByUid(uid): 
  | Feature<Geometry, {
[x: string]: any;
}>
  | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:562

Get a feature by its internal unique identifier (using getUid).

Parameters

uid

string

Feature identifier.

Returns

| Feature<Geometry, { [x: string]: any; }> | null

The feature (or null if not found).

Inherited from

ts
VectorSource.getFeatureByUid

getFeatures()

ts
getFeatures(): Feature<Geometry, {
[x: string]: any;
}>[];

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:495

Get a snapshot of the features currently on the source in random order. The returned array is a copy, the features are references to the features in the source.

Returns

Feature<Geometry, { [x: string]: any; }>[]

Features.

Api

Inherited from

ts
VectorSource.getFeatures

getFeaturesAtCoordinate()

ts
getFeaturesAtCoordinate(coordinate): Feature<Geometry, {
[x: string]: any;
}>[];

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:502

Get all features whose geometry intersects the provided coordinate.

Parameters

coordinate

Coordinate

Coordinate.

Returns

Feature<Geometry, { [x: string]: any; }>[]

Features.

Api

Inherited from

ts
VectorSource.getFeaturesAtCoordinate

getFeaturesCollection()

ts
getFeaturesCollection(): 
  | Collection<Feature<Geometry, {
[x: string]: any;
}>>
  | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:488

Get the features collection associated with this source. Will be null unless the source was configured with useSpatialIndex set to false, or with a module:ol/Collection~Collection as features.

Returns

| Collection<Feature<Geometry, { [x: string]: any; }>> | null

The collection of features.

Api

Inherited from

ts
VectorSource.getFeaturesCollection

getFeaturesForCluster()

ts
getFeaturesForCluster(feature): Feature<Geometry, {
[x: string]: any;
}>[];

Defined in: packages/core-ol/src/sources/superClusterSource.ts:158

聚合点内的全部原始要素(非聚合点返回自身)

Parameters

feature

Feature

Returns

Feature<Geometry, { [x: string]: any; }>[]


getFeaturesInExtent()

ts
getFeaturesInExtent(extent, projection?): Feature<Geometry, {
[x: string]: any;
}>[];

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:517

Get all features whose bounding box intersects the provided extent. Note that this returns an array of all features intersecting the given extent in random order (so it may include features whose geometries do not intersect the extent).

When useSpatialIndex is set to false, this method will return all features.

Parameters

extent

Extent

Extent.

projection?

Projection

Include features where extent exceeds the x-axis bounds of projection and wraps around the world.

Returns

Feature<Geometry, { [x: string]: any; }>[]

Features.

Api

Inherited from

ts
VectorSource.getFeaturesInExtent

getFormat()

ts
getFormat(): 
  | FeatureFormat<Feature<Geometry, {
[x: string]: any;
}>>
  | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:569

Get the format associated with this source.

Returns

| FeatureFormat<Feature<Geometry, { [x: string]: any; }>> | null

} The feature format.

Api

Inherited from

ts
VectorSource.getFormat

getInterpolate()

ts
getInterpolate(): boolean;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:184

Returns

boolean

Use linear interpolation when resampling.

Inherited from

ts
VectorSource.getInterpolate

getKeys()

ts
getKeys(): string[];

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:120

Get a list of object property names.

Returns

string[]

List of property names.

Api

Inherited from

ts
VectorSource.getKeys

getListeners()

ts
getListeners(type): Listener[] | undefined;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/events/Target.d.ts:69

Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.

Parameters

type

string

Type.

Returns

Listener[] | undefined

Listeners.

Inherited from

ts
VectorSource.getListeners

getOverlaps()

ts
getOverlaps(): boolean;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:573

Returns

boolean

The source can have overlapping geometries.

Inherited from

ts
VectorSource.getOverlaps

getProjection()

ts
getProjection(): Projection | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:161

Get the projection of the source.

Returns

Projection | null

Projection.

Api

Inherited from

ts
VectorSource.getProjection

getProperties()

ts
getProperties(): NoInfer<{
[x: string]: any;
}>;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:126

Get an object of all property names and values.

Returns

NoInfer<{ [x: string]: any; }>

Object.

Api

Inherited from

ts
VectorSource.getProperties

getPropertiesInternal()

ts
getPropertiesInternal(): 
  | Partial<NoInfer<{
[x: string]: any;
}>>
  | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:131

Get an object of all property names and values.

Returns

| Partial<NoInfer<{ [x: string]: any; }>> | null

Object.

Inherited from

ts
VectorSource.getPropertiesInternal

getRadius()

ts
getRadius(): number;

Defined in: packages/core-ol/src/sources/superClusterSource.ts:76

聚合像素半径

Returns

number


getResolutions()

ts
getResolutions(projection?): number[] | null;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:166

Parameters

projection?

Projection

Projection.

Returns

number[] | null

Resolutions.

Inherited from

ts
VectorSource.getResolutions

getRevision()

ts
getRevision(): number;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Observable.d.ts:72

Get the version number for this object. Each time the object is modified, its version number will be incremented.

Returns

number

Revision.

Api

Inherited from

ts
VectorSource.getRevision

getSource()

ts
getSource(): VectorSource;

Defined in: packages/core-ol/src/sources/superClusterSource.ts:86

原始(未聚合)数据源

Returns

VectorSource


getState()

ts
getState(): State;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:176

Get the state of the source, see import("./Source.js").State for possible states.

Returns

State

State.

Api

Inherited from

ts
VectorSource.getState

getUrl()

ts
getUrl(): string | FeatureUrlFunction | undefined;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:580

Get the url associated with this source.

Returns

string | FeatureUrlFunction | undefined

The url.

Api

Inherited from

ts
VectorSource.getUrl

getView()

ts
getView(): Promise<ViewOptions>;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:170

Returns

Promise<ViewOptions>

A promise for view-related properties.

Inherited from

ts
VectorSource.getView

getWrapX()

ts
getWrapX(): boolean | undefined;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:180

Returns

boolean | undefined

Wrap X.

Inherited from

ts
VectorSource.getWrapX

hasFeature()

ts
hasFeature(feature): boolean;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:592

Returns true if the feature is contained within the source.

Parameters

feature

Feature

Feature.

Returns

boolean

Has feature.

Api

Inherited from

ts
VectorSource.hasFeature

hasListener()

ts
hasListener(type?): boolean;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/events/Target.d.ts:75

Parameters

type?

string

Type. If not provided, true will be returned if this event target has any listeners.

Returns

boolean

Has listeners.

Inherited from

ts
VectorSource.hasListener

hasProperties()

ts
hasProperties(): boolean;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:135

Returns

boolean

The object has properties.

Inherited from

ts
VectorSource.hasProperties

isEmpty()

ts
isEmpty(): boolean;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:596

Returns

boolean

Is empty.

Inherited from

ts
VectorSource.isEmpty

loadFeatures()

ts
loadFeatures(
   extent, 
   resolution, 
   projection): void;

Defined in: packages/core-ol/src/sources/superClusterSource.ts:188

Parameters

extent

Extent

Extent.

resolution

number

Resolution.

projection

Projection

Projection.

Returns

void

Overrides

ts
VectorSource.loadFeatures

notify()

ts
notify(key, oldValue): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:140

Parameters

key

string

Key name.

oldValue

any

Old value.

Returns

void

Inherited from

ts
VectorSource.notify

onceInternal()

ts
protected onceInternal(type, listener): EventsKey | EventsKey[];

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Observable.d.ts:86

Parameters

type

string | string[]

Type.

listener

(arg0) => unknown

Listener.

Returns

EventsKey | EventsKey[]

Event key.

Inherited from

ts
VectorSource.onceInternal

onInternal()

ts
protected onInternal(type, listener): EventsKey | EventsKey[];

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Observable.d.ts:79

Parameters

type

string | string[]

Type.

listener

(arg0) => unknown

Listener.

Returns

EventsKey | EventsKey[]

Event key.

Inherited from

ts
VectorSource.onInternal

refresh()

ts
refresh(): void;

Defined in: packages/core-ol/src/sources/superClusterSource.ts:91

数据变化后重建聚合

Returns

void

Overrides

ts
VectorSource.refresh

removeChangeListener()

ts
removeChangeListener(key, listener): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:150

Parameters

key

string

Key name.

listener

Listener

Listener.

Returns

void

Inherited from

ts
VectorSource.removeChangeListener

removeEventListener()

ts
removeEventListener(type, listener): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/events/Target.d.ts:80

Parameters

type

string

Type.

listener

Listener

Listener.

Returns

void

Inherited from

ts
VectorSource.removeEventListener

removeFeature()

ts
removeFeature(feature): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:624

Remove a single feature from the source. If you want to batch remove features, use the module:ol/source/Vector~VectorSource#removeFeatures #removeFeatures() method instead.

Parameters

feature

Feature

Feature to remove.

Returns

void

Api

Inherited from

ts
VectorSource.removeFeature

removeFeatureInternal()

ts
protected removeFeatureInternal(feature): boolean;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:631

Remove feature without firing a change event.

Parameters

feature

Feature

Feature.

Returns

boolean

True if the feature was removed, false if it was not found.

Inherited from

ts
VectorSource.removeFeatureInternal

removeFeatures()

ts
removeFeatures(features): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:616

Batch remove features from the source. If you want to remove all features at once, use the module:ol/source/Vector~VectorSource#clear #clear() method instead.

Parameters

features

Feature<Geometry, { [x: string]: any; }>[]

Features to remove.

Returns

void

Api

Inherited from

ts
VectorSource.removeFeatures

removeLoadedExtent()

ts
removeLoadedExtent(extent): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:608

Remove an extent from the list of loaded extents.

Parameters

extent

Extent

Extent.

Returns

void

Api

Inherited from

ts
VectorSource.removeLoadedExtent

set()

ts
set(
   key, 
   value, 
   silent?): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:158

Sets a value.

Parameters

key

string

Key name.

value

any

Value.

silent?

boolean

Update without triggering an event.

Returns

void

Api

Inherited from

ts
VectorSource.set

setAttributions()

ts
setAttributions(attributions): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:197

Set the attributions of the source.

Parameters

attributions

AttributionLike | undefined

Attributions. Can be passed as string, Array<string>, module:ol/source/Source~Attribution, or undefined.

Returns

void

Api

Inherited from

ts
VectorSource.setAttributions

setLoader()

ts
setLoader(loader): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:645

Set the new loader of the source. The next render cycle will use the new loader.

Parameters

loader

FeatureLoader<FeatureLike>

The loader to set.

Returns

void

Api

Inherited from

ts
VectorSource.setLoader

setOverlaps()

ts
setOverlaps(overlaps): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:655

Parameters

overlaps

boolean

The source can have overlapping geometries.

Returns

void

Inherited from

ts
VectorSource.setOverlaps

setProperties()

ts
setProperties(values, silent?): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:166

Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).

Parameters

values

Partial<NoInfer<Properties>>

Values.

silent?

boolean

Update without triggering an event.

Returns

void

Api

Inherited from

ts
VectorSource.setProperties

setRadius()

ts
setRadius(radius): void;

Defined in: packages/core-ol/src/sources/superClusterSource.ts:80

Parameters

radius

number

Returns

void


setState()

ts
setState(state): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Source.d.ts:202

Set the state of the source.

Parameters

state

State

State.

Returns

void

Inherited from

ts
VectorSource.setState

setUrl()

ts
setUrl(url): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/source/Vector.d.ts:651

Points the source to a new url. The next render cycle will use the new url.

Parameters

url

string | FeatureUrlFunction

Url.

Returns

void

Api

Inherited from

ts
VectorSource.setUrl

unInternal()

ts
protected unInternal(type, listener): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Observable.d.ts:93

Unlisten for a certain type of event.

Parameters

type

string | string[]

Type.

listener

(arg0) => unknown

Listener.

Returns

void

Inherited from

ts
VectorSource.unInternal

unset()

ts
unset(key, silent?): void;

Defined in: node_modules/.pnpm/ol@10.9.0/node_modules/ol/Object.d.ts:179

Unsets a property.

Parameters

key

string

Key name.

silent?

boolean

Unset without triggering an event.

Returns

void

Api

Inherited from

ts
VectorSource.unset