Extends
Classes
Methods
# clone() → {Measure}
Clone this feature. If the original feature has a geometry it is also cloned.
- Overrides:
The clone.
# getBoundingBox() → {Extent}
Get extent/bounding box for feature geometry in geographic coordinates [minx, miny, maxx, maxy]
- Overrides:
bounding box
# getGeometry() → {Geometry}
Get the feature's default geometry
- Overrides:
The geometry for the feature.
# getKeys() → {Array.<string>}
Get a list of object property names.
- Overrides:
List of property names.
# getMeasurementInfo() → {Measure~Data}
Get all measurement info for this measure
measurement info for this shape
# getProperties() → {Object.<string, *>}
Get an object of all property names and values.
- Overrides:
Object.
# set(key, value)
Sets a value.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | Key name. |
value |
any | Value. |
- Overrides:
# setGeometry(geometry)
Set the default geometry for the feature.
Parameters:
Name | Type | Description |
---|---|---|
geometry |
Geometry | The new geometry. |
- Overrides:
# setProperties(values)
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:
Name | Type | Description |
---|---|---|
values |
Object.<string, *> | Values. |
- Overrides:
# setStyle(styleopt)
Set the style for the feature to override the layer style. This can be a single style object, an array of styles, or a function that takes a resolution and returns an array of styles. To unset the feature style, call setStyle()
without arguments or a falsey value.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
style |
Style |
<optional> |
Style for this feature. |
- Overrides:
# toGeoJSON() → {string}
Convert feature geometry to GeoJSON string with xy coordinates [long, lat]
- Overrides:
# toWKT() → {string}
Convert feature geometry to WKT string with xy coordinates [long, lat]
- Overrides:
Events
# FEATURE_CLICK
Event triggered when measure receives a click
Parameters:
Name | Type | Description |
---|---|---|
location |
Location | Location with the coordinates for this event |
measure |
Measure | Measure clicked |
layer |
VectorLayer | Layer for this feature |
- Overrides:
# FEATURE_HOVER
Event triggered when hovering over a measure
Parameters:
Name | Type | Description |
---|---|---|
location |
Location | Location with the coordinates for this event |
layer |
VectorLayer | Layer for this feature |
hover |
boolean | If the feature it's hover or not. False it's triggered when pointer not intersect when the geometry |
- Overrides: