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

54 jaren geleden
54 jaren geleden
54 jaren geleden
54 jaren geleden
54 jaren geleden
54 jaren geleden
54 jaren geleden
54 jaren geleden
54 jaren geleden
54 jaren geleden
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=osm_ram' + '&' +
  10. 'SERVICE=WMS' + '&' +
  11. 'VERSION=1.1.1' + '&' +
  12. 'REQUEST=GetMap' + '&' +
  13. 'STYLES=' + '&' +
  14. 'FORMAT=image%2Fpng' + '&' +
  15. 'SRS=EPSG%3A3395' + '&' +
  16. 'WIDTH=256' + '&' +
  17. 'HEIGHT=256' + '&' +
  18. 'BBOX=' + VBox;
  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.