index.d.ts 547 B

1234567891011121314151617
  1. import { BBox } from "@turf/helpers";
  2. /**
  3. * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
  4. *
  5. * @name bbox
  6. * @param {GeoJSON} geojson any GeoJSON object
  7. * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
  8. * @example
  9. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
  10. * var bbox = turf.bbox(line);
  11. * var bboxPolygon = turf.bboxPolygon(bbox);
  12. *
  13. * //addToMap
  14. * var addToMap = [line, bboxPolygon]
  15. */
  16. declare function bbox(geojson: any): BBox;
  17. export default bbox;