TsGeo - Resources - Polyline

A Polyline class consists of an ordered list of locations (coordinates).

Public Methods

addPoint(point: Coordinate)

Add new Coordinate point in the object .

getPoints()

Return an array of all points (Array<Coordinate>)

getLats()

Return an array of all latitudes (Array)

getLngs()

Return an array of all longitudes (Array)

getNumberOfPoints()

Return the number of points (number)

format(formatter: FormatterInterface)

Return a string of this Polyline object using the formatter (string)

getSegments()

Return a array of Line for each segment of Polyline object (Array<Line>)

getLength(calculator: DistanceInterface)

Return the length of Polyline (Distance between the first and end point, where each point is used) using the calculator (number)

getReverse()

Return a Polyline of where the points are reversed (Polyline)

Line Back Polygon


Add a comment