You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GetUrlScript.txt 795 B

4 years ago
12345678910111213141516171819202122232425262728293031323334353637
  1. var
  2. sx,sy,sz:string;
  3. lx,ty:extended;
  4. rx,by:extended;
  5. res:array[0..24] of extended;
  6. begin
  7. res[0]:= 0;
  8. res[1]:= 50000;
  9. res[2]:= 49500;
  10. res[3]:= 25500;
  11. res[4]:= 9783;
  12. res[5]:= 4891.96980999999959749402;
  13. res[6]:= 2445;
  14. res[7]:= 1222;
  15. res[8]:= 611;
  16. res[9]:= 305;
  17. res[10]:=152;
  18. res[11]:=76;
  19. res[12]:=38;
  20. res[13]:=19;
  21. res[14]:=9.5;
  22. res[15]:=4.79999999999999982236;
  23. res[16]:=2.39999999999999991118;
  24. res[17]:=0;
  25. res[18]:=0;
  26. res[19]:=0;
  27. lx:=-20037508+(getx*res[getz]*256);
  28. rx:=-20037508+((getx+1)*res[getz]*256);
  29. ty:=-15496570+((round(intpower(2,getz-1))-gety-1)*res[getz]*256);
  30. by:=-15496570+((round(intpower(2,getz-1))-gety+0)*res[getz]*256);
  31. ResultURL:=GetUrlBase+inttostr(getz)+'&BBOX='+RoundEX(lx,2)+','+RoundEX(by,2)+','+RoundEX(rx,2)+','+RoundEX(ty,2);
  32. end.