releaseEnvironment

Loads OpenLayers from 2.9 to 2.12 & dev releases and can choose between the compressed version or lib and add patches or not.

THIS CODE IS ONLY INTENDED TO HELP MAKE TESTS AND DEBUGGING.

Summary
releaseEnvironmentLoads OpenLayers from 2.9 to 2.12 & dev releases and can choose between the compressed version or lib and add patches or not.
Constructor
releaseEnvironmentLoads selected OpenLayers release as instructed in URL parameters.
Functions
writeScriptsWrite the scripts of the selected OL release.
writeSelectionFormWrite the selection release form.

Constructor

releaseEnvironment

Loads selected OpenLayers release as instructed in URL parameters.

URL parameters

  • release: “dev”, “2.12” ...  “2.9”
  • lib: Use lib for debug (true if `lib` parameter exists in the URL)
  • patch: Use aditional sources on `patches` option (true if `patch` parameter exists in the URL)

Parameters

options{Object}

Valid options

defaults{Object} To determine the default values without any URL parameters: `release`, `lib`, `patch`.
patchesArray({String})|{Object} List of sources patch or object with pairs: key + list patches as array.

Example 1

<title>My title</title>
<script>
    var release = new releaseEnvironment({
        defaults: {patch: true},
        patches: ['myPatch-1.js', 'myPatch-2.js']
    });
    release.writeScripts();
</script>
...
<h1 id="title">??</h1>
<div id="environmentForm"></div>
<script>
    release.writeSelectionForm('environmentForm', 'title');
</script>

Example 2

...
<script>
    var release = new releaseEnvironment({
        defaults: {patch: 'myPatch'},
        patches: {yourPatch:['yourPatch'],
                  myPatch: ['myPatch-1.js', 'myPatch-2.js']}
    });
    release.writeScripts();
</script>
...

Functions

writeScripts

this.writeScripts = function()

Write the scripts of the selected OL release.

writeSelectionForm

this.writeSelectionForm = function(formDivId,
titleDivId)

Write the selection release form.

Parameters

formDivId{String} Id of the element that will contain the form.
titleDivId{String} Id of the element that will contain the body title.
this.writeScripts = function()
Write the scripts of the selected OL release.
this.writeSelectionForm = function(formDivId,
titleDivId)
Write the selection release form.
Close