@turf/sample
Advanced tools
Comparing version 4.1.0 to 4.2.0
@@ -14,7 +14,10 @@ // http://stackoverflow.com/questions/11935175/sampling-a-random-subset-from-an-array | ||
* | ||
* //=points | ||
* | ||
* var sample = turf.sample(points, 10); | ||
* | ||
* //=sample | ||
* //addToMap | ||
* var addToMap = [points, sample] | ||
* turf.featureEach(sample, function (currentFeature) { | ||
* currentFeature.properties['marker-size'] = 'large'; | ||
* currentFeature.properties['marker-color'] = '#000'; | ||
* }); | ||
*/ | ||
@@ -21,0 +24,0 @@ module.exports = function (featurecollection, num) { |
{ | ||
"name": "@turf/sample", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "turf sample module", | ||
@@ -34,7 +34,7 @@ "main": "index.js", | ||
"tape": "^3.5.0", | ||
"@turf/helpers": "^4.1.0" | ||
"@turf/helpers": "^4.2.0" | ||
}, | ||
"dependencies": { | ||
"@turf/helpers": "^4.1.0" | ||
"@turf/helpers": "^4.2.0" | ||
} | ||
} |
@@ -17,7 +17,10 @@ # @turf/sample | ||
//=points | ||
var sample = turf.sample(points, 10); | ||
//=sample | ||
//addToMap | ||
var addToMap = [points, sample] | ||
turf.featureEach(sample, function (currentFeature) { | ||
currentFeature.properties['marker-size'] = 'large'; | ||
currentFeature.properties['marker-color'] = '#000'; | ||
}); | ||
``` | ||
@@ -24,0 +27,0 @@ |
5815
57
53
Updated@turf/helpers@^4.2.0