Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 809 Bytes

README.md

File metadata and controls

43 lines (31 loc) · 809 Bytes

esri-extent

Get the Esri-formatted extent of a GeoJSON feature collection.

Install

npm install esri-extent

Usage

var esriExtent = require('esri-extent')
var example = require('./test/geojson-spec-example.json')

var extent = esriExtent(example)

// OR

esriExtent(example, function (err, extent) {
  if (err) throw err

  console.log(extent)
  // {
  //   xmin: 100,
  //   ymin: 0,
  //   xmax: 105,
  //   ymax: 1,
  //   spatialReference: {
  //     wkid: 4326,
  //     latestWkid: 4326
  //   }
  // }
})

License

ISC