Fortsetzung der Diskussion von TMSFNCMaps offline with a local maptile server :
I am using my Maps internally behind a Proxy. Depending on on the Task above, i implemented the solution. Unfortunately tries the routine first via Internet-Connection, then after timeout it takes then the local files.
Is there a possibility to define or change the priority of which files are used?
Hi,
If you implemented to GetHeadLinks override, it will add an inherited. Remove the inherited, or add AList.Clear;
The code should be changed to
procedure TTMSFNCOpenLayersOffline.GetHeadLinks(AList: TTMSFNCMapsLinksList;
ACheckReady: Boolean);
begin
inherited;
AList.Clear;
AList.Add(TTMSFNCMapsLink.CreateLink('file://E:\Offline\OpenLayers\ol.css', 'text/css', 'stylesheet'));
AList.Add(TTMSFNCMapsLink.CreateScript('file://E:\Offline\OpenLayers\ol.js', 'text/javascript'));
end;
or
procedure TTMSFNCOpenLayersOffline.GetHeadLinks(AList: TTMSFNCMapsLinksList;
ACheckReady: Boolean);
begin
AList.Add(TTMSFNCMapsLink.CreateLink('file://E:\Offline\OpenLayers\ol.css', 'text/css', 'stylesheet'));
AList.Add(TTMSFNCMapsLink.CreateScript('file://E:\Offline\OpenLayers\ol.js', 'text/javascript'));
end;
To avoid using the original links. We'll update the sample accordingly.
Perfect. Thank you for your quick Answer.
1 Like
system
(system)
Closed
February 16, 2022, 11:04am
4
This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.