@@ -34,7 +34,7 @@ var | |||||
VTimeStamp: AnsiString; | VTimeStamp: AnsiString; | ||||
VResponseCode: Cardinal; | VResponseCode: Cardinal; | ||||
VResponseHeader, VResponseData: AnsiString; | VResponseHeader, VResponseData: AnsiString; | ||||
VRequestUrl: AnsiString; | |||||
VRequestUrl, VRequestHeader: AnsiString; | |||||
begin | begin | ||||
Result := ''; | Result := ''; | ||||
@@ -51,9 +51,10 @@ begin | |||||
if (Result = '') and Assigned(Downloader) then begin | if (Result = '') and Assigned(Downloader) then begin | ||||
VTimeStamp := IntToStr(GetUnixTime); | VTimeStamp := IntToStr(GetUnixTime); | ||||
VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | ||||
VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; | |||||
VResponseHeader := ''; | VResponseHeader := ''; | ||||
VResponseData := ''; | VResponseData := ''; | ||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); | |||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); | |||||
if VResponseCode = 200 then begin | if VResponseCode = 200 then begin | ||||
Result := VResponseData; | Result := VResponseData; | ||||
@@ -34,7 +34,7 @@ var | |||||
VTimeStamp: AnsiString; | VTimeStamp: AnsiString; | ||||
VResponseCode: Cardinal; | VResponseCode: Cardinal; | ||||
VResponseHeader, VResponseData: AnsiString; | VResponseHeader, VResponseData: AnsiString; | ||||
VRequestUrl: AnsiString; | |||||
VRequestUrl, VRequestHeader: AnsiString; | |||||
begin | begin | ||||
Result := ''; | Result := ''; | ||||
@@ -51,9 +51,10 @@ begin | |||||
if (Result = '') and Assigned(Downloader) then begin | if (Result = '') and Assigned(Downloader) then begin | ||||
VTimeStamp := IntToStr(GetUnixTime); | VTimeStamp := IntToStr(GetUnixTime); | ||||
VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | ||||
VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; | |||||
VResponseHeader := ''; | VResponseHeader := ''; | ||||
VResponseData := ''; | VResponseData := ''; | ||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); | |||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); | |||||
if VResponseCode = 200 then begin | if VResponseCode = 200 then begin | ||||
Result := VResponseData; | Result := VResponseData; | ||||
@@ -34,7 +34,7 @@ var | |||||
VTimeStamp: AnsiString; | VTimeStamp: AnsiString; | ||||
VResponseCode: Cardinal; | VResponseCode: Cardinal; | ||||
VResponseHeader, VResponseData: AnsiString; | VResponseHeader, VResponseData: AnsiString; | ||||
VRequestUrl: AnsiString; | |||||
VRequestUrl, VRequestHeader: AnsiString; | |||||
begin | begin | ||||
Result := ''; | Result := ''; | ||||
@@ -51,9 +51,10 @@ begin | |||||
if (Result = '') and Assigned(Downloader) then begin | if (Result = '') and Assigned(Downloader) then begin | ||||
VTimeStamp := IntToStr(GetUnixTime); | VTimeStamp := IntToStr(GetUnixTime); | ||||
VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | ||||
VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; | |||||
VResponseHeader := ''; | VResponseHeader := ''; | ||||
VResponseData := ''; | VResponseData := ''; | ||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); | |||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); | |||||
if VResponseCode = 200 then begin | if VResponseCode = 200 then begin | ||||
Result := VResponseData; | Result := VResponseData; | ||||
@@ -34,7 +34,7 @@ var | |||||
VTimeStamp: AnsiString; | VTimeStamp: AnsiString; | ||||
VResponseCode: Cardinal; | VResponseCode: Cardinal; | ||||
VResponseHeader, VResponseData: AnsiString; | VResponseHeader, VResponseData: AnsiString; | ||||
VRequestUrl: AnsiString; | |||||
VRequestUrl, VRequestHeader: AnsiString; | |||||
begin | begin | ||||
Result := ''; | Result := ''; | ||||
@@ -51,9 +51,10 @@ begin | |||||
if (Result = '') and Assigned(Downloader) then begin | if (Result = '') and Assigned(Downloader) then begin | ||||
VTimeStamp := IntToStr(GetUnixTime); | VTimeStamp := IntToStr(GetUnixTime); | ||||
VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; | ||||
VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; | |||||
VResponseHeader := ''; | VResponseHeader := ''; | ||||
VResponseData := ''; | VResponseData := ''; | ||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); | |||||
VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); | |||||
if VResponseCode = 200 then begin | if VResponseCode = 200 then begin | ||||
Result := VResponseData; | Result := VResponseData; | ||||