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 1.0.0 to 1.0.1

.nyc_output/38355.json

16

index.js

@@ -7,3 +7,3 @@ // a tile is an array [x,y,z]

var e = tile2lon(tile[0]+1,tile[2]);
var w = tile2lon(tile[0],tile[2]);
var w = tile2lon(tile[0],tile[2]);
var s = tile2lat(tile[1]+1,tile[2]);

@@ -18,3 +18,3 @@ var n = tile2lat(tile[1],tile[2]);

type: 'Polygon',
coordinates:
coordinates:
[

@@ -170,9 +170,7 @@ [

function pointToTileFraction(lon, lat, z) {
var latr = lat*d2r,
z2 = Math.pow(2, z);
return [
(lon+180)/360*z2,
(1-Math.log(Math.tan(latr) + 1/Math.cos(latr))/Math.PI)/2 *z2,
z
];
var sin = Math.sin(lat * d2r),
z2 = Math.pow(2, z),
x = z2 * (lon / 360 + 0.5),
y = z2 * (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI);
return [x, y, z];
}

@@ -179,0 +177,0 @@

{
"name": "tilebelt",
"version": "1.0.0",
"version": "1.0.1",
"description": "simple tile utilities",
"main": "index.js",
"scripts": {
"test": "tap test.js --cov"
"test": "tap test.js --cov",
"bench": "node bench.js"
},

@@ -26,5 +27,5 @@ "repository": {

"benchmark": "~1.0.0",
"tap": "^1.2.0"
"tap": "^1.3.4"
},
"dependencies": {}
}

@@ -47,1 +47,7 @@ tilebelt

```
## benchmarks
```bash
npm run bench
```
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