Skip to content

Commit

Permalink
Add a failing test, cover a z20 tile at z20
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhargav Kowshik committed Nov 22, 2016
1 parent 33fdaaa commit a8fdfe5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/fixtures/quadkey.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
77.60536193847656,
12.984485897654398
],
[
77.60536193847656,
12.984820441742839
],
[
77.60570526123047,
12.984820441742839
],
[
77.60570526123047,
12.984485897654398
],
[
77.60536193847656,
12.984485897654398
]
]
]
},
"properties": {}
}
10 changes: 10 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,16 @@ test('0,0 polygon', function(t){
t.end();
});

test('quadkey', function(t){
var quadkey = JSON.parse(fs.readFileSync(__dirname+'/fixtures/quadkey.geojson'));
var limits = {
min_zoom: 20,
max_zoom: 20
};
t.deepEqual(cover.geojson(quadkey.geometry, limits).features[0], quadkey);
t.end();
});


function compareFixture(t, geom, limits, filepath) {
var result = cover.geojson(geom, limits);
Expand Down

0 comments on commit a8fdfe5

Please sign in to comment.