diff --git a/packages/turf-isolines/README.md b/packages/turf-isolines/README.md index 72f5757aa8..a16d481355 100644 --- a/packages/turf-isolines/README.md +++ b/packages/turf-isolines/README.md @@ -8,15 +8,16 @@ value breaks and generates [isolines](http://en.wikipedia.org/wiki/Isoline). **Parameters** - `points` **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)<[Point](http://geojson.org/geojson-spec.html#point)>** input points -- `z` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the property name in `points` from which z-values will be pulled -- `resolution` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** resolution of the underlying grid -- `breaks` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>** where to draw contours +- `breaks` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>** values of `zProperty` where to draw isolines +- `zProperty` **\[[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** the property name in `points` from which z-values will be pulled (optional, default `'elevation'`) +- `propertiesToAllIsolines` **\[[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)]** GeoJSON properties passed to ALL isolines (optional, default `{}`) +- `propertiesPerIsoline` **\[[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)>]** GeoJSON properties passed, in order, to the correspondent + isoline; the breaks array will define the order in which the isolines are created (optional, default `[]`) **Examples** ```javascript -// create random points with random -// z-values in their properties +// create random points with random z-values in their properties var points = turf.random('point', 100, { bbox: [0, 30, 20, 50] }); @@ -24,11 +25,13 @@ for (var i = 0; i < points.features.length; i++) { points.features[i].properties.z = Math.random() * 10; } var breaks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; -var isolined = turf.isolines(points, 'z', 15, breaks); -//=isolined +var isolines = turf.isolines(points, breaks, 'temperature'); + +//addToMap +var addToMap = [isolines]; ``` -Returns **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)<[LineString](http://geojson.org/geojson-spec.html#linestring)>** isolines +Returns **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)<[MultiLineString](http://geojson.org/geojson-spec.html#multilinestring)>** a FeatureCollection of [MultiLineString](http://geojson.org/geojson-spec.html#multilinestring) features representing isolines