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.0 KiB

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