Menu

Create_OpenLayers_Custom_Build

Anonymous

This page explains creating the custom build for Openlayers

1. download and install python version 2.7

2. Checkout the source code fro open layers.

3. navigate to the build folder a create a file named custom_build.cfg and paste the following code into it:

# This file contains the list of openlayers classess used by carbones webapplication
# requirements: Install python
#./build.py custom_build


[first]
OpenLayers/SingleFile.js
OpenLayers.js
OpenLayers/BaseTypes.js
OpenLayers/BaseTypes/Class.js
OpenLayers/Util.js

[last]

[include]
OpenLayers/Map.js
OpenLayers/Layer/WMS.js
OpenLayers/Layer/WMS/Untiled.js
OpenLayers/Layer/Image.js
OpenLayers/Control/MousePosition.js
OpenLayers/Bounds.js
OpenLayers/Control/PanZoom.js
OpenLayers/Control/Navigation.js
OpenLayers/Control/PanPanel.js
OpenLayers/Control/MouseToolbar.js
OpenLayers/Control/KeyboardDefaults.js
OpenLayers/Control/ArgParser.js
OpenLayers/Control/Attribution.js
OpenLayers/Control/NavigationHistory.js 
[exclude]

4. navigate to the build folder in your command line and type build custom_config.

5. An optimized build named Openlayers.js gets created in the same folder. Copy this into your webapp and point it in Map.jsp


MongoDB Logo MongoDB