wiki:OpenLayersChanges

Changes to the OpenLayers library

THIS IS NOW DEFUNCT - OPENLAYERS 2.3 FIXES THESE PROBLEMS

We had to make minor changes to the  OpenLayers library because the library as-shipped (version 2.1) clashes with the existing use of the Rico library in the web interface to ncWMS.

  • Downloaded OpenLayers version 2.1 and extracted
  • Downloaded the latest version (1.1.2) of the  Rico library into the lib/ directory of the OpenLayers distribution and named it rico-1.1.2.js.
  • In lib/Rico/Corner.js, removed the first line of code ("var Rico = new Object();") because this erases previous copies of the Rico library
  • In build/, added rico-1.1.2.js to the [first] section of library.cfg, after Prototype.js.
  • Also in build/, ran build.sh. This generates OpenLayers.js, a self-contained and minified version of all the OL source files.

TODO: The resulting file is 231KB, which is pretty large. We don't need all of Rico, or indeed all of OpenLayers. We could create a custom OL Javascript file with just the components we need.