JSPM

turf-linestring

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1848
  • Score
    100M100P100Q164475F
  • License MIT

turf lineString module

Package Exports

  • turf-linestring

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (turf-linestring) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

turf-linestring

Build Status

Creates a geojson linestring Feature based on a coordinate array. Properties can be added optionally.

var linestring = require('turf-linestring')

var linestring1 = linestring([[102.0, -10.0], [103.0, 1.0], [104.0, 0.0], [130.0, 4.0]])
var linestring2 = linestring([[102.0, -10.0], [103.0, 1.0], [104.0, 0.0], [130.0, 4.0]],
  {name: 'line 1', distance: 145})
  
console.log(linestring1)
console.log(linestring2)