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.5 to 2.1.6

test/fixtures/empty.json

12

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

@@ -20,10 +20,10 @@ "homepage": "https://github.com/mapbox/geojson-vt",

"benchmark": "^1.0.0",
"browserify": "^11.0.1",
"browserify": "^11.1.0",
"coveralls": "^2.11.4",
"eslint": "^1.1.0",
"eslint": "^1.5.0",
"faucet": "0.0.1",
"istanbul": "^0.3.17",
"tape": "^4.1.0",
"istanbul": "^0.3.20",
"tape": "^4.2.0",
"uglify-js": "^2.4.24",
"watchify": "^3.3.1"
"watchify": "^3.4.0"
},

@@ -30,0 +30,0 @@ "license": "ISC",

## geojson-vt — GeoJSON Vector Tiles
[![Build Status](https://travis-ci.org/mapbox/geojson-vt.svg)](https://travis-ci.org/mapbox/geojson-vt)
[![Build Status](https://travis-ci.org/mapbox/geojson-vt.svg?branch=master)](https://travis-ci.org/mapbox/geojson-vt)
[![Coverage Status](https://coveralls.io/repos/mapbox/geojson-vt/badge.svg)](https://coveralls.io/r/mapbox/geojson-vt)

@@ -12,4 +12,4 @@

but can be useful in other visualization platforms
like [Leaflet](https://github.com/Leaflet/Leaflet) and [d3](https://github.com/mbostock/d3).
It can also be easily used on the server as well.
like [Leaflet](https://github.com/Leaflet/Leaflet) and [d3](https://github.com/mbostock/d3),
as well as Node.js server applications.

@@ -22,2 +22,6 @@ Resulting tiles conform to the JSON equivalent

Read more on how the library works [on the Mapbox blog](https://www.mapbox.com/blog/introducing-geojson-vt/).
There's a C++11 port: [geojson-vt-cpp](https://github.com/mapbox/geojson-vt-cpp)
### Demo

@@ -30,6 +34,4 @@

There's a convenient debug page to test out **geojson-vt** on different data.
Make sure you have the [dev version built](#browser-builds);
open `debug/index.html` in your browser,
and drag any GeoJSON on the page, watching the console.
There's a convenient [debug page](http://mapbox.github.io/geojson-vt/debug/) to test out **geojson-vt** on different data.
Just drag any GeoJSON on the page, watching the console.

@@ -57,3 +59,3 @@ ![](https://cloud.githubusercontent.com/assets/25395/5363235/41955c6e-7fa8-11e4-9575-a66ef54cb6d9.gif)

```js
var tileIndes = geojsonvt(data, {
var tileIndex = geojsonvt(data, {
maxZoom: 14, // max zoom to preserve detail on

@@ -81,2 +83,7 @@ tolerance: 3, // simplification tolerance (higher means simpler)

##### 2.1.6 (Sep 22, 2015)
- Fixed a bug where `getTile` could generate a lot of unnecessary tiles.
- Fixed a bug where an empty GeoJSON generated tiles.
##### 2.1.5 (Aug 14, 2015)

@@ -83,0 +90,0 @@

@@ -39,6 +39,6 @@ 'use strict';

// start slicing from the top tile down
this.splitTile(features, 0, 0, 0);
if (features.length) this.splitTile(features, 0, 0, 0);
if (debug) {
console.log('features: %d, points: %d', this.tiles[0].numFeatures, this.tiles[0].numPoints);
if (features.length) console.log('features: %d, points: %d', this.tiles[0].numFeatures, this.tiles[0].numPoints);
console.timeEnd('generate tiles');

@@ -114,3 +114,3 @@ console.log('tiles generated:', this.total, JSON.stringify(this.stats));

var m = 1 << (cz - z);
if (x !== Math.floor(cx / m) && y !== Math.floor(cy / m)) continue;
if (x !== Math.floor(cx / m) || y !== Math.floor(cy / m)) continue;
}

@@ -117,0 +117,0 @@

@@ -27,4 +27,9 @@ 'use strict';

test('empty geojson', function (t) {
t.same(genTiles(getJSON('empty.json')), {});
t.end();
});
function getJSON(name) {
return JSON.parse(fs.readFileSync(path.join(__dirname, '/fixtures/' + name)));
}

@@ -30,2 +30,4 @@ 'use strict';

t.equal(index.total, 29);
t.end();

@@ -32,0 +34,0 @@ });

Sorry, the diff of this file is not supported yet

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