diff --git a/packages/turf-isobands/README.md b/packages/turf-isobands/README.md index 11dcccffe4..bade4c4b3c 100644 --- a/packages/turf-isobands/README.md +++ b/packages/turf-isobands/README.md @@ -27,7 +27,7 @@ for (var i = 0; i < pointGrid.features.length; i++) { pointGrid.features[i].properties.elevation = Math.random() * 10; } var breaks = [0, 5, 8.5]; -var isobands = turf.isobands(pointGrid, breaks, 'temp'); +var isobands = turf.isobands(pointGrid, breaks); //addToMap var addToMap = [isobands]; diff --git a/packages/turf-isobands/index.js b/packages/turf-isobands/index.js index 2c83564881..683cc6cca8 100644 --- a/packages/turf-isobands/index.js +++ b/packages/turf-isobands/index.js @@ -34,7 +34,7 @@ var featureCollection = helpers.featureCollection; * pointGrid.features[i].properties.elevation = Math.random() * 10; * } * var breaks = [0, 5, 8.5]; - * var isobands = turf.isobands(pointGrid, breaks, 'temp'); + * var isobands = turf.isobands(pointGrid, breaks); * * //addToMap * var addToMap = [isobands]; @@ -46,6 +46,7 @@ module.exports = function (pointGrid, breaks, zProperty, options) { }; collectionOf(pointGrid, 'Point', 'Input must contain Points'); if (!breaks || !Array.isArray(breaks)) throw new Error('breaks is required'); + options = options || {}; if (options.commonProperties && !isObject(options.commonProperties)) { throw new Error('commonProperties is not an Object'); } @@ -55,7 +56,6 @@ module.exports = function (pointGrid, breaks, zProperty, options) { if (zProperty && typeof zProperty !== 'string') { throw new Error('zProperty is not a string'); } zProperty = zProperty || 'elevation'; - options = options || {}; var commonProperties = options.commonProperties || {}; var isobandProperties = options.isobandProperties || [];