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 1.2 KiB

54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
54 years ago
12345678910111213141516171819202122232425
  1. var
  2. r: integer;
  3. BaseUrl: string;
  4. begin
  5. // Выбор зеркала, если не указана версия
  6. if version = '' then
  7. r := random(3)
  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.