@@ -144,7 +144,27 @@ describe('create list of tile coordinates', function() {
144144 var coords = printer . tileList ( zoom , scale , center ) ;
145145 assert . deepEqual ( JSON . stringify ( coords ) , JSON . stringify ( expectedCoords ) ) ;
146146 } ) ;
147+ it ( 'should avoid extranious images' , function ( ) {
148+ var zoom = 11 ,
149+ scale = 1 ,
150+ width = 256 ,
151+ height = 256 ,
152+ center = { w : width , h : height , x : 118912 , y : 214912 } ;
147153
154+ var expectedCoords = {
155+ tiles : [
156+ { z : 11 , x : 464 , y : 839 , px : 0 , py : 0 } ,
157+ // {z: 11, x: 464, y: 840, px: 0, py: 256 },
158+ // { z: 11, x: 465, y: 839, px: 256, py: 0 },
159+ // { z: 11, x: 465, y: 840, px: 256, py: 256 }
160+ ] ,
161+ dimensions : { x : width , y : height } ,
162+ center : { row : 839 , column : 464 , zoom : 11 } ,
163+ scale : scale
164+ } ;
165+ var coords = printer . tileList ( zoom , scale , center ) ;
166+ assert . deepEqual ( JSON . stringify ( coords ) , JSON . stringify ( expectedCoords ) ) ;
167+ } ) ;
148168 it ( 'should return a tiles object with correct coords when image is much bigger than world' , function ( ) {
149169 var zoom = 1 ,
150170 scale = 1 ,
0 commit comments