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.
Geometry
# getKeys() → {Array.<string>}
Get a list of object property names.
- Overrides:
List of property names.
Array.<string>
# 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.
Object.<string, *>
# 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:
string
# toWKT() → {string}
Convert feature geometry to WKT string with xy coordinates [long, lat]
- Overrides:
string
Type Definitions
Object
# Data
Object with measure information for entire geometry
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
distances |
Array.<Measure~Info>
|
<optional> |
length info for each segment |
length |
Measure~Info
|
<optional> |
total length for geometry, perimeter in polygon or total length in line |
elevation |
Measure~Info
|
<optional> |
value with the elevation over the survey where we take the measures could be dsm or dtm. Only for points |
ground |
Measure~Info
|
<optional> |
value with the elevation over the ground(DTM). Only for points |
location |
object
|
<optional> |
object with the location in [long,lat] and also the units for this coordinate. Only in points |
slopes |
Array.<Measure~Slope>
|
<optional> |
slopes values for each segment in a polygon |
slope |
Measure~Slope
|
<optional> |
slope values for polygon with the max slope for this polygon, only if is planar |
info |
object
|
information for the type of the measure, if is 2d/3d and the surface where we project the data to calculate the Z value |
Object
# Info
Object with measure information
Properties:
Name | Type | Description |
---|---|---|
value |
number
|
Value for this measure |
unit |
string
|
Unit for this measure |
valuePretty |
string
|
Value formatted for this measure |
Object
# Slope
Object with slope information for
Properties:
Name | Type | Description |
---|---|---|
value |
number
|
Value for this measure |
unit |
string
|
Unit for this measure |
valuePretty |
string
|
Value formatted for this measure |
pitch |
number
|
pitch value in radians |
rise |
number
|
rise measure for this length |
run |
number
|
run value for this length |
planar |
boolean
|
If the geometry it's planar or not |
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: