GetUrlScript.txt 1.2 KiB

55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
55 years ago
12345678910111213141516171819202122232425
  1. var
  2. r: integer;
  3. BaseUrl: string;
  4. begin
  5. // Выбор зеркала, если не указана версия
  6. if version = '' then
  7. r := random(2)
  8. else
  9. r := StrToInt(version);
  10. case r of
  11. 0: BaseUrl := GetURLBase;
  12. 1: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088', 'https://maps.melda.ru');
  13. 2: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088/pub', 'http://map.zeskmi.ru');
  14. end;
  15. if GetZ < 13 then
  16. ResultURL := BaseUrl+'2km.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'
  17. else if getz <14 then
  18. ResultURL := BaseUrl+'1km.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'
  19. else if getz <15 then
  20. ResultURL := BaseUrl+'500m.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'
  21. else
  22. ResultURL := BaseUrl+'250m.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'
  23. end.