Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tilebelt

Package Overview
Dependencies
Maintainers
22
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tilebelt - npm Package Compare versions

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 @@

2

package.json
{
"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 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc