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

4 years ago
12345678910111213141516171819202122232425262728293031323334
  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=osm_ram' + '&' +
  10. 'TRANSPARENT=TRUE' + '&' +
  11. 'SERVICE=WMS' + '&' +
  12. 'VERSION=1.1.1' + '&' +
  13. 'REQUEST=GetMap' + '&' +
  14. 'STYLES=' + '&' +
  15. 'FORMAT=image%2Fpng' + '&' +
  16. 'SRS=EPSG%3A3395' + '&' +
  17. 'WIDTH=256' + '&' +
  18. 'HEIGHT=256' + '&' +
  19. 'BBOX=' + VBox;
  20. // crypt
  21. for I := 1 to Length(VEncoded) do
  22. VEncoded[I] := Chr(Ord(VEncoded[I]) xor 42);
  23. // Base64 encode
  24. VEncoded := Base64Encode(VEncoded);
  25. //replase "+" with "%2b" charset
  26. VEncoded := RegExprReplaceMatchSubStr(VEncoded, '\+', '\%2b');
  27. ResultURL:=GetURLBase + VEncoded + '&NAVKEY=NAVIONICS11WEBAPI111&TEST=' + VBox + '&ZOOM=' + IntToStr(GetZ) + '&v=1&SRC=http://www.navionics.com';
  28. RequestHead := 'Referer: http://www.navionics.com/sites/navionics.plurimedia.it/files/coverage/webapp.html?2985400';
  29. end.