turf-linestring
Advanced tools
Comparing version 0.1.0 to 0.1.1
module.exports = function(coordinates, properties){ | ||
if(coordinates === null) return new Error('No coordinates passed') | ||
if(!coordinates) return new Error('No coordinates passed') | ||
var linestring = { | ||
@@ -12,2 +12,2 @@ "type": "Feature", | ||
return linestring | ||
} | ||
} |
{ | ||
"name": "turf-linestring", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "turf lineString module", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
turf-linestring | ||
=============== | ||
[![Build Status](https://travis-ci.org/Turfjs/turf-linestring.svg?branch=master)](https://travis-ci.org/Turfjs/turf-linestring) | ||
Creates a geojson linestring Feature based on a coordinate array. Properties can be added optionally. | ||
```js | ||
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) | ||
``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3483
7
21
16