Comparing version 0.5.3 to 0.6.0
16
index.js
// a tile is an array [x,y,z] | ||
var bboxPolygon = require('turf-bbox-polygon'); | ||
var d2r = Math.PI / 180, | ||
@@ -16,3 +14,15 @@ r2d = 180 / Math.PI; | ||
function tileToGeoJSON (tile) { | ||
return bboxPolygon(tileToBBOX(tile)); | ||
var bbox = tileToBBOX(tile); | ||
var poly = { | ||
type: 'Polygon', | ||
coordinates: | ||
[ | ||
[bbox[0],bbox[1]], | ||
[bbox[0], bbox[3]], | ||
[bbox[2], bbox[3]], | ||
[bbox[2], bbox[1]], | ||
[bbox[0], bbox[1]] | ||
] | ||
}; | ||
return poly; | ||
} | ||
@@ -19,0 +29,0 @@ |
{ | ||
"name": "tilebelt", | ||
"version": "0.5.3", | ||
"version": "0.6.0", | ||
"description": "simple tile utilities", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,3 +10,3 @@ var test = require('tape'), | ||
t.ok(geojson, 'get geojson representation of tile'); | ||
t.equal(geojson.geometry.type, 'Polygon'); | ||
t.equal(geojson.type, 'Polygon'); | ||
t.end(); | ||
@@ -13,0 +13,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
12422
309