Skip to content

Commit

Permalink
feat(geojson): Add to/from GeoJSON functions
Browse files Browse the repository at this point in the history
refs #1
  • Loading branch information
trevorgerhardt committed Jul 5, 2016
1 parent 6f719c7 commit 5615694
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

module.exports = normalize
module.exports.fromCoordinates = fromCoordinates
module.exports.fromCoordinates = module.exports.fromGeoJSON = fromCoordinates
module.exports.fromLatlng = fromLatlng
module.exports.fromPoint = fromPoint
module.exports.fromString = fromString
Expand All @@ -17,7 +17,7 @@ module.exports.isEqual = function (latlng1, latlng2, epsilon) {
return (Math.abs(latlng1.lat - latlng2.lat) <= epsilon) && (Math.abs(latlng1.lng - latlng2.lng) <= epsilon)
}

module.exports.toCoordinates = function toCoordinates (input) {
module.exports.toCoordinates = module.exports.toGeoJSON = function toCoordinates (input) {
var ll = normalize(input)
return [ll.lng, ll.lat]
}
Expand Down

0 comments on commit 5615694

Please sign in to comment.