From b44b67878726f97158f160bd719e6a8e828d9713 Mon Sep 17 00:00:00 2001 From: sasgis <> Date: Sat, 12 Dec 1970 12:00:00 +0000 Subject: [PATCH] update zmp --- navionics.com.zmp/GetUrlScript.txt | 30 +++++++++++++++++++++++++++++- navionics.com.zmp/params.txt | 2 +- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/navionics.com.zmp/GetUrlScript.txt b/navionics.com.zmp/GetUrlScript.txt index 3cb6f085..8d20af27 100644 --- a/navionics.com.zmp/GetUrlScript.txt +++ b/navionics.com.zmp/GetUrlScript.txt @@ -1,3 +1,31 @@ +var + I: Integer; + VEncoded: string; begin - ResultURL:=GetURLBase+RoundEx(GetLMetr,10)+','+RoundEx(GetBMetr,10)+','+RoundEx(GetRMetr,10)+','+RoundEx(GetTMetr,10); + // prepare params + VEncoded := + 'LAYERS=osm_ram' + '&' + + 'SERVICE=WMS' + '&' + + 'VERSION=1.1.1' + '&' + + 'REQUEST=GetMap' + '&' + + 'STYLES=' + '&' + + 'FORMAT=image%2Fpng' + '&' + + 'SRS=EPSG%3A3395' + '&' + + 'WIDTH=256' + '&' + + 'HEIGHT=256' + '&' + + 'BBOX=' + RoundEx(GetLMetr ,10) + ',' + RoundEx(GetBMetr, 10) + ',' + RoundEx(GetRMetr, 10) + ',' + RoundEx(GetTMetr, 10); + + // crypt + for I := 1 to Length(VEncoded) do + VEncoded[I] := Chr(Ord(VEncoded[I]) xor 42); + + // Base64 encode + VEncoded := Base64Encode(VEncoded); + + //replase "+" with "%2b" charset + VEncoded := RegExprReplaceMatchSubStr(VEncoded, '\+', '\%2b'); + + ResultURL:=GetURLBase + VEncoded + '&NAVKEY=NAVIONICS11WEBAPI111'; + + RequestHead := 'Referer: http://www.navionics.com/sites/navionics.plurimedia.it/files/coverage/webapp.html?2985400'; end. \ No newline at end of file diff --git a/navionics.com.zmp/params.txt b/navionics.com.zmp/params.txt index 919e5dbc..9c826de6 100644 --- a/navionics.com.zmp/params.txt +++ b/navionics.com.zmp/params.txt @@ -8,7 +8,7 @@ ParentSubMenu= ParentSubMenu_en=Other maps ParentSubMenu_uk=²íø³ êàðòè asLayer=0 -DefURLBase=http://ec2-54-234-79-86.compute-1.amazonaws.com/MAP/rastermap?mapkey=1234567890&LAYERS=osm_ram&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fjpeg&SRS=EPSG%3A3395&WIDTH=256&HEIGHT=256&BBOX= +DefURLBase=http://webviewer-api.navionics.com/getmap?PARAMS= NameInCache=navionics_com separator=0 Ext=.png