You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test('tilesToZoom',function(t){varzoomUp1=tilesToZoom([[0,0,0]],1);t.equal(zoomUp1.length,4);varzoomUp1HasTiles=true;[[0,0,1],[1,0,1],[0,1,1],[1,1,1]].forEach(function(tile){if(!tilebelt.hasTile(zoomUp1,tile))hasTiles=false;});t.true(zoomUp1HasTiles,'0,0,0 zoomUp1 has tiles');varzoomUp2=tilesToZoom([[0,0,0]],2);t.equal(zoomUp2.length,16,'zoom in 2x has 16 tiles');varzoomUp5=tilesToZoom([[0,0,0]],5);t.equal(zoomUp5.length,1024,'zoom in 5x has 1024 tiles');varzoomUp8=tilesToZoom([[0,0,0]],8);t.equal(zoomUp8.length,65536,'zoom in 5x has 65536 tiles');varzoomDown1=tilesToZoom([[1,1,1]],0);t.equal(zoomDown1.length,1,'[1,1,1] at zoom 0 has 1 tile');t.equal(zoomDown1.toString(),[0,0,0].toString(),'[1,1,1] zoomed out should be [0,0,0]');varzoomDown2=tilesToZoom([[9372,12536,15]],13);t.equal(zoomDown2.length,1,'[9372,12536,15] at zoom 13 has 1 tile');t.equal(zoomDown2.toString(),[2343,3134,13].toString(),'expected tile');t.end();});
Convert a set of tiles to a different zoom level.
Here's a stab at the code (assumes homogenous zoom level for input tiles):
Initial tests:
cc @aaronlidman
The text was updated successfully, but these errors were encountered: