@@ -4,10 +4,41 @@ | |||||
// c = 0 for pristine Navionics charts, 1 for Sonar Charts | // c = 0 for pristine Navionics charts, 1 for Sonar Charts | ||||
// TRANSPARENT parameter: FALSE for non-layer, TRUE for layer | // TRANSPARENT parameter: FALSE for non-layer, TRUE for layer | ||||
// UGC parameter: FALSE for pristine Navionics charts, TRUE for additinal user-generated content icons | // UGC parameter: FALSE for pristine Navionics charts, TRUE for additinal user-generated content icons | ||||
// navtoken: base64 encoded string of either: | |||||
// - "Navionics_internalpurpose_00001+webapiv2.navionics.com" (used with Referrer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html) | |||||
// - "Navionics_internalpurpose_00001+webapp.navionics.com" (used with Referrer: https://webapp.navionics.com/?lang=en) | |||||
function GetNavToken: AnsiString; | |||||
var | |||||
VTimeStamp: AnsiString; | |||||
VResponseCode: Cardinal; | |||||
VResponseHeader, VResponseData: AnsiString; | |||||
VRequestUrl, VRequestHeader, VPostData: AnsiString; | |||||
begin | |||||
Result := 'ERROR_1'; | |||||
if ScriptBuffer <> '' then begin | |||||
Result := ScriptBuffer; | |||||
Exit; | |||||
end; | |||||
if Assigned(Downloader) then begin | |||||
VTimeStamp := IntToStr(GetUnixTime); | |||||
VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | |||||
VRequestHeader := ''; | |||||
VPostData := ''; | |||||
VResponseHeader := ''; | |||||
VResponseData := ''; | |||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, VPostData, VResponseHeader, VResponseData); | |||||
if VResponseCode = 200 then begin | |||||
ScriptBuffer := VResponseData; | |||||
Result := ScriptBuffer; | |||||
end else begin | |||||
ScriptBuffer := 'ERROR_2'; | |||||
end; | |||||
end; | |||||
end; | |||||
begin | begin | ||||
ResultURL:=GetURLBase+inttostr(GetZ-1)+'/'+inttostr(GetX)+'/'+inttostr(GetY)+'?LAYERS=config_1_10.00_1&TRANSPARENT=TRUE&UGC=FALSE&navtoken=TmF2aW9uaWNzX2ludGVybmFscHVycG9zZV8wMDAwMSt3ZWJhcGl2Mi5uYXZpb25pY3MuY29t'; | |||||
ResultURL:=GetURLBase+inttostr(GetZ-1)+'/'+inttostr(GetX)+'/'+inttostr(GetY)+'?LAYERS=config_1_10.00_1&TRANSPARENT=TRUE&UGC=FALSE&navtoken='+GetNavToken; | |||||
end. | end. |
@@ -1,7 +1,7 @@ | |||||
[PARAMS] | [PARAMS] | ||||
GUID={2333E9D3-EB95-466D-AC14-2CFFCDB509C2} | GUID={2333E9D3-EB95-466D-AC14-2CFFCDB509C2} | ||||
name=Navionics SonarChart(TM) | name=Navionics SonarChart(TM) | ||||
ParentSubMenu_ru=Ìîðñêèå êàðòû (SonarChart) | |||||
ParentSubMenu_ru=Ìîðñêèå êàðòû | |||||
ParentSubMenu=Marine maps | ParentSubMenu=Marine maps | ||||
asLayer=1 | asLayer=1 | ||||
DefURLBase=http://backend.navionics.io/tile/ | DefURLBase=http://backend.navionics.io/tile/ | ||||
@@ -11,4 +11,5 @@ ContentType=image/png | |||||
projection=1 | projection=1 | ||||
sradiusa=6378137 | sradiusa=6378137 | ||||
sradiusb=6378137 | sradiusb=6378137 | ||||
IsUseDownloaderInScript=1 | |||||
RequestHead=Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html | RequestHead=Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html |
@@ -4,10 +4,41 @@ | |||||
// c = 0 for pristine Navionics charts, 1 for Sonar Charts | // c = 0 for pristine Navionics charts, 1 for Sonar Charts | ||||
// TRANSPARENT parameter: FALSE for non-layer, TRUE for layer | // TRANSPARENT parameter: FALSE for non-layer, TRUE for layer | ||||
// UGC parameter: FALSE for pristine Navionics charts, TRUE for additinal user-generated content icons | // UGC parameter: FALSE for pristine Navionics charts, TRUE for additinal user-generated content icons | ||||
// navtoken: base64 encoded string of either: | |||||
// - "Navionics_internalpurpose_00001+webapiv2.navionics.com" (used with Referrer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html) | |||||
// - "Navionics_internalpurpose_00001+webapp.navionics.com" (used with Referrer: https://webapp.navionics.com/?lang=en) | |||||
function GetNavToken: AnsiString; | |||||
var | |||||
VTimeStamp: AnsiString; | |||||
VResponseCode: Cardinal; | |||||
VResponseHeader, VResponseData: AnsiString; | |||||
VRequestUrl, VRequestHeader, VPostData: AnsiString; | |||||
begin | |||||
Result := 'ERROR_1'; | |||||
if ScriptBuffer <> '' then begin | |||||
Result := ScriptBuffer; | |||||
Exit; | |||||
end; | |||||
if Assigned(Downloader) then begin | |||||
VTimeStamp := IntToStr(GetUnixTime); | |||||
VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | |||||
VRequestHeader := ''; | |||||
VPostData := ''; | |||||
VResponseHeader := ''; | |||||
VResponseData := ''; | |||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, VPostData, VResponseHeader, VResponseData); | |||||
if VResponseCode = 200 then begin | |||||
ScriptBuffer := VResponseData; | |||||
Result := ScriptBuffer; | |||||
end else begin | |||||
ScriptBuffer := 'ERROR_2'; | |||||
end; | |||||
end; | |||||
end; | |||||
begin | begin | ||||
ResultURL:=GetURLBase+inttostr(GetZ-1)+'/'+inttostr(GetX)+'/'+inttostr(GetY)+'?LAYERS=config_1_10.00_1&TRANSPARENT=FALSE&UGC=FALSE&navtoken=TmF2aW9uaWNzX2ludGVybmFscHVycG9zZV8wMDAwMSt3ZWJhcGl2Mi5uYXZpb25pY3MuY29t'; | |||||
ResultURL:=GetURLBase+inttostr(GetZ-1)+'/'+inttostr(GetX)+'/'+inttostr(GetY)+'?LAYERS=config_1_10.00_1&TRANSPARENT=FALSE&UGC=FALSE&navtoken='+GetNavToken; | |||||
end. | end. |
@@ -1,7 +1,7 @@ | |||||
[PARAMS] | [PARAMS] | ||||
GUID={247A02DC-5204-46FC-8D23-828AFC83A434} | GUID={247A02DC-5204-46FC-8D23-828AFC83A434} | ||||
name=Navionics SonarChart(TM) | name=Navionics SonarChart(TM) | ||||
ParentSubMenu_ru=Ìîðñêèå êàðòû (SonarChart) | |||||
ParentSubMenu_ru=Ìîðñêèå êàðòû | |||||
ParentSubMenu=Marine maps | ParentSubMenu=Marine maps | ||||
DefURLBase=http://backend.navionics.io/tile/ | DefURLBase=http://backend.navionics.io/tile/ | ||||
NameInCache=navionics_sonarchart | NameInCache=navionics_sonarchart | ||||
@@ -10,4 +10,5 @@ ContentType=image/png | |||||
projection=1 | projection=1 | ||||
sradiusa=6378137 | sradiusa=6378137 | ||||
sradiusb=6378137 | sradiusb=6378137 | ||||
IsUseDownloaderInScript=1 | |||||
RequestHead=Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html | RequestHead=Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html |
@@ -4,10 +4,41 @@ | |||||
// c = 0 for pristine Navionics charts, 1 for Sonar Charts | // c = 0 for pristine Navionics charts, 1 for Sonar Charts | ||||
// TRANSPARENT parameter: FALSE for non-layer, TRUE for layer | // TRANSPARENT parameter: FALSE for non-layer, TRUE for layer | ||||
// UGC parameter: FALSE for pristine Navionics charts, TRUE for additinal user-generated content icons | // UGC parameter: FALSE for pristine Navionics charts, TRUE for additinal user-generated content icons | ||||
// navtoken: base64 encoded string of either: | |||||
// - "Navionics_internalpurpose_00001+webapiv2.navionics.com" (used with Referrer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html) | |||||
// - "Navionics_internalpurpose_00001+webapp.navionics.com" (used with Referrer: https://webapp.navionics.com/?lang=en) | |||||
function GetNavToken: AnsiString; | |||||
var | |||||
VTimeStamp: AnsiString; | |||||
VResponseCode: Cardinal; | |||||
VResponseHeader, VResponseData: AnsiString; | |||||
VRequestUrl, VRequestHeader, VPostData: AnsiString; | |||||
begin | |||||
Result := 'ERROR_1'; | |||||
if ScriptBuffer <> '' then begin | |||||
Result := ScriptBuffer; | |||||
Exit; | |||||
end; | |||||
if Assigned(Downloader) then begin | |||||
VTimeStamp := IntToStr(GetUnixTime); | |||||
VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | |||||
VRequestHeader := ''; | |||||
VPostData := ''; | |||||
VResponseHeader := ''; | |||||
VResponseData := ''; | |||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, VPostData, VResponseHeader, VResponseData); | |||||
if VResponseCode = 200 then begin | |||||
ScriptBuffer := VResponseData; | |||||
Result := ScriptBuffer; | |||||
end else begin | |||||
ScriptBuffer := 'ERROR_2'; | |||||
end; | |||||
end; | |||||
end; | |||||
begin | begin | ||||
ResultURL:=GetURLBase+inttostr(GetZ-1)+'/'+inttostr(GetX)+'/'+inttostr(GetY)+'?LAYERS=config_1_10.00_0&TRANSPARENT=TRUE&UGC=FALSE&navtoken=TmF2aW9uaWNzX2ludGVybmFscHVycG9zZV8wMDAwMSt3ZWJhcGl2Mi5uYXZpb25pY3MuY29t'; | |||||
ResultURL:=GetURLBase+inttostr(GetZ-1)+'/'+inttostr(GetX)+'/'+inttostr(GetY)+'?LAYERS=config_1_10.00_0&TRANSPARENT=TRUE&UGC=FALSE&navtoken='+GetNavToken; | |||||
end. | end. |
@@ -11,4 +11,5 @@ ContentType=image/png | |||||
projection=1 | projection=1 | ||||
sradiusa=6378137 | sradiusa=6378137 | ||||
sradiusb=6378137 | sradiusb=6378137 | ||||
IsUseDownloaderInScript=1 | |||||
RequestHead=Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html | RequestHead=Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html |
@@ -4,10 +4,41 @@ | |||||
// c = 0 for pristine Navionics charts, 1 for Sonar Charts | // c = 0 for pristine Navionics charts, 1 for Sonar Charts | ||||
// TRANSPARENT parameter: FALSE for non-layer, TRUE for layer | // TRANSPARENT parameter: FALSE for non-layer, TRUE for layer | ||||
// UGC parameter: FALSE for pristine Navionics charts, TRUE for additinal user-generated content icons | // UGC parameter: FALSE for pristine Navionics charts, TRUE for additinal user-generated content icons | ||||
// navtoken: base64 encoded string of either: | |||||
// - "Navionics_internalpurpose_00001+webapiv2.navionics.com" (used with Referrer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html) | |||||
// - "Navionics_internalpurpose_00001+webapp.navionics.com" (used with Referrer: https://webapp.navionics.com/?lang=en) | |||||
begin | |||||
ResultURL:=GetURLBase+inttostr(GetZ-1)+'/'+inttostr(GetX)+'/'+inttostr(GetY)+'?LAYERS=config_1_10.00_0&TRANSPARENT=FALSE&UGC=FALSE&navtoken=TmF2aW9uaWNzX2ludGVybmFscHVycG9zZV8wMDAwMSt3ZWJhcGl2Mi5uYXZpb25pY3MuY29t'; | |||||
function GetNavToken: AnsiString; | |||||
var | |||||
VTimeStamp: AnsiString; | |||||
VResponseCode: Cardinal; | |||||
VResponseHeader, VResponseData: AnsiString; | |||||
VRequestUrl, VRequestHeader, VPostData: AnsiString; | |||||
begin | |||||
Result := 'ERROR_1'; | |||||
if ScriptBuffer <> '' then begin | |||||
Result := ScriptBuffer; | |||||
Exit; | |||||
end; | |||||
if Assigned(Downloader) then begin | |||||
VTimeStamp := IntToStr(GetUnixTime); | |||||
VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | |||||
VRequestHeader := ''; | |||||
VPostData := ''; | |||||
VResponseHeader := ''; | |||||
VResponseData := ''; | |||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, VPostData, VResponseHeader, VResponseData); | |||||
if VResponseCode = 200 then begin | |||||
ScriptBuffer := VResponseData; | |||||
Result := ScriptBuffer; | |||||
end else begin | |||||
ScriptBuffer := 'ERROR_2'; | |||||
end; | |||||
end; | |||||
end; | |||||
begin | |||||
ResultURL:=GetURLBase + IntToStr(GetZ-1) + '/' + IntToStr(GetX) + '/' + IntToStr(GetY) + '?LAYERS=config_1_10.00_0&TRANSPARENT=FALSE&UGC=FALSE&navtoken=' + GetNavToken; | |||||
end. | end. |
@@ -10,4 +10,5 @@ ContentType=image/png | |||||
projection=1 | projection=1 | ||||
sradiusa=6378137 | sradiusa=6378137 | ||||
sradiusb=6378137 | sradiusb=6378137 | ||||
IsUseDownloaderInScript=1 | |||||
RequestHead=Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html | RequestHead=Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html |