31 рядки
943 B

  1. var
  2. I: Integer;
  3. VEncoded: string;
  4. begin
  5. // prepare params
  6. VEncoded :=
  7. 'LAYERS=osm_ram' + '&' +
  8. 'SERVICE=WMS' + '&' +
  9. 'VERSION=1.1.1' + '&' +
  10. 'REQUEST=GetMap' + '&' +
  11. 'STYLES=' + '&' +
  12. 'FORMAT=image%2Fpng' + '&' +
  13. 'SRS=EPSG%3A3395' + '&' +
  14. 'WIDTH=256' + '&' +
  15. 'HEIGHT=256' + '&' +
  16. 'BBOX=' + RoundEx(GetLMetr ,10) + ',' + RoundEx(GetBMetr, 10) + ',' + RoundEx(GetRMetr, 10) + ',' + RoundEx(GetTMetr, 10);
  17. // crypt
  18. for I := 1 to Length(VEncoded) do
  19. VEncoded[I] := Chr(Ord(VEncoded[I]) xor 42);
  20. // Base64 encode
  21. VEncoded := Base64Encode(VEncoded);
  22. //replase "+" with "%2b" charset
  23. VEncoded := RegExprReplaceMatchSubStr(VEncoded, '\+', '\%2b');
  24. ResultURL:=GetURLBase + VEncoded + '&NAVKEY=NAVIONICS11WEBAPI111';
  25. RequestHead := 'Referer: http://www.navionics.com/sites/navionics.plurimedia.it/files/coverage/webapp.html?2985400';
  26. end.