New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

geojson-vt

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geojson-vt - npm Package Compare versions

Comparing version 2.1.4 to 2.1.5

2

package.json
{
"name": "geojson-vt",
"version": "2.1.4",
"version": "2.1.5",
"description": "Slice GeoJSON data into vector tiles efficiently",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/mapbox/geojson-vt",

@@ -43,2 +43,5 @@ ## geojson-vt — GeoJSON Vector Tiles

var features = tileIndex.getTile(z, x, y).features;
// show an array of tile coordinates created so far
console.log(tileIndex.tileCoords); // [{z: 0, x: 0, y: 0}, ...]
```

@@ -75,2 +78,6 @@

##### 2.1.5 (Aug 14, 2015)
- Added `tileCoords` property with an array of coordinates of all tiles created so far.
##### 2.1.4 (Aug 14, 2015)

@@ -77,0 +84,0 @@

@@ -26,2 +26,3 @@ 'use strict';

this.tiles = {};
this.tileCoords = [];

@@ -63,6 +64,3 @@ if (debug) {

options = this.options,
debug = options.debug,
extent = options.extent,
buffer = options.buffer,
solidChildren = options.solidChildren;
debug = options.debug;

@@ -79,3 +77,3 @@ // avoid recursion by using a processing queue

tile = this.tiles[id],
tileTolerance = z === options.maxZoom ? 0 : options.tolerance / (z2 * extent);
tileTolerance = z === options.maxZoom ? 0 : options.tolerance / (z2 * options.extent);

@@ -86,2 +84,3 @@ if (!tile) {

tile = this.tiles[id] = createTile(features, z2, x, y, tileTolerance, z === options.maxZoom);
this.tileCoords.push({z: z, x: x, y: y});

@@ -104,3 +103,3 @@ if (debug) {

// stop tiling if the tile is solid clipped square
if (!solidChildren && isClippedSquare(tile, extent, buffer)) continue;
if (!options.solidChildren && isClippedSquare(tile, options.extent, options.buffer)) continue;

@@ -128,3 +127,3 @@ // if it's the first-pass tiling

// values we'll use for clipping
var k1 = 0.5 * buffer / extent,
var k1 = 0.5 * options.buffer / options.extent,
k2 = 0.5 - k1,

@@ -131,0 +130,0 @@ k3 = 0.5 + k1,

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