new ol.FeatureOverlay(opt_options) experimental
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Options.
|
Methods
-
addFeature(feature) experimental
src/ol/featureoverlay.js, line 103 -
Add a feature to the overlay.
Name Type Description feature
ol.Feature Feature.
-
getFeatures(){ol.Collection.<ol.Feature>} experimental
src/ol/featureoverlay.js, line 113 -
Get the features on the overlay.
Returns:
Features collection.
-
getMap(){ol.Map} experimental
src/ol/featureoverlay.js, line 123 -
Get the map associated with the overlay.
Returns:
The map with which this feature overlay is associated.
-
getStyle(){ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction} experimental
src/ol/featureoverlay.js, line 314 -
Get the style for features. This returns whatever was passed to the
style
option at construction or to thesetStyle
method.Returns:
Overlay style.
-
getStyleFunction(){ol.style.StyleFunction|undefined} experimental
src/ol/featureoverlay.js, line 324 -
Get the style function.
Returns:
Style function.
-
removeFeature(feature) experimental
src/ol/featureoverlay.js, line 221 -
Remove a feature from the overlay.
Name Type Description feature
ol.Feature The feature to be removed.
-
setFeatures(features) experimental
src/ol/featureoverlay.js, line 241 -
Set the features for the overlay.
Name Type Description features
ol.Collection.<ol.Feature> Features collection.
-
setMap(map) experimental
src/ol/featureoverlay.js, line 276 -
Set the map for the overlay.
Name Type Description map
ol.Map Map.
-
setStyle(style) experimental
src/ol/featureoverlay.js, line 300 -
Set the style for features. This can be a single style object, an array of styles, or a function that takes a feature and resolution and returns an array of styles.
Name Type Description style
ol.style.Style | Array.<ol.style.Style> | ol.style.StyleFunction Overlay style.