[OpenLayers-Users] loading panel question

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Fri May 21 06:47:44 EDT 2010


Hi Chris,

only add the line wrt to the LoadingPanel.js, not an extra line for
Control.js.

Install Firebug in Firefox and see if the file actually gets loaded in the
scripts tab.

Best regards,
Bart

> Hi Bart
>
> Thanks for the help. I found  " if(!singleFile) {var jsfiles = new
> Array(....." in OpenLayers.js and added
>
>   "OpenLayers/Control.js", "OpenLayers/Control/LoadingPanel.js",
>
>
> at the end of the (very long) list of controls. Unfortunately I still get
> the same result: "OpenLayers.Control.LoadingPanel is not a constructor"
>
>
> Did I do it wrong?
>
>
> Chris
>
>
>
> -----Original Message-----
> From: Bart van den Eijnden (OSGIS) [mailto:bartvde at osgis.nl]
> Sent: 21 May 2010 09:05
> To: chris.green at ibstv.co.uk
> Cc: users at openlayers.org
> Subject: Re: [OpenLayers-Users] loading panel question
>
> Hi Chris,
>
> if you do it this way, you need to add an entry to your OpenLayers.js:
>
>    if(!singleFile) {
>         var jsfiles = new Array(
>             ..
>             "OpenLayers/Control.js",
>             "OpenLayers/Control/LoadingPanel.js",
>            ..
>
> Best regards,
> Bart
>
>> Hi list
>>
>>
>>
>> I have been trying to make the loading panel work, as per
>> http://trac.openlayers.org/wiki/Addins/LoadingPanel but can't seem to
>> make
>> it work.
>>
>>
>>
>> I am using OL 2.8  (also tried 2.9 - same problem) which is referenced
>> in
>> my
>> code as:  <script src="../OpenLayers-2.8/lib/OpenLayers.js"></script>.
>>
>>
>>
>> I downloaded LoadingPanel.js and put it in the directory
>> OpenLayers-2.8/lib/OpenLayers/Control.  Then when creating a map I have:
>>
>>
>>
>> map = new OpenLayers.Map('map', options);
>>
>>  var loadingpanel = new OpenLayers.Control.LoadingPanel()
>>
>>                 map.addControl(loadingpanel);
>>
>>
>>
>> This throws an error in Firefox:  "OpenLayers.Control.LoadingPanel is
>> not
>> a
>> constructor"
>>
>>
>>
>> The loading panel instructions talk about creating a single file build
>> which
>> I have not done - is this my problem, or should I be able to make this
>> work
>> with the OL 2.8  development libraries?
>>
>>
>>
>>
>>
>> Chris
>>
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
>
>
>
>





More information about the Users mailing list