Class for assisting with making measurements on an OpenLayers map
Classes
Methods
(inner) getMeasurementFeatures(sourceOrCollection) → {Array.<ol/Feature>}
Extracts features with measurements from vector Source object, OpenLayers collection
Parameters:
Name | Type | Description |
---|---|---|
sourceOrCollection |
Array.<ol/Source/Vector> | ol/Collection.<ol/Feature> | Vector source or collection of features |
Returns:
All features found with measurements
- Type
- Array.<ol/Feature>
(inner) clearMeasurementFeatures(sourceOrCollection) → {Array.<ol/Feature>}
Removes features with measurements from vector Source object, OpenLayers collection
Parameters:
Name | Type | Description |
---|---|---|
sourceOrCollection |
Array.<ol/Source/Vector> | ol/Collection.<ol/Feature> | Vector source or collection of features |
Returns:
removed features
- Type
- Array.<ol/Feature>
(inner) generateMeasurementText(feature, formattersopt) → {ol/style/Text~Text}
Creates an OpenLayers text style object
containing a formatted measurement value placed in the middle of the feature's geometry (or nearest internal point)
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
feature |
ol/Feature | Feature for which to calculate and update with measurements |
|||||||||||||
formatters |
Object |
<optional> |
Optional object for overriding default text formatting functions Properties
|
Returns:
Text style object containing static text property for measurement
- Type
- ol/style/Text~Text