geojson-vt
Advanced tools
Comparing version 2.1.3 to 2.1.4
{ | ||
"name": "geojson-vt", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "Slice GeoJSON data into vector tiles efficiently", | ||
@@ -20,10 +20,10 @@ "homepage": "https://github.com/mapbox/geojson-vt", | ||
"benchmark": "^1.0.0", | ||
"browserify": "^10.2.4", | ||
"coveralls": "^2.11.2", | ||
"eslint": "^0.22.1", | ||
"browserify": "^11.0.1", | ||
"coveralls": "^2.11.4", | ||
"eslint": "^1.1.0", | ||
"faucet": "0.0.1", | ||
"istanbul": "^0.3.15", | ||
"tape": "^4.0.0", | ||
"uglify-js": "^2.4.23", | ||
"watchify": "^3.2.2" | ||
"istanbul": "^0.3.17", | ||
"tape": "^4.1.0", | ||
"uglify-js": "^2.4.24", | ||
"watchify": "^3.3.1" | ||
}, | ||
@@ -30,0 +30,0 @@ "license": "ISC", |
@@ -74,4 +74,8 @@ ## geojson-vt — GeoJSON Vector Tiles | ||
##### 2.1.3 (Aug 14, 2015) | ||
##### 2.1.4 (Aug 14, 2015) | ||
- Improved `getTile` to always return `null` on non-existing or invalid tiles. | ||
##### 2.1.3 (Aug 13, 2015) | ||
- Added `solidChildren` option that includes children of solid filled square tiles in the index (off by default). | ||
@@ -78,0 +82,0 @@ - Added back solid tile heuristics (not tiling solid filled square tiles further). |
@@ -178,2 +178,4 @@ 'use strict'; | ||
if (!parent) return null; | ||
if (debug > 1) console.log('found parent tile z%d-%d-%d', z0, x0, y0); | ||
@@ -190,2 +192,4 @@ | ||
if (!this.tiles[id]) return null; | ||
return transformTile(this.tiles[id], extent); | ||
@@ -195,3 +199,3 @@ }; | ||
function transformTile(tile, extent) { | ||
if (!tile || tile.transformed) return tile; | ||
if (tile.transformed) return tile; | ||
@@ -198,0 +202,0 @@ var z2 = tile.z2, |
@@ -20,12 +20,12 @@ 'use strict'; | ||
var tile1 = index.getTile(7, 37, 48).features, | ||
tile2 = index.getTile(9, 148, 192).features, | ||
tile3 = index.getTile(11, 592, 768).features; | ||
console.log = log; | ||
t.same(tile1, getJSON('us-states-z7-37-48.json'), 'z7-37-48'); | ||
t.same(index.getTile(7, 37, 48).features, getJSON('us-states-z7-37-48.json'), 'z7-37-48'); | ||
t.same(tile2, square, 'z9-148-192 (clipped square)'); | ||
t.same(tile3, square, 'z11-592-768 (clipped square)'); | ||
t.same(index.getTile(9, 148, 192).features, square, 'z9-148-192 (clipped square)'); | ||
t.same(index.getTile(11, 592, 768).features, square, 'z11-592-768 (clipped square)'); | ||
t.equal(index.getTile(11, 800, 400), null, 'non-existing tile'); | ||
t.equal(index.getTile(-5, 123.25, 400.25), null, 'invalid tile'); | ||
t.end(); | ||
@@ -32,0 +32,0 @@ }); |
Sorry, the diff of this file is not supported yet
1804268
8088
116