Generate a Well-Known Text (WKT) string from coordinates.
coords
Float64Array
[lng0, lat0, lng1, lat1, ...]
geometry_type
"POINT"
"LINESTRING"
"POLYGON"
"MULTIPOINT"
const wkt = toWkt(coords, "LINESTRING"); Copy
const wkt = toWkt(coords, "LINESTRING");
Generate a Well-Known Text (WKT) string from coordinates.
Arguments
coords: FlatFloat64Array[lng0, lat0, lng1, lat1, ...].geometry_type: Geometry type string:"POINT","LINESTRING","POLYGON","MULTIPOINT".Example