var res:string; i:byte; osX,osY,prX,prY:integer; begin res:='t'; osX:=round(intpower(2,GetZ-1)) div 2; osY:=round(intpower(2,GetZ-1)) div 2; prX:=osX; prY:=osY; for i:=2 to GetZ do begin prX:=prX div 2; prY:=prY div 2; if GetX<osX then begin osX:=osX-prX; if GetY<osY then begin osY:=osY-prY; res:=res+'q'; end else begin osY:=osY+prY; res:=res+'t'; end; end else begin osX:=osX+prX; if Gety<osy then begin osY:=osY-prY; res:=res+'r'; end else begin osY:=osY+prY; res:=res+'s'; end; end; end; { if GetY <7 then insert('10',GetURLBase,13) else insert('8',GetURLBase,13);} case GetZ of 5: ResultURL:=GetURLBase+res+'/'+res+'.png'; 6: ResultURL:=GetURLBase+res+'/'+res+'.png'; 7: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png'; 8: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png'; 9: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png'; 10: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png'; 11: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png'; 12: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png'; 13: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png'; 14: ResultURL:=GetURLBase+copy(res,1,6)+'/'+res+'.png'; else ResultURL:=GetURLBase+res+'.png'; end end.