@turf/envelope
Advanced tools
Comparing version 4.5.2 to 4.6.0
43
index.js
@@ -9,37 +9,9 @@ var bbox = require('@turf/bbox'); | ||
* @param {FeatureCollection|Feature<any>} geojson input features | ||
* @return {Feature<Polygon>} a rectangular Polygon feature that encompasses all vertices | ||
* @returns {Feature<Polygon>} a rectangular Polygon feature that encompasses all vertices | ||
* @example | ||
* var features = { | ||
* "type": "FeatureCollection", | ||
* "features": [ | ||
* { | ||
* "type": "Feature", | ||
* "properties": { | ||
* "name": "Location A" | ||
* }, | ||
* "geometry": { | ||
* "type": "Point", | ||
* "coordinates": [-75.343, 39.984] | ||
* } | ||
* }, { | ||
* "type": "Feature", | ||
* "properties": { | ||
* "name": "Location B" | ||
* }, | ||
* "geometry": { | ||
* "type": "Point", | ||
* "coordinates": [-75.833, 39.284] | ||
* } | ||
* }, { | ||
* "type": "Feature", | ||
* "properties": { | ||
* "name": "Location C" | ||
* }, | ||
* "geometry": { | ||
* "type": "Point", | ||
* "coordinates": [-75.534, 39.123] | ||
* } | ||
* } | ||
* ] | ||
* }; | ||
* var features = turf.featureCollection([ | ||
* turf.point([-75.343, 39.984], {"name": "Location A"}), | ||
* turf.point([-75.833, 39.284], {"name": "Location B"}), | ||
* turf.point([-75.534, 39.123], {"name": "Location C"}) | ||
* ]); | ||
* | ||
@@ -49,7 +21,6 @@ * var enveloped = turf.envelope(features); | ||
* //addToMap | ||
* var addToMap = [features, enveloped] | ||
* var addToMap = [features, enveloped]; | ||
*/ | ||
module.exports = function (geojson) { | ||
return bboxPolygon(bbox(geojson)); | ||
}; |
{ | ||
"name": "@turf/envelope", | ||
"version": "4.5.2", | ||
"version": "4.6.0", | ||
"description": "turf envelope module", | ||
@@ -37,5 +37,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"@turf/bbox": "^4.5.2", | ||
"@turf/bbox-polygon": "^4.5.2" | ||
"@turf/bbox": "^4.6.0", | ||
"@turf/bbox-polygon": "^4.6.0" | ||
} | ||
} |
@@ -14,35 +14,7 @@ # @turf/envelope | ||
```javascript | ||
var features = { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"name": "Location A" | ||
}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [-75.343, 39.984] | ||
} | ||
}, { | ||
"type": "Feature", | ||
"properties": { | ||
"name": "Location B" | ||
}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [-75.833, 39.284] | ||
} | ||
}, { | ||
"type": "Feature", | ||
"properties": { | ||
"name": "Location C" | ||
}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [-75.534, 39.123] | ||
} | ||
} | ||
] | ||
}; | ||
var features = turf.featureCollection([ | ||
turf.point([-75.343, 39.984], {"name": "Location A"}), | ||
turf.point([-75.833, 39.284], {"name": "Location B"}), | ||
turf.point([-75.534, 39.123], {"name": "Location C"}) | ||
]); | ||
@@ -52,3 +24,3 @@ var enveloped = turf.envelope(features); | ||
//addToMap | ||
var addToMap = [features, enveloped] | ||
var addToMap = [features, enveloped]; | ||
``` | ||
@@ -55,0 +27,0 @@ |
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
4549
33
52
Updated@turf/bbox@^4.6.0
Updated@turf/bbox-polygon@^4.6.0