48 Zeilen
1.1 KiB

  1. var
  2. X, Y, X1, X2, Y1, Y2, Z: integer;
  3. SX1, SX2, SY1, SY2, SZ: string;
  4. begin
  5. Z := GetZ - 1;
  6. Y := round(intpower(2,Z)) - 1 - GetY;
  7. X := GetX;
  8. Y1 := Y div 1000;
  9. Y2 := Y mod 1000;
  10. X1 := X div 1000;
  11. X2 := X mod 1000;
  12. case Y1 of
  13. 0..9: SY1 := '00'+IntToStr(Y1);
  14. 10..99: SY1 := '0'+IntToStr(Y1);
  15. 100..999: SY1 := IntToStr(Y1);
  16. end;
  17. case Y2 of
  18. 0..9: SY2 := '00'+IntToStr(Y2);
  19. 10..99: SY2 := '0'+IntToStr(Y2);
  20. 100..999: SY2 := IntToStr(Y2);
  21. end;
  22. case X1 of
  23. 0..9: SX1 := '00'+IntToStr(X1);
  24. 10..99: SX1 := '0'+IntToStr(X1);
  25. 100..999: SX1 := IntToStr(X1);
  26. end;
  27. case X2 of
  28. 0..9: SX2 := '00'+IntToStr(X2);
  29. 10..99: SX2 := '0'+IntToStr(X2);
  30. 100..999: SX2 := IntToStr(X2);
  31. end;
  32. case Z of
  33. 0..9: SZ := '0'+IntToStr(Z);
  34. 10..99: SZ := IntToStr(Z);
  35. end;
  36. if ((Z >= 3) and (Z <= 18)) then
  37. ResultURL:=GetURLBase+SZ+'/000/'+SX1+'/'+SX2+'/000/'+SY1+'/'+SY2+'.png';
  38. end.
  39. // http://karta.tatar.ru/tilecache/satellite/13/000/005/215/000/005/631.png