TTMSFNCMaps: Service msOpenLayers: How to add Referer?

I get sometimes a message in the map …

access blocked - Referer is required by tile usage policy of to OpenStreetMap's volunteer-run servers: osm.wiki/Blocked

… like in the attachment. How can I add a “Referer”?

Best regard,

Dirk

1 Like

Hi we are seeing the same issue since last week. I tried adding the tileserver myself, with the following code:
_Map.ClearTileLayers();
var tl := _Map.AddTileLayer( '``https://tile.openstreetmap.org/{z}/{x}/{y}.png``' );
tl.DataString := '{ attribution: ''© <a href=" Copyright and License | OpenStreetMap ">OpenStreetMap</a> contributors'', referrerPolicy: ''origin-when-cross-origin'' }';
tl.Source := TTMSFNCOpenLayersTileLayerSource.tlsXYZ;

It does help a bit, but we’ll still see the referer error.

@TMS_software_team Is there anything we can do to resolve this problem?

1 Like

Hi,

Thank you for notifying us. We are aware of the issue and are currently investigating possible solutions. Unfortunately, the problem is caused by a breaking change in the OpenStreetMap tileserver, which is the default tileserver used by OpenLayers.

TMS FNC Maps will be updated as soon as a suitable fix has been implemented.

A possible workaround is to configure an alternative tileserver in the TTMSFNCOpenLayers component.

procedure TForm1.TMSFNCOpenLayers1MapInitialized(Sender: TObject);
begin
TMSFNCOpenLayers1.Options.TileServer :=
  'https://{a-c}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png';
end;

Note: The suggested tileserver alternative is free for non-commercial use only. For commercial use a paid license is required.

1 Like

We also discovered this in beta testing last week. Was demonstrating this weekend and it popped up. Holding release for the upcoming fix!

Best regards,

Steve

We got messages from customers about this. Is there a possibilty of a quick solution, or do we have to use a paid license. For us this is quite urgent.

Best Regards,

Jan

The issue has been resolved in the latest update of TMS FNC Maps released earlier today.
Please make sure to also update to the latest version of TMS FNC Core.

Installed the latest fnc maps and fnc core. Can confirm they were both updated. Still get the referrer block message on the map.

Installed the latest fnc maps and fnc core. Can confirm they were both updated. Still get the referrer block message on the map.

Actually i get access violation when opening the form i had that on. I think maybe you dropped windows 7 support with this update? If that is the case I think I need to revert back to an older version unless you can provide another solution?

Thanks.

bugreport.txt (90.7 KB)

Please note that Microsoft stopped supporting WebView2 for Windows 7.
Unfortunately the fix requires functionality only available in newer versions of WebView2.

Hi, Bart!

How to update correctly …?

I tried with “TMS Smart Setup” marked tms.fnc.core line and clicked on “Install” button. Now “TMS Smart Setup” seems to be frozen (see screenshot - waiting for 20 minutes - no progress - can’t even move the window).

Updates are always a struggle … :neutral_face:

What should I do now …?

Regards, Dirk

Hi, Bart!

it seemed that an update of “TMS Smart Setup” blocked the process.

I killed via task manager, rebooted Windows and started “TMS Smart Setup” again. An update was done and after that the tms products core and maps were updated without problems.

I rebuild by main project again with updated components and the Referer-message is gone.

Thank you for the quick response and solution.

Regards, Dirk

Hi Dirk,

Happy to help!
Thanks for informing us TMS FNC Maps working as expected again.

After updating en rebuilding the program, I still get referrer messages

If you still get referrer messages at run-time, please make sure you have installed the latest versions of both TMS FNC Core and TMS FNC Maps. Please also verify no references to previous versions are left on your system.