JavaScript Error

Hello,

I created a form and dropped OpenLayers component. 
Then, I copied FILES  folder from a demo application. 
The demo application runs fine. But the test I created generates Script error. 
I am not sure where is the problem. 
If I do not load openstreet.js,  the map appears and I can markers but interface buttons for zooming are missing.

SInce I cannot attached a screen shot here is an error message:
Line : 21
Char : 1 
Error: 'OpenLayers' is undefined
Code: 0
URL: file:///C:/Users/TPP/AppData/Local/Temp/tmswebosmaps.html
Do you want to continue running scripts on this page ?
My Code:


unit openStreet;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UWebOSMaps, UWebOSMapsCommon, StdCtrls, ExtCtrls, ComCtrls, Grids,
  StrUtils, ExtDlgs, Menus, Buttons, ButtonGroup, UWebOSMapsMarkers,
  UWebOSMapsPolylines, UWebOSMapsPolygons, UWebOSMapsCommonFunctions, RzPanel;
type
  TForm1 = class(TForm)
    RzPanel1: TRzPanel;
    WebOSMaps1: TWebOSMaps;
    procedure FormCreate(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    function GlobalPath: String;
  end;
var
  Form1: TForm1;
implementation


{$R *.dfm}


procedure TForm1.FormCreate(Sender: TObject);
begin
  WebOSMaps1.MapOptions.StyleURL := GlobalPath + 'Files\theme\style.css';
  WebOSMaps1.MapOptions.ScriptURL := GlobalPath + 'Files\OpenLayers.js';
  WebOSMaps1.MapOptions.ImageURL := GlobalPath + 'Files\img';
end;


procedure TForm1.FormShow(Sender: TObject);
begin
   WebOSMaps1.Launch;
end;


function TForm1.GlobalPath: String;
begin
   Result := ExtractFilePath(Application.ExeName);
end;


end.



Thanks for any suggestions.

Hi,


Can you please make sure the "Files" folder has been placed in the same folder where your application's executable is located?
By default this is in a sub folder of your application folder called "Win32/Debug"

Thank you !

It worked.