Optional
apiKey?: stringAccess key to Geoportal platform
Optional
configuration?: anyconfiguration (cf. example)
Optional
description?: stringdescription of the layer
Layer name (e.g. "")
Optional
legends?: any[]Legends objects associated to the layer
Optional
maxFeatures?: numbermaximum features (max: 5000)
Optional
metadata?: any[]Metadata objects associated to the layer
Optional
olParams?: anyother options for ol.source.Vector function (see ol.source.Vector)
Optional
quicklookUrl?: stringquicklookUrl of the layer
Optional
ssl?: booleanif set true, enforce protocol https (only for nodejs)
Optional
title?: stringtitle of the layer
Protected
disposedThe object has already been disposed.
This source is currently loading data. Sources that defer loading to the
map's tile queue never set this to true
.
Protected
projectionProtected
viewProtected
viewKey name.
Listener.
Type.
Listener.
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.
Feature to add.
Protected
addProtected
Add a feature without firing a change
event.
Feature.
Protected
addProtected
Add features without firing a change
event.
Features.
Protected
applyProtected
Apply any properties from another object without triggering events.
The source object.
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.
Event object.
false
if anyone called preventDefault on the
event object or if any of the listeners returned false.
Clean up.
Protected
disposeProtected
Extension point for disposable objects.
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.
Called with each feature on the source. Return a truthy value to stop iteration.
The return value from the last call to the callback.
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.
Coordinate.
Called with each feature whose goemetry contains the provided coordinate.
The return value from the last call to the callback.
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().
Extent.
Called with each feature whose bounding box intersects the provided extent.
The return value from the last call to the callback.
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.
Extent.
Called with each feature whose geometry intersects the provided extent.
The return value from the last call to the callback.
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.
Coordinate.
Optional
filter: (arg0: Feature) => booleanFeature 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.
Closest feature (or null
if none found).
Get the extent of the features currently in the source.
This method is not available when the source is configured with
useSpatialIndex
set to false
.
Optional
extent: ExtentDestination extent. If provided, no new extent will be created. Instead, that extent's coordinates will be overwritten.
Extent.
Get a feature by its identifier (the value returned by feature.getId()). When RenderFeature
s
are used, getFeatureById()
can return an array of RenderFeature
s. 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
.
Feature identifier.
The feature (or null
if not found).
Get a feature by its internal unique identifier (using getUid
).
Feature identifier.
The feature (or null
if not found).
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.
Extent.
Optional
projection: ProjectionInclude features
where extent
exceeds the x-axis bounds of projection
and wraps around the world.
Features.
Use linear interpolation when resampling.
Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.
Type.
Listeners.
The source can have overlapping geometries.
Get an object of all property names and values.
Object.
Optional
projection: ProjectionProjection.
Resolutions.
A promise for view-related properties.
Wrap X.
Optional
type: stringType. If not provided,
true
will be returned if this event target has any listeners.
Has listeners.
The object has properties.
Is empty.
Extent.
Resolution.
Projection.
Key name.
Old value.
Protected
onceProtected
onKey name.
Listener.
Type.
Listener.
Protected
removeProtected
Remove feature without firing a change
event.
Feature.
True if the feature was removed, false if it was not found.
The source can have overlapping geometries.
Set the state of the source.
State.
Protected
unProtected
Unlisten for a certain type of event.
Type.
Listener.
options for function call.