The ruler state is described by a string consisting of sequences separated by the "~" symbol. Each sequence is a substring in the format "longitude,latitude" that describes the increment in coordinates relative to the previous ruler point.

The ruler state is described by a string consisting of sequences separated by the "~" symbol. Each sequence is a substring in the format "longitude,latitude" that describes the increment in coordinates relative to the previous ruler point.

Fields details

geometry

// Setting coordinates of the first point on the ruler.
myMap.behaviors.get('ruler').geometry.set(0, [0, 0]);

Methods details

close

{Boolean} close()

Deletes all the points on the ruler. If the current number of points is more than two, confirmation of this action will be requested.

Returns true, if the action was completed successfully.

getState

{String} getState()

The ruler state is described by a string consisting of sequences separated by the "~" symbol. Each sequence is a substring in the format "longitude,latitude" that describes the increment in coordinates relative to the previous ruler point.