Skip to main content

interface

BaseData

Properties

LabelVisibilitySettings

The list of visibility settings for label groups.
Properties
area?
boolean
Rule for area. Used with 'polygon'-mode. Enabled by default.
perimeter?
boolean
Rule for distance labels on perimeter. Enabled by default.
snapPoint?
boolean
Rule for snap point label. Enabled by default.

PolygonData

Properties
area
number
coordinates
GeoPoint[][]
lengths
number[]
perimeter
number
type
"polygon"

PolylineData

Properties
coordinates
GeoPoint[]
length
number
lengths
number[]
type
"polyline"

RulerControlOptions

Properties
enabled?
boolean
Specifies whether the ruler should be enabled after control initialization.
jointFactory?
Custom joint factory function, useful for styling
mode?
Sets ruler's behavior. Specifies whether the ruler should be in measuring mode of the distance of a polyline or the area of a polygon.
polygonOptions?
Polygon drawing options.
polylineOptions?
Polyline drawing options.
snapPointFactory?
Custom snap point factory function, useful for styling

RulerEvent

Properties
data
isUser
boolean
True if it was user interaction

RulerEventTable

The list of events that can be emitted by a Ruler instance.
Properties
change
Emitted when the points are changed.

RulerOptions

Ruler initialization options.
Properties
enabled?
boolean
Specifies whether the ruler should be drawn on its initialization.
jointFactory?
labelVisibilitySettings?
Specifies whether the labels should be drawn. Optional.
mode?
Sets ruler's behavior. Specifies whether the ruler should be in measuring mode of the distance of a polyline or the area of a polygon. Optional. `polyline` by default
points?
GeoPoint[]
An array of geographical points [longitude, latitude]. Optional.
polygonOptions?
polylineOptions?
snapPointFactory?

RulerPolylineOptions

Properties
autoClosePolygon?
boolean
lineBorder2Color?
string
lineBorder2Width?
number
lineBorderColor?
string
lineBorderWidth?
number
lineColor?
string
lineWidth?
number
previewLineColor?
string