WebOSMaps Demo throws script error

I have just installed and run the TMS TWebOSMaps demo under Delphi 10.3.3 / windows 10 64-bit

As it starts to point the main form, with menu and "Markerfile: DefaultMarkers.csv" in the title bar, it throws a "Script Error" dialog, saying

An error has occurred in the script on this page
Line : 0
Char : 0
Error: Script error.
Code: 0
URL: http://www.tmssoftware.biz/webosmaps/OpenLayers.js

Do you want to continue running scripts on this page?

What is this error, and why is it appearing? I would have expected to be able to just run the demo. (I'm looking for a decent mapping component!)

Please advise.


We are not aware of such an issue with TWebOSMaps. I have retested the demo here and it is working as expected.

Have you tried creating a new project with only a TWebOSMaps on the form to check if that is working?
Please make sure the call Launch in the Form OnShow event.

procedure TForm4.FormShow(Sender: TObject);

Bart Holvoet2019-12-05 16:14:40

thanks for the fast response.

i did that, and got exactly the same error.

I'll check on some other Delphi IDE installations too, to see if it may be something local

It could indeed be a local configuration issue.
You might want to try running the app with a different machine, Delphi version or network connection.


I'm still chasing this error, which shows up as follows when the WebOSMaps Demo is run:

I have tested this under both Delphi 10.2 and Delphi 10.3 on this PC. Both give the same error. The WebGMaps demo is working under both. I have completely uninstalled (following Embarcadero instructions) and reinstalled both versions of Delphi, and the error persists.

I have the WebOSMaps demo operating correctly on a couple of other PCs, where I develop in Delphi 10.2.

So the problem is showing itself ONLY on this particular PC (Windows 10, 64-bit). I can find no obvious difference between this PC and the others, but assume that there must be some setting somewhere that has "gone wrong" on this PC.

Any further assistance/guidance would be MOST useful, as I need to get developing with WebOSMaps soon!


You might verify if security settings in IE (TWebOSMaps uses the IE browser activeX) prevent access/downloading certain needed resources such as http://www.tmssoftware.biz/webosmaps/OpenLayers.js

Thanks Bruno.
Here's the thing - I just noted the "or network connection" in Bart's comment on 5 December, above, and thought I'd look into that.

DNS is set at, so I'm bypassing the restrictions that the IT department has put on some other computers in the company.Then I tried a VPN, and the WebOSMaps Demo worked fine under Delphi 10.2 and 10.3. Then I disabled the VPN, and now everything works fine! Very strange.

Maybe the VPN did modify/correct some setting that was lurking on this PC. When you mention "security settings in IE" would these be the same that one sees under Control Panel/Internet Options? I assume that there is nothing to see there now, because it's been "corrected", but this was an interesting exercise.

(Now I just have to complete reinstalling all my setting and third-party components for D10.2 and D10.3. Sigh!)

Thanks for informing the issue was resolved.

Some further comments/observations:

TWebOSMaps uses the OpenLayers service (see Page 8 of the "TMS VCL WebOSMaps DEVELOPERS GUIDE". I have not read too deeply on OpenLayers, but it enables control of the map, and makes use of a JavaScript file. This is the file specified in the TMapOptions.ScriptURL property.

If a file is not specified, according to Page 11 of the Guide, "the default JavaScript file from the OpenLayers.org server is used". This does not appear to be true. In fact, the file is, in fact, fetched from http://www.tmssoftware.biz/webosmaps/OpenLayers.js

My initial problem arose because there is a company policy that bans our downloading of .js files (via a clearOS content filter) The very messy dialog box appears when one attempts to use TWebOSMaps.

The solution is to download the OpenLayers.js file from www.tmssoftware.biz (the only place that I have found where you can still find the required V2.12 file) and install it with your application, setting the TMapOptions.ScriptURL property to point to this file.

(There are further question about OpenLayers.js which I may raise in a separate forum thread.)


The OpenLayers.js file is indeed fetched from one of our own servers by default. In earlier versions this file was fetched directly from the OpenLayers server, but this was changed after it became unavailable.

Thank you for notifying the manual still refers to the OpenLayers server, this will be corrected with the next release of TMS VCL WebOSMaps.

As you say, the OpenLayers.js file (Version 2.12) became unavailable from the OpenLayers server. That is probably because (in the words of the OpenLayers.org website) Version 2 is "really old".

OpenLayers has now progressed to V6.1.1. Is there a plan to update the TWebOSMaps component be make use of all the new features that they have added in the past 7 years? If so, when would be the proposed release?


We are currently working on supporting the latest version of OpenLayers.
Unfortunately there is no ETA available yet.

Within 2020?