Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

GetUrlScript.txt 1.1 KiB

39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
39 anos atrás
123456789101112131415161718192021222324
  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. end;
  14. if GetZ < 13 then
  15. ResultURL := BaseUrl+'2km.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'
  16. else if getz <14 then
  17. ResultURL := BaseUrl+'1km.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'
  18. else if getz <15 then
  19. ResultURL := BaseUrl+'500m.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'
  20. else
  21. ResultURL := BaseUrl+'250m.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'
  22. end.