Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rbartley
Specialist II
Specialist II

Empty extension folders - location of extension files

Hello all,

I would like to install a local copy of the OpenLayers javascript library, but I'm not sure where to copy the files.  When I look at the directory structure on the Sense server, I can see a path "Sense\Repository\Extensions" which has a folder for each extension, but these folders are empty, whereas I had expected to find the qext, js, etc. extension files.  Does anyone know where the extension files are located and the best place to install library files?

Regards,

Richard

5 Replies
ErikWetterberg

Hi Richard,

Are you going to use OpenLayers in an extension? In that case you need to zip it and import through the QMC.

Hope this helps

Erik

rbartley
Specialist II
Specialist II
Author

Hi Erik,

Thanks for replying.  Yes, I am going to use it in an extension.  Are you saying that I should zip the extension and the library files in the same zip files and import?  I would like the OpenLayers files to be accessible by other extensions rather than being located within the folder structure of the extension.  Could you please clarify?

Regards,

Richard

ErikWetterberg

Hi Richard,

It is perfectly possible to reference the files from one extension in another one. You only need to make sure your requirejs references are correct.

If your extension XXX contains file lib.js and you want to reference it from extension YYY you need to define the dependency like this:

define(["extensions/XXX/lib".......

Then you need to make sure that both extensions are installed at the same time. An easy way to do this is to have them in the same zip file, in different directories within the zip file.

When you upgrade the extensions you need to delete both the old versions before importing the new zip, or the import will fail.

Hope this helps

Erik

rbartley
Specialist II
Specialist II
Author

Thanks Erik.  Could I also upload the library by adding a new Content Library through the QMC?