Commit f13c3e33 authored by Pere Cortes's avatar Pere Cortes Committed by Sebastien Robin

erp5_javascript_openlayers bt5

parent cc121168
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>openlayers</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>openlayers</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>OpenLayers</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>/srv/slapgrid/slappart165/tmp/openlayers/lib/OpenLayers</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.77</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>Animation.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/**\n
* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. \n
*\n
* @requires OpenLayers/SingleFile.js\n
*/\n
\n
/**\n
* Namespace: OpenLayers.Animation\n
* A collection of utility functions for executing methods that repaint a \n
* portion of the browser window. These methods take advantage of the\n
* browser\'s scheduled repaints where requestAnimationFrame is available.\n
*/\n
OpenLayers.Animation = (function(window) {\n
\n
/**\n
* Property: isNative\n
* {Boolean} true if a native requestAnimationFrame function is available\n
*/\n
var isNative = !!(window.requestAnimationFrame ||\n
window.webkitRequestAnimationFrame ||\n
window.mozRequestAnimationFrame ||\n
window.oRequestAnimationFrame ||\n
window.msRequestAnimationFrame);\n
\n
/**\n
* Function: requestFrame\n
* Schedule a function to be called at the next available animation frame.\n
* Uses the native method where available. Where requestAnimationFrame is\n
* not available, setTimeout will be called with a 16ms delay.\n
*\n
* Parameters:\n
* callback - {Function} The function to be called at the next animation frame.\n
* element - {DOMElement} Optional element that visually bounds the animation.\n
*/\n
var requestFrame = (function() {\n
var request = window.requestAnimationFrame ||\n
window.webkitRequestAnimationFrame ||\n
window.mozRequestAnimationFrame ||\n
window.oRequestAnimationFrame ||\n
window.msRequestAnimationFrame ||\n
function(callback, element) {\n
window.setTimeout(callback, 16);\n
};\n
// bind to window to avoid illegal invocation of native function\n
return function(callback, element) {\n
request.apply(window, [callback, element]);\n
};\n
})();\n
\n
// private variables for animation loops\n
var counter = 0;\n
var loops = {};\n
\n
/**\n
* Function: start\n
* Executes a method with <requestFrame> in series for some \n
* duration.\n
*\n
* Parameters:\n
* callback - {Function} The function to be called at the next animation frame.\n
* duration - {Number} Optional duration for the loop. If not provided, the\n
* animation loop will execute indefinitely.\n
* element - {DOMElement} Optional element that visually bounds the animation.\n
*\n
* Returns:\n
* {Number} Identifier for the animation loop. Used to stop animations with\n
* <stop>.\n
*/\n
function start(callback, duration, element) {\n
duration = duration > 0 ? duration : Number.POSITIVE_INFINITY;\n
var id = ++counter;\n
var start = +new Date;\n
loops[id] = function() {\n
if (loops[id] && +new Date - start <= duration) {\n
callback();\n
if (loops[id]) {\n
requestFrame(loops[id], element);\n
}\n
} else {\n
delete loops[id];\n
}\n
};\n
requestFrame(loops[id], element);\n
return id;\n
}\n
\n
/**\n
* Function: stop\n
* Terminates an animation loop started with <start>.\n
*\n
* Parameters:\n
* id - {Number} Identifier returned from <start>.\n
*/\n
function stop(id) {\n
delete loops[id];\n
}\n
\n
return {\n
isNative: isNative,\n
requestFrame: requestFrame,\n
start: start,\n
stop: stop\n
};\n
\n
})(window);\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3633</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BaseTypes</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>/srv/slapgrid/slappart165/tmp/openlayers/lib/OpenLayers/BaseTypes</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.78</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>Class.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/SingleFile.js\n
*/\n
\n
/**\n
* Constructor: OpenLayers.Class\n
* Base class used to construct all other classes. Includes support for \n
* multiple inheritance. \n
* \n
* This constructor is new in OpenLayers 2.5. At OpenLayers 3.0, the old \n
* syntax for creating classes and dealing with inheritance \n
* will be removed.\n
* \n
* To create a new OpenLayers-style class, use the following syntax:\n
* (code)\n
* var MyClass = OpenLayers.Class(prototype);\n
* (end)\n
*\n
* To create a new OpenLayers-style class with multiple inheritance, use the\n
* following syntax:\n
* (code)\n
* var MyClass = OpenLayers.Class(Class1, Class2, prototype);\n
* (end)\n
* \n
* Note that instanceof reflection will only reveal Class1 as superclass.\n
*\n
*/\n
OpenLayers.Class = function() {\n
var len = arguments.length;\n
var P = arguments[0];\n
var F = arguments[len-1];\n
\n
var C = typeof F.initialize == "function" ?\n
F.initialize :\n
function(){ P.prototype.initialize.apply(this, arguments); };\n
\n
if (len > 1) {\n
var newArgs = [C, P].concat(\n
Array.prototype.slice.call(arguments).slice(1, len-1), F);\n
OpenLayers.inherit.apply(null, newArgs);\n
} else {\n
C.prototype = F;\n
}\n
return C;\n
};\n
\n
/**\n
* Function: OpenLayers.inherit\n
*\n
* Parameters:\n
* C - {Object} the class that inherits\n
* P - {Object} the superclass to inherit from\n
*\n
* In addition to the mandatory C and P parameters, an arbitrary number of\n
* objects can be passed, which will extend C.\n
*/\n
OpenLayers.inherit = function(C, P) {\n
var F = function() {};\n
F.prototype = P.prototype;\n
C.prototype = new F;\n
var i, l, o;\n
for(i=2, l=arguments.length; i<l; i++) {\n
o = arguments[i];\n
if(typeof o === "function") {\n
o = o.prototype;\n
}\n
OpenLayers.Util.extend(C.prototype, o);\n
}\n
};\n
\n
/**\n
* APIFunction: extend\n
* Copy all properties of a source object to a destination object. Modifies\n
* the passed in destination object. Any properties on the source object\n
* that are set to undefined will not be (re)set on the destination object.\n
*\n
* Parameters:\n
* destination - {Object} The object that will be modified\n
* source - {Object} The object with properties to be set on the destination\n
*\n
* Returns:\n
* {Object} The destination object.\n
*/\n
OpenLayers.Util = OpenLayers.Util || {};\n
OpenLayers.Util.extend = function(destination, source) {\n
destination = destination || {};\n
if (source) {\n
for (var property in source) {\n
var value = source[property];\n
if (value !== undefined) {\n
destination[property] = value;\n
}\n
}\n
\n
/**\n
* IE doesn\'t include the toString property when iterating over an object\'s\n
* properties with the for(property in object) syntax. Explicitly check if\n
* the source has its own toString property.\n
*/\n
\n
/*\n
* FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative\n
* prototype object" when calling hawOwnProperty if the source object\n
* is an instance of window.Event.\n
*/\n
\n
var sourceIsEvt = typeof window.Event == "function"\n
&& source instanceof window.Event;\n
\n
if (!sourceIsEvt\n
&& source.hasOwnProperty && source.hasOwnProperty("toString")) {\n
destination.toString = source.toString;\n
}\n
}\n
return destination;\n
};\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3740</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.78</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>Date.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for\n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/SingleFile.js\n
*/\n
\n
/**\n
* Namespace: OpenLayers.Date\n
* Contains implementations of Date.parse and date.toISOString that match the\n
* ECMAScript 5 specification for parsing RFC 3339 dates.\n
* http://tools.ietf.org/html/rfc3339\n
*/\n
OpenLayers.Date = {\n
\n
/**\n
* APIMethod: toISOString\n
* Generates a string representing a date. The format of the string follows\n
* the profile of ISO 8601 for date and time on the Internet (see\n
* http://tools.ietf.org/html/rfc3339). If the toISOString method is\n
* available on the Date prototype, that is used. The toISOString\n
* method for Date instances is defined in ECMA-262.\n
*\n
* Parameters:\n
* date - {Date} A date object.\n
*\n
* Returns:\n
* {String} A string representing the date (e.g.\n
* "2010-08-07T16:58:23.123Z"). If the date does not have a valid time\n
* (i.e. isNaN(date.getTime())) this method returns the string "Invalid\n
* Date". The ECMA standard says the toISOString method should throw\n
* RangeError in this case, but Firefox returns a string instead. For\n
* best results, use isNaN(date.getTime()) to determine date validity\n
* before generating date strings.\n
*/\n
toISOString: (function() {\n
if ("toISOString" in Date.prototype) {\n
return function(date) {\n
return date.toISOString();\n
};\n
} else {\n
function pad(num, len) {\n
var str = num + "";\n
while (str.length < len) {\n
str = "0" + str;\n
}\n
return str;\n
}\n
return function(date) {\n
var str;\n
if (isNaN(date.getTime())) {\n
// ECMA-262 says throw RangeError, Firefox returns\n
// "Invalid Date"\n
str = "Invalid Date";\n
} else {\n
str =\n
date.getUTCFullYear() + "-" +\n
pad(date.getUTCMonth() + 1, 2) + "-" +\n
pad(date.getUTCDate(), 2) + "T" +\n
pad(date.getUTCHours(), 2) + ":" +\n
pad(date.getUTCMinutes(), 2) + ":" +\n
pad(date.getUTCSeconds(), 2) + "." +\n
pad(date.getUTCMilliseconds(), 3) + "Z";\n
}\n
return str;\n
};\n
}\n
\n
})(),\n
\n
/**\n
* APIMethod: parse\n
* Generate a date object from a string. The format for the string follows\n
* the profile of ISO 8601 for date and time on the Internet (see\n
* http://tools.ietf.org/html/rfc3339). We don\'t call the native\n
* Date.parse because of inconsistency between implmentations. In\n
* Chrome, calling Date.parse with a string that doesn\'t contain any\n
* indication of the timezone (e.g. "2011"), the date is interpreted\n
* in local time. On Firefox, the assumption is UTC.\n
*\n
* Parameters:\n
* str - {String} A string representing the date (e.g.\n
* "2010", "2010-08", "2010-08-07", "2010-08-07T16:58:23.123Z",\n
* "2010-08-07T11:58:23.123-06").\n
*\n
* Returns:\n
* {Date} A date object. If the string could not be parsed, an invalid\n
* date is returned (i.e. isNaN(date.getTime())).\n
*/\n
parse: function(str) {\n
var date;\n
var match = str.match(/^(?:(\\d{4})(?:-(\\d{2})(?:-(\\d{2}))?)?)?(?:(?:T(\\d{1,2}):(\\d{2}):(\\d{2}(?:\\.\\d+)?)(Z|(?:[+-]\\d{1,2}(?::(\\d{2}))?)))|Z)?$/);\n
if (match && (match[1] || match[7])) { // must have at least year or time\n
var year = parseInt(match[1], 10) || 0;\n
var month = (parseInt(match[2], 10) - 1) || 0;\n
var day = parseInt(match[3], 10) || 1;\n
date = new Date(Date.UTC(year, month, day));\n
// optional time\n
var type = match[7];\n
if (type) {\n
var hours = parseInt(match[4], 10);\n
var minutes = parseInt(match[5], 10);\n
var secFrac = parseFloat(match[6]);\n
var seconds = secFrac | 0;\n
var milliseconds = Math.round(1000 * (secFrac - seconds));\n
date.setUTCHours(hours, minutes, seconds, milliseconds);\n
// check offset\n
if (type !== "Z") {\n
var hoursOffset = parseInt(type, 10);\n
var minutesOffset = parseInt(match[8], 10) || 0;\n
var offset = -1000 * (60 * (hoursOffset * 60) + minutesOffset * 60);\n
date = new Date(date.getTime() + offset);\n
}\n
}\n
} else {\n
date = new Date("invalid");\n
}\n
return date;\n
}\n
};\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5071</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.78</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>Element.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/Util.js\n
* @requires OpenLayers/BaseTypes.js\n
*/\n
\n
/**\n
* Namespace: OpenLayers.Element\n
*/\n
OpenLayers.Element = {\n
\n
/**\n
* APIFunction: visible\n
* \n
* Parameters: \n
* element - {DOMElement}\n
* \n
* Returns:\n
* {Boolean} Is the element visible?\n
*/\n
visible: function(element) {\n
return OpenLayers.Util.getElement(element).style.display != \'none\';\n
},\n
\n
/**\n
* APIFunction: toggle\n
* Toggle the visibility of element(s) passed in\n
* \n
* Parameters:\n
* element - {DOMElement} Actually user can pass any number of elements\n
*/\n
toggle: function() {\n
for (var i=0, len=arguments.length; i<len; i++) {\n
var element = OpenLayers.Util.getElement(arguments[i]);\n
var display = OpenLayers.Element.visible(element) ? \'none\' \n
: \'\';\n
element.style.display = display;\n
}\n
},\n
\n
/**\n
* APIFunction: remove\n
* Remove the specified element from the DOM.\n
* \n
* Parameters:\n
* element - {DOMElement}\n
*/\n
remove: function(element) {\n
element = OpenLayers.Util.getElement(element);\n
element.parentNode.removeChild(element);\n
},\n
\n
/**\n
* APIFunction: getHeight\n
* \n
* Parameters:\n
* element - {DOMElement}\n
* \n
* Returns:\n
* {Integer} The offset height of the element passed in\n
*/\n
getHeight: function(element) {\n
element = OpenLayers.Util.getElement(element);\n
return element.offsetHeight;\n
},\n
\n
/**\n
* Function: hasClass\n
* Tests if an element has the given CSS class name.\n
*\n
* Parameters:\n
* element - {DOMElement} A DOM element node.\n
* name - {String} The CSS class name to search for.\n
*\n
* Returns:\n
* {Boolean} The element has the given class name.\n
*/\n
hasClass: function(element, name) {\n
var names = element.className;\n
return (!!names && new RegExp("(^|\\\\s)" + name + "(\\\\s|$)").test(names));\n
},\n
\n
/**\n
* Function: addClass\n
* Add a CSS class name to an element. Safe where element already has\n
* the class name.\n
*\n
* Parameters:\n
* element - {DOMElement} A DOM element node.\n
* name - {String} The CSS class name to add.\n
*\n
* Returns:\n
* {DOMElement} The element.\n
*/\n
addClass: function(element, name) {\n
if(!OpenLayers.Element.hasClass(element, name)) {\n
element.className += (element.className ? " " : "") + name;\n
}\n
return element;\n
},\n
\n
/**\n
* Function: removeClass\n
* Remove a CSS class name from an element. Safe where element does not\n
* have the class name.\n
*\n
* Parameters:\n
* element - {DOMElement} A DOM element node.\n
* name - {String} The CSS class name to remove.\n
*\n
* Returns:\n
* {DOMElement} The element.\n
*/\n
removeClass: function(element, name) {\n
var names = element.className;\n
if(names) {\n
element.className = OpenLayers.String.trim(\n
names.replace(\n
new RegExp("(^|\\\\s+)" + name + "(\\\\s+|$)"), " "\n
)\n
);\n
}\n
return element;\n
},\n
\n
/**\n
* Function: toggleClass\n
* Remove a CSS class name from an element if it exists. Add the class name\n
* if it doesn\'t exist.\n
*\n
* Parameters:\n
* element - {DOMElement} A DOM element node.\n
* name - {String} The CSS class name to toggle.\n
*\n
* Returns:\n
* {DOMElement} The element.\n
*/\n
toggleClass: function(element, name) {\n
if(OpenLayers.Element.hasClass(element, name)) {\n
OpenLayers.Element.removeClass(element, name);\n
} else {\n
OpenLayers.Element.addClass(element, name);\n
}\n
return element;\n
},\n
\n
/**\n
* APIFunction: getStyle\n
* \n
* Parameters:\n
* element - {DOMElement}\n
* style - {?}\n
* \n
* Returns:\n
* {?}\n
*/\n
getStyle: function(element, style) {\n
element = OpenLayers.Util.getElement(element);\n
\n
var value = null;\n
if (element && element.style) {\n
value = element.style[OpenLayers.String.camelize(style)];\n
if (!value) {\n
if (document.defaultView && \n
document.defaultView.getComputedStyle) {\n
\n
var css = document.defaultView.getComputedStyle(element, null);\n
value = css ? css.getPropertyValue(style) : null;\n
} else if (element.currentStyle) {\n
value = element.currentStyle[OpenLayers.String.camelize(style)];\n
}\n
}\n
\n
var positions = [\'left\', \'top\', \'right\', \'bottom\'];\n
if (window.opera &&\n
(OpenLayers.Util.indexOf(positions,style) != -1) &&\n
(OpenLayers.Element.getStyle(element, \'position\') == \'static\')) { \n
value = \'auto\';\n
}\n
}\n
\n
return value == \'auto\' ? null : value;\n
}\n
\n
};\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5398</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.78</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>LonLat.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/BaseTypes/Class.js\n
*/\n
\n
/**\n
* Class: OpenLayers.LonLat\n
* This class represents a longitude and latitude pair\n
*/\n
OpenLayers.LonLat = OpenLayers.Class({\n
\n
/** \n
* APIProperty: lon\n
* {Float} The x-axis coodinate in map units\n
*/\n
lon: 0.0,\n
\n
/** \n
* APIProperty: lat\n
* {Float} The y-axis coordinate in map units\n
*/\n
lat: 0.0,\n
\n
/**\n
* Constructor: OpenLayers.LonLat\n
* Create a new map location. Coordinates can be passed either as two\n
* arguments, or as a single argument.\n
*\n
* Parameters (two arguments):\n
* lon - {Number} The x-axis coordinate in map units. If your map is in\n
* a geographic projection, this will be the Longitude. Otherwise,\n
* it will be the x coordinate of the map location in your map units.\n
* lat - {Number} The y-axis coordinate in map units. If your map is in\n
* a geographic projection, this will be the Latitude. Otherwise,\n
* it will be the y coordinate of the map location in your map units.\n
*\n
* Parameters (single argument):\n
* location - {Array(Float)} [lon, lat]\n
*/\n
initialize: function(lon, lat) {\n
if (OpenLayers.Util.isArray(lon)) {\n
lat = lon[1];\n
lon = lon[0];\n
}\n
this.lon = OpenLayers.Util.toFloat(lon);\n
this.lat = OpenLayers.Util.toFloat(lat);\n
},\n
\n
/**\n
* Method: toString\n
* Return a readable string version of the lonlat\n
*\n
* Returns:\n
* {String} String representation of OpenLayers.LonLat object. \n
* (e.g. <i>"lon=5,lat=42"</i>)\n
*/\n
toString:function() {\n
return ("lon=" + this.lon + ",lat=" + this.lat);\n
},\n
\n
/** \n
* APIMethod: toShortString\n
* \n
* Returns:\n
* {String} Shortened String representation of OpenLayers.LonLat object. \n
* (e.g. <i>"5, 42"</i>)\n
*/\n
toShortString:function() {\n
return (this.lon + ", " + this.lat);\n
},\n
\n
/** \n
* APIMethod: clone\n
* \n
* Returns:\n
* {<OpenLayers.LonLat>} New OpenLayers.LonLat object with the same lon \n
* and lat values\n
*/\n
clone:function() {\n
return new OpenLayers.LonLat(this.lon, this.lat);\n
},\n
\n
/** \n
* APIMethod: add\n
* \n
* Parameters:\n
* lon - {Float}\n
* lat - {Float}\n
* \n
* Returns:\n
* {<OpenLayers.LonLat>} A new OpenLayers.LonLat object with the lon and \n
* lat passed-in added to this\'s. \n
*/\n
add:function(lon, lat) {\n
if ( (lon == null) || (lat == null) ) {\n
throw new TypeError(\'LonLat.add cannot receive null values\');\n
}\n
return new OpenLayers.LonLat(this.lon + OpenLayers.Util.toFloat(lon), \n
this.lat + OpenLayers.Util.toFloat(lat));\n
},\n
\n
/** \n
* APIMethod: equals\n
* \n
* Parameters:\n
* ll - {<OpenLayers.LonLat>}\n
* \n
* Returns:\n
* {Boolean} Boolean value indicating whether the passed-in \n
* <OpenLayers.LonLat> object has the same lon and lat \n
* components as this.\n
* Note: if ll passed in is null, returns false\n
*/\n
equals:function(ll) {\n
var equals = false;\n
if (ll != null) {\n
equals = ((this.lon == ll.lon && this.lat == ll.lat) ||\n
(isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat)));\n
}\n
return equals;\n
},\n
\n
/**\n
* APIMethod: transform\n
* Transform the LonLat object from source to dest. This transformation is\n
* *in place*: if you want a *new* lonlat, use .clone() first.\n
*\n
* Parameters: \n
* source - {<OpenLayers.Projection>} Source projection. \n
* dest - {<OpenLayers.Projection>} Destination projection. \n
*\n
* Returns:\n
* {<OpenLayers.LonLat>} Itself, for use in chaining operations.\n
*/\n
transform: function(source, dest) {\n
var point = OpenLayers.Projection.transform(\n
{\'x\': this.lon, \'y\': this.lat}, source, dest);\n
this.lon = point.x;\n
this.lat = point.y;\n
return this;\n
},\n
\n
/**\n
* APIMethod: wrapDateLine\n
* \n
* Parameters:\n
* maxExtent - {<OpenLayers.Bounds>}\n
* \n
* Returns:\n
* {<OpenLayers.LonLat>} A copy of this lonlat, but wrapped around the \n
* "dateline" (as specified by the borders of \n
* maxExtent)\n
*/\n
wrapDateLine: function(maxExtent) { \n
\n
var newLonLat = this.clone();\n
\n
if (maxExtent) {\n
//shift right?\n
while (newLonLat.lon < maxExtent.left) {\n
newLonLat.lon += maxExtent.getWidth();\n
} \n
\n
//shift left?\n
while (newLonLat.lon > maxExtent.right) {\n
newLonLat.lon -= maxExtent.getWidth();\n
} \n
}\n
\n
return newLonLat;\n
},\n
\n
CLASS_NAME: "OpenLayers.LonLat"\n
});\n
\n
/** \n
* Function: fromString\n
* Alternative constructor that builds a new <OpenLayers.LonLat> from a \n
* parameter string\n
* \n
* Parameters:\n
* str - {String} Comma-separated Lon,Lat coordinate string. \n
* (e.g. <i>"5,40"</i>)\n
* \n
* Returns:\n
* {<OpenLayers.LonLat>} New <OpenLayers.LonLat> object built from the \n
* passed-in String.\n
*/\n
OpenLayers.LonLat.fromString = function(str) {\n
var pair = str.split(",");\n
return new OpenLayers.LonLat(pair[0], pair[1]);\n
};\n
\n
/** \n
* Function: fromArray\n
* Alternative constructor that builds a new <OpenLayers.LonLat> from an \n
* array of two numbers that represent lon- and lat-values.\n
* \n
* Parameters:\n
* arr - {Array(Float)} Array of lon/lat values (e.g. [5,-42])\n
* \n
* Returns:\n
* {<OpenLayers.LonLat>} New <OpenLayers.LonLat> object built from the \n
* passed-in array.\n
*/\n
OpenLayers.LonLat.fromArray = function(arr) {\n
var gotArr = OpenLayers.Util.isArray(arr),\n
lon = gotArr && arr[0],\n
lat = gotArr && arr[1];\n
return new OpenLayers.LonLat(lon, lat);\n
};\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>6425</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.78</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>Pixel.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/BaseTypes/Class.js\n
*/\n
\n
/**\n
* Class: OpenLayers.Pixel\n
* This class represents a screen coordinate, in x and y coordinates\n
*/\n
OpenLayers.Pixel = OpenLayers.Class({\n
\n
/**\n
* APIProperty: x\n
* {Number} The x coordinate\n
*/\n
x: 0.0,\n
\n
/**\n
* APIProperty: y\n
* {Number} The y coordinate\n
*/\n
y: 0.0,\n
\n
/**\n
* Constructor: OpenLayers.Pixel\n
* Create a new OpenLayers.Pixel instance\n
*\n
* Parameters:\n
* x - {Number} The x coordinate\n
* y - {Number} The y coordinate\n
*\n
* Returns:\n
* An instance of OpenLayers.Pixel\n
*/\n
initialize: function(x, y) {\n
this.x = parseFloat(x);\n
this.y = parseFloat(y);\n
},\n
\n
/**\n
* Method: toString\n
* Cast this object into a string\n
*\n
* Returns:\n
* {String} The string representation of Pixel. ex: "x=200.4,y=242.2"\n
*/\n
toString:function() {\n
return ("x=" + this.x + ",y=" + this.y);\n
},\n
\n
/**\n
* APIMethod: clone\n
* Return a clone of this pixel object\n
*\n
* Returns:\n
* {<OpenLayers.Pixel>} A clone pixel\n
*/\n
clone:function() {\n
return new OpenLayers.Pixel(this.x, this.y); \n
},\n
\n
/**\n
* APIMethod: equals\n
* Determine whether one pixel is equivalent to another\n
*\n
* Parameters:\n
* px - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with\n
* a \'x\' and \'y\' properties.\n
*\n
* Returns:\n
* {Boolean} The point passed in as parameter is equal to this. Note that\n
* if px passed in is null, returns false.\n
*/\n
equals:function(px) {\n
var equals = false;\n
if (px != null) {\n
equals = ((this.x == px.x && this.y == px.y) ||\n
(isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y)));\n
}\n
return equals;\n
},\n
\n
/**\n
* APIMethod: distanceTo\n
* Returns the distance to the pixel point passed in as a parameter.\n
*\n
* Parameters:\n
* px - {<OpenLayers.Pixel>}\n
*\n
* Returns:\n
* {Float} The pixel point passed in as parameter to calculate the\n
* distance to.\n
*/\n
distanceTo:function(px) {\n
return Math.sqrt(\n
Math.pow(this.x - px.x, 2) +\n
Math.pow(this.y - px.y, 2)\n
);\n
},\n
\n
/**\n
* APIMethod: add\n
*\n
* Parameters:\n
* x - {Integer}\n
* y - {Integer}\n
*\n
* Returns:\n
* {<OpenLayers.Pixel>} A new Pixel with this pixel\'s x&y augmented by the \n
* values passed in.\n
*/\n
add:function(x, y) {\n
if ( (x == null) || (y == null) ) {\n
throw new TypeError(\'Pixel.add cannot receive null values\');\n
}\n
return new OpenLayers.Pixel(this.x + x, this.y + y);\n
},\n
\n
/**\n
* APIMethod: offset\n
* \n
* Parameters\n
* px - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with\n
* a \'x\' and \'y\' properties.\n
* \n
* Returns:\n
* {<OpenLayers.Pixel>} A new Pixel with this pixel\'s x&y augmented by the \n
* x&y values of the pixel passed in.\n
*/\n
offset:function(px) {\n
var newPx = this.clone();\n
if (px) {\n
newPx = this.add(px.x, px.y);\n
}\n
return newPx;\n
},\n
\n
CLASS_NAME: "OpenLayers.Pixel"\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3649</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.78</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>Size.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/BaseTypes/Class.js\n
*/\n
\n
/**\n
* Class: OpenLayers.Size\n
* Instances of this class represent a width/height pair\n
*/\n
OpenLayers.Size = OpenLayers.Class({\n
\n
/**\n
* APIProperty: w\n
* {Number} width\n
*/\n
w: 0.0,\n
\n
/**\n
* APIProperty: h\n
* {Number} height\n
*/\n
h: 0.0,\n
\n
\n
/**\n
* Constructor: OpenLayers.Size\n
* Create an instance of OpenLayers.Size\n
*\n
* Parameters:\n
* w - {Number} width\n
* h - {Number} height\n
*/\n
initialize: function(w, h) {\n
this.w = parseFloat(w);\n
this.h = parseFloat(h);\n
},\n
\n
/**\n
* Method: toString\n
* Return the string representation of a size object\n
*\n
* Returns:\n
* {String} The string representation of OpenLayers.Size object. \n
* (e.g. <i>"w=55,h=66"</i>)\n
*/\n
toString:function() {\n
return ("w=" + this.w + ",h=" + this.h);\n
},\n
\n
/**\n
* APIMethod: clone\n
* Create a clone of this size object\n
*\n
* Returns:\n
* {<OpenLayers.Size>} A new OpenLayers.Size object with the same w and h\n
* values\n
*/\n
clone:function() {\n
return new OpenLayers.Size(this.w, this.h);\n
},\n
\n
/**\n
*\n
* APIMethod: equals\n
* Determine where this size is equal to another\n
*\n
* Parameters:\n
* sz - {<OpenLayers.Size>|Object} An OpenLayers.Size or an object with\n
* a \'w\' and \'h\' properties.\n
*\n
* Returns: \n
* {Boolean} The passed in size has the same h and w properties as this one.\n
* Note that if sz passed in is null, returns false.\n
*/\n
equals:function(sz) {\n
var equals = false;\n
if (sz != null) {\n
equals = ((this.w == sz.w && this.h == sz.h) ||\n
(isNaN(this.w) && isNaN(this.h) && isNaN(sz.w) && isNaN(sz.h)));\n
}\n
return equals;\n
},\n
\n
CLASS_NAME: "OpenLayers.Size"\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>2191</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.77</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>Console.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/BaseTypes/Class.js\n
*/\n
\n
/**\n
* Namespace: OpenLayers.Console\n
* The OpenLayers.Console namespace is used for debugging and error logging.\n
* If the Firebug Lite (../Firebug/firebug.js) is included before this script,\n
* calls to OpenLayers.Console methods will get redirected to window.console.\n
* This makes use of the Firebug extension where available and allows for\n
* cross-browser debugging Firebug style.\n
*\n
* Note:\n
* Note that behavior will differ with the Firebug extention and Firebug Lite.\n
* Most notably, the Firebug Lite console does not currently allow for\n
* hyperlinks to code or for clicking on object to explore their properties.\n
* \n
*/\n
OpenLayers.Console = {\n
/**\n
* Create empty functions for all console methods. The real value of these\n
* properties will be set if Firebug Lite (../Firebug/firebug.js script) is\n
* included. We explicitly require the Firebug Lite script to trigger\n
* functionality of the OpenLayers.Console methods.\n
*/\n
\n
/**\n
* APIFunction: log\n
* Log an object in the console. The Firebug Lite console logs string\n
* representation of objects. Given multiple arguments, they will\n
* be cast to strings and logged with a space delimiter. If the first\n
* argument is a string with printf-like formatting, subsequent arguments\n
* will be used in string substitution. Any additional arguments (beyond\n
* the number substituted in a format string) will be appended in a space-\n
* delimited line.\n
* \n
* Parameters:\n
* object - {Object}\n
*/\n
log: function() {},\n
\n
/**\n
* APIFunction: debug\n
* Writes a message to the console, including a hyperlink to the line\n
* where it was called.\n
*\n
* May be called with multiple arguments as with OpenLayers.Console.log().\n
* \n
* Parameters:\n
* object - {Object}\n
*/\n
debug: function() {},\n
\n
/**\n
* APIFunction: info\n
* Writes a message to the console with the visual "info" icon and color\n
* coding and a hyperlink to the line where it was called.\n
*\n
* May be called with multiple arguments as with OpenLayers.Console.log().\n
* \n
* Parameters:\n
* object - {Object}\n
*/\n
info: function() {},\n
\n
/**\n
* APIFunction: warn\n
* Writes a message to the console with the visual "warning" icon and\n
* color coding and a hyperlink to the line where it was called.\n
*\n
* May be called with multiple arguments as with OpenLayers.Console.log().\n
* \n
* Parameters:\n
* object - {Object}\n
*/\n
warn: function() {},\n
\n
/**\n
* APIFunction: error\n
* Writes a message to the console with the visual "error" icon and color\n
* coding and a hyperlink to the line where it was called.\n
*\n
* May be called with multiple arguments as with OpenLayers.Console.log().\n
* \n
* Parameters:\n
* object - {Object}\n
*/\n
error: function() {},\n
\n
/**\n
* APIFunction: userError\n
* A single interface for showing error messages to the user. The default\n
* behavior is a Javascript alert, though this can be overridden by\n
* reassigning OpenLayers.Console.userError to a different function.\n
*\n
* Expects a single error message\n
* \n
* Parameters:\n
* error - {Object}\n
*/\n
userError: function(error) {\n
alert(error);\n
},\n
\n
/**\n
* APIFunction: assert\n
* Tests that an expression is true. If not, it will write a message to\n
* the console and throw an exception.\n
*\n
* May be called with multiple arguments as with OpenLayers.Console.log().\n
* \n
* Parameters:\n
* object - {Object}\n
*/\n
assert: function() {},\n
\n
/**\n
* APIFunction: dir\n
* Prints an interactive listing of all properties of the object. This\n
* looks identical to the view that you would see in the DOM tab.\n
* \n
* Parameters:\n
* object - {Object}\n
*/\n
dir: function() {},\n
\n
/**\n
* APIFunction: dirxml\n
* Prints the XML source tree of an HTML or XML element. This looks\n
* identical to the view that you would see in the HTML tab. You can click\n
* on any node to inspect it in the HTML tab.\n
* \n
* Parameters:\n
* object - {Object}\n
*/\n
dirxml: function() {},\n
\n
/**\n
* APIFunction: trace\n
* Prints an interactive stack trace of JavaScript execution at the point\n
* where it is called. The stack trace details the functions on the stack,\n
* as well as the values that were passed as arguments to each function.\n
* You can click each function to take you to its source in the Script tab,\n
* and click each argument value to inspect it in the DOM or HTML tabs.\n
* \n
*/\n
trace: function() {},\n
\n
/**\n
* APIFunction: group\n
* Writes a message to the console and opens a nested block to indent all\n
* future messages sent to the console. Call OpenLayers.Console.groupEnd()\n
* to close the block.\n
*\n
* May be called with multiple arguments as with OpenLayers.Console.log().\n
* \n
* Parameters:\n
* object - {Object}\n
*/\n
group: function() {},\n
\n
/**\n
* APIFunction: groupEnd\n
* Closes the most recently opened block created by a call to\n
* OpenLayers.Console.group\n
*/\n
groupEnd: function() {},\n
\n
/**\n
* APIFunction: time\n
* Creates a new timer under the given name. Call\n
* OpenLayers.Console.timeEnd(name)\n
* with the same name to stop the timer and print the time elapsed.\n
*\n
* Parameters:\n
* name - {String}\n
*/\n
time: function() {},\n
\n
/**\n
* APIFunction: timeEnd\n
* Stops a timer created by a call to OpenLayers.Console.time(name) and\n
* writes the time elapsed.\n
*\n
* Parameters:\n
* name - {String}\n
*/\n
timeEnd: function() {},\n
\n
/**\n
* APIFunction: profile\n
* Turns on the JavaScript profiler. The optional argument title would\n
* contain the text to be printed in the header of the profile report.\n
*\n
* This function is not currently implemented in Firebug Lite.\n
* \n
* Parameters:\n
* title - {String} Optional title for the profiler\n
*/\n
profile: function() {},\n
\n
/**\n
* APIFunction: profileEnd\n
* Turns off the JavaScript profiler and prints its report.\n
* \n
* This function is not currently implemented in Firebug Lite.\n
*/\n
profileEnd: function() {},\n
\n
/**\n
* APIFunction: count\n
* Writes the number of times that the line of code where count was called\n
* was executed. The optional argument title will print a message in\n
* addition to the number of the count.\n
*\n
* This function is not currently implemented in Firebug Lite.\n
*\n
* Parameters:\n
* title - {String} Optional title to be printed with count\n
*/\n
count: function() {},\n
\n
CLASS_NAME: "OpenLayers.Console"\n
};\n
\n
/**\n
* Execute an anonymous function to extend the OpenLayers.Console namespace\n
* if the firebug.js script is included. This closure is used so that the\n
* "scripts" and "i" variables don\'t pollute the global namespace.\n
*/\n
(function() {\n
/**\n
* If Firebug Lite is included (before this script), re-route all\n
* OpenLayers.Console calls to the console object.\n
*/\n
var scripts = document.getElementsByTagName("script");\n
for(var i=0, len=scripts.length; i<len; ++i) {\n
if(scripts[i].src.indexOf("firebug.js") != -1) {\n
if(console) {\n
OpenLayers.Util.extend(OpenLayers.Console, console);\n
break;\n
}\n
}\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>7885</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Control</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>/srv/slapgrid/slappart165/tmp/openlayers/lib/OpenLayers/Control</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.81</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ArgParser.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
\n
/**\n
* @requires OpenLayers/Control.js\n
*/\n
\n
/**\n
* Class: OpenLayers.Control.ArgParser\n
* The ArgParser control adds location bar query string parsing functionality \n
* to an OpenLayers Map.\n
* When added to a Map control, on a page load/refresh, the Map will \n
* automatically take the href string and parse it for lon, lat, zoom, and \n
* layers information. \n
*\n
* Inherits from:\n
* - <OpenLayers.Control>\n
*/\n
OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, {\n
\n
/**\n
* Property: center\n
* {<OpenLayers.LonLat>}\n
*/\n
center: null,\n
\n
/**\n
* Property: zoom\n
* {int}\n
*/\n
zoom: null,\n
\n
/**\n
* Property: layers\n
* {String} Each character represents the state of the corresponding layer \n
* on the map.\n
*/\n
layers: null,\n
\n
/** \n
* APIProperty: displayProjection\n
* {<OpenLayers.Projection>} Requires proj4js support. \n
* Projection used when reading the coordinates from the URL. This will\n
* reproject the map coordinates from the URL into the map\'s\n
* projection.\n
*\n
* If you are using this functionality, be aware that any permalink\n
* which is added to the map will determine the coordinate type which\n
* is read from the URL, which means you should not add permalinks with\n
* different displayProjections to the same map. \n
*/\n
displayProjection: null, \n
\n
/**\n
* Constructor: OpenLayers.Control.ArgParser\n
*\n
* Parameters:\n
* options - {Object}\n
*/\n
\n
/**\n
* Method: getParameters\n
*/ \n
getParameters: function(url) {\n
url = url || window.location.href;\n
var parameters = OpenLayers.Util.getParameters(url);\n
\n
// If we have an anchor in the url use it to split the url\n
var index = url.indexOf(\'#\');\n
if (index > 0) {\n
// create an url to parse on the getParameters\n
url = \'?\' + url.substring(index + 1, url.length);\n
\n
OpenLayers.Util.extend(parameters,\n
OpenLayers.Util.getParameters(url));\n
}\n
return parameters;\n
},\n
\n
/**\n
* Method: setMap\n
* Set the map property for the control. \n
* \n
* Parameters:\n
* map - {<OpenLayers.Map>} \n
*/\n
setMap: function(map) {\n
OpenLayers.Control.prototype.setMap.apply(this, arguments);\n
\n
//make sure we dont already have an arg parser attached\n
for(var i=0, len=this.map.controls.length; i<len; i++) {\n
var control = this.map.controls[i];\n
if ( (control != this) &&\n
(control.CLASS_NAME == "OpenLayers.Control.ArgParser") ) {\n
\n
// If a second argparser is added to the map, then we \n
// override the displayProjection to be the one added to the\n
// map. \n
if (control.displayProjection != this.displayProjection) {\n
this.displayProjection = control.displayProjection;\n
} \n
\n
break;\n
}\n
}\n
if (i == this.map.controls.length) {\n
\n
var args = this.getParameters();\n
// Be careful to set layer first, to not trigger unnecessary layer loads\n
if (args.layers) {\n
this.layers = args.layers;\n
\n
// when we add a new layer, set its visibility \n
this.map.events.register(\'addlayer\', this, \n
this.configureLayers);\n
this.configureLayers();\n
}\n
if (args.lat && args.lon) {\n
this.center = new OpenLayers.LonLat(parseFloat(args.lon),\n
parseFloat(args.lat));\n
if (args.zoom) {\n
this.zoom = parseFloat(args.zoom);\n
}\n
\n
// when we add a new baselayer to see when we can set the center\n
this.map.events.register(\'changebaselayer\', this, \n
this.setCenter);\n
this.setCenter();\n
}\n
}\n
},\n
\n
/** \n
* Method: setCenter\n
* As soon as a baseLayer has been loaded, we center and zoom\n
* ...and remove the handler.\n
*/\n
setCenter: function() {\n
\n
if (this.map.baseLayer) {\n
//dont need to listen for this one anymore\n
this.map.events.unregister(\'changebaselayer\', this, \n
this.setCenter);\n
\n
if (this.displayProjection) {\n
this.center.transform(this.displayProjection, \n
this.map.getProjectionObject()); \n
} \n
\n
this.map.setCenter(this.center, this.zoom);\n
}\n
},\n
\n
/** \n
* Method: configureLayers\n
* As soon as all the layers are loaded, cycle through them and \n
* hide or show them. \n
*/\n
configureLayers: function() {\n
\n
if (this.layers.length == this.map.layers.length) { \n
this.map.events.unregister(\'addlayer\', this, this.configureLayers);\n
\n
for(var i=0, len=this.layers.length; i<len; i++) {\n
\n
var layer = this.map.layers[i];\n
var c = this.layers.charAt(i);\n
\n
if (c == "B") {\n
this.map.setBaseLayer(layer);\n
} else if ( (c == "T") || (c == "F") ) {\n
layer.setVisibility(c == "T");\n
}\n
}\n
}\n
}, \n
\n
CLASS_NAME: "OpenLayers.Control.ArgParser"\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5908</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.8</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>Attribution.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/Control.js\n
*/\n
\n
/**\n
* Class: OpenLayers.Control.Attribution\n
* The attribution control adds attribution from layers to the map display. \n
* It uses \'attribution\' property of each layer.\n
*\n
* Inherits from:\n
* - <OpenLayers.Control>\n
*/\n
OpenLayers.Control.Attribution = \n
OpenLayers.Class(OpenLayers.Control, {\n
\n
/**\n
* APIProperty: seperator\n
* {String} String used to seperate layers.\n
*/\n
separator: ", ",\n
\n
/**\n
* APIProperty: template\n
* {String} Template for the attribution. This has to include the substring\n
* "${layers}", which will be replaced by the layer specific\n
* attributions, separated by <separator>. The default is "${layers}".\n
*/\n
template: "${layers}",\n
\n
/**\n
* Constructor: OpenLayers.Control.Attribution \n
* \n
* Parameters:\n
* options - {Object} Options for control.\n
*/\n
\n
/** \n
* Method: destroy\n
* Destroy control.\n
*/\n
destroy: function() {\n
this.map.events.un({\n
"removelayer": this.updateAttribution,\n
"addlayer": this.updateAttribution,\n
"changelayer": this.updateAttribution,\n
"changebaselayer": this.updateAttribution,\n
scope: this\n
});\n
\n
OpenLayers.Control.prototype.destroy.apply(this, arguments);\n
}, \n
\n
/**\n
* Method: draw\n
* Initialize control.\n
* \n
* Returns: \n
* {DOMElement} A reference to the DIV DOMElement containing the control\n
*/ \n
draw: function() {\n
OpenLayers.Control.prototype.draw.apply(this, arguments);\n
\n
this.map.events.on({\n
\'changebaselayer\': this.updateAttribution,\n
\'changelayer\': this.updateAttribution,\n
\'addlayer\': this.updateAttribution,\n
\'removelayer\': this.updateAttribution,\n
scope: this\n
});\n
this.updateAttribution();\n
\n
return this.div; \n
},\n
\n
/**\n
* Method: updateAttribution\n
* Update attribution string.\n
*/\n
updateAttribution: function() {\n
var attributions = [];\n
if (this.map && this.map.layers) {\n
for(var i=0, len=this.map.layers.length; i<len; i++) {\n
var layer = this.map.layers[i];\n
if (layer.attribution && layer.getVisibility()) {\n
// add attribution only if attribution text is unique\n
if (OpenLayers.Util.indexOf(\n
attributions, layer.attribution) === -1) {\n
attributions.push( layer.attribution );\n
}\n
}\n
} \n
this.div.innerHTML = OpenLayers.String.format(this.template, {\n
layers: attributions.join(this.separator)\n
});\n
}\n
},\n
\n
CLASS_NAME: "OpenLayers.Control.Attribution"\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3155</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.8</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>Button.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/Control.js\n
*/\n
\n
/**\n
* Class: OpenLayers.Control.Button \n
* The Button control is a very simple push-button, for use with \n
* <OpenLayers.Control.Panel>.\n
* When clicked, the function trigger() is executed.\n
* \n
* Inherits from:\n
* - <OpenLayers.Control>\n
*\n
* Use:\n
* (code)\n
* var button = new OpenLayers.Control.Button({\n
* displayClass: "MyButton", trigger: myFunction\n
* });\n
* panel.addControls([button]);\n
* (end)\n
* \n
* Will create a button with CSS class MyButtonItemInactive, that\n
* will call the function MyFunction() when clicked.\n
*/\n
OpenLayers.Control.Button = OpenLayers.Class(OpenLayers.Control, {\n
/**\n
* Property: type\n
* {Integer} OpenLayers.Control.TYPE_BUTTON.\n
*/\n
type: OpenLayers.Control.TYPE_BUTTON,\n
\n
/**\n
* Method: trigger\n
* Called by a control panel when the button is clicked.\n
*/\n
trigger: function() {},\n
\n
CLASS_NAME: "OpenLayers.Control.Button"\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1217</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.81</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>CacheRead.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/Control.js\n
*/\n
\n
/**\n
* Class: OpenLayers.Control.CacheRead\n
* A control for using image tiles cached with <OpenLayers.Control.CacheWrite>\n
* from the browser\'s local storage.\n
*\n
* Inherits from:\n
* - <OpenLayers.Control>\n
*/\n
OpenLayers.Control.CacheRead = OpenLayers.Class(OpenLayers.Control, {\n
\n
/**\n
* APIProperty: fetchEvent\n
* {String} The layer event to listen to for replacing remote resource tile\n
* URLs with cached data URIs. Supported values are "tileerror" (try\n
* remote first, fall back to cached) and "tileloadstart" (try cache\n
* first, fall back to remote). Default is "tileloadstart".\n
*\n
* Note that "tileerror" will not work for CORS enabled images (see\n
* https://developer.mozilla.org/en/CORS_Enabled_Image), i.e. layers\n
* configured with a <OpenLayers.Tile.Image.crossOriginKeyword> in\n
* <OpenLayers.Layer.Grid.tileOptions>.\n
*/\n
fetchEvent: "tileloadstart",\n
\n
/**\n
* APIProperty: layers\n
* {Array(<OpenLayers.Layer.Grid>)}. Optional. If provided, only these\n
* layers will receive tiles from the cache.\n
*/\n
layers: null,\n
\n
/**\n
* APIProperty: autoActivate\n
* {Boolean} Activate the control when it is added to a map. Default is\n
* true.\n
*/\n
autoActivate: true,\n
\n
/**\n
* Constructor: OpenLayers.Control.CacheRead\n
*\n
* Parameters:\n
* options - {Object} Object with API properties for this control\n
*/\n
\n
/** \n
* Method: setMap\n
* Set the map property for the control. \n
* \n
* Parameters:\n
* map - {<OpenLayers.Map>} \n
*/\n
setMap: function(map) {\n
OpenLayers.Control.prototype.setMap.apply(this, arguments);\n
var i, layers = this.layers || map.layers;\n
for (i=layers.length-1; i>=0; --i) {\n
this.addLayer({layer: layers[i]});\n
}\n
if (!this.layers) {\n
map.events.on({\n
addlayer: this.addLayer,\n
removeLayer: this.removeLayer,\n
scope: this\n
});\n
}\n
},\n
\n
/**\n
* Method: addLayer\n
* Adds a layer to the control. Once added, tiles requested for this layer\n
* will be cached.\n
*\n
* Parameters:\n
* evt - {Object} Object with a layer property referencing an\n
* <OpenLayers.Layer> instance\n
*/\n
addLayer: function(evt) {\n
evt.layer.events.register(this.fetchEvent, this, this.fetch); \n
},\n
\n
/**\n
* Method: removeLayer\n
* Removes a layer from the control. Once removed, tiles requested for this\n
* layer will no longer be cached.\n
*\n
* Parameters:\n
* evt - {Object} Object with a layer property referencing an\n
* <OpenLayers.Layer> instance\n
*/\n
removeLayer: function(evt) {\n
evt.layer.events.unregister(this.fetchEvent, this, this.fetch);\n
},\n
\n
/**\n
* Method: fetch\n
* Listener to the <fetchEvent> event. Replaces a tile\'s url with a data\n
* URI from the cache.\n
*\n
* Parameters:\n
* evt - {Object} Event object with a tile property.\n
*/\n
fetch: function(evt) {\n
if (this.active && window.localStorage &&\n
evt.tile instanceof OpenLayers.Tile.Image) {\n
var tile = evt.tile,\n
url = tile.url;\n
// deal with modified tile urls when both CacheWrite and CacheRead\n
// are active\n
if (!tile.layer.crossOriginKeyword && OpenLayers.ProxyHost &&\n
url.indexOf(OpenLayers.ProxyHost) === 0) {\n
url = OpenLayers.Control.CacheWrite.urlMap[url]; \n
}\n
var dataURI = window.localStorage.getItem("olCache_" + url);\n
if (dataURI) {\n
tile.url = dataURI;\n
if (evt.type === "tileerror") {\n
tile.setImgSrc(dataURI);\n
}\n
}\n
}\n
},\n
\n
/**\n
* Method: destroy\n
* The destroy method is used to perform any clean up before the control\n
* is dereferenced. Typically this is where event listeners are removed\n
* to prevent memory leaks.\n
*/\n
destroy: function() {\n
if (this.layers || this.map) {\n
var i, layers = this.layers || this.map.layers;\n
for (i=layers.length-1; i>=0; --i) {\n
this.removeLayer({layer: layers[i]});\n
}\n
}\n
if (this.map) {\n
this.map.events.un({\n
addlayer: this.addLayer,\n
removeLayer: this.removeLayer,\n
scope: this\n
});\n
}\n
OpenLayers.Control.prototype.destroy.apply(this, arguments);\n
},\n
\n
CLASS_NAME: "OpenLayers.Control.CacheRead"\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5044</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.81</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>CacheWrite.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/Control.js\n
* @requires OpenLayers/Request.js\n
* @requires OpenLayers/Console.js\n
*/\n
\n
/**\n
* Class: OpenLayers.Control.CacheWrite\n
* A control for caching image tiles in the browser\'s local storage. The\n
* <OpenLayers.Control.CacheRead> control is used to fetch and use the cached\n
* tile images.\n
*\n
* Note: Before using this control on any layer that is not your own, make sure\n
* that the terms of service of the tile provider allow local storage of tiles.\n
*\n
* Inherits from:\n
* - <OpenLayers.Control>\n
*/\n
OpenLayers.Control.CacheWrite = OpenLayers.Class(OpenLayers.Control, {\n
\n
/** \n
* APIProperty: events\n
* {<OpenLayers.Events>} Events instance for listeners and triggering\n
* control specific events.\n
*\n
* To register events in the constructor, configure <eventListeners>.\n
*\n
* Register a listener for a particular event with the following syntax:\n
* (code)\n
* control.events.register(type, obj, listener);\n
* (end)\n
*\n
* Supported event types (in addition to those from <OpenLayers.Control.events>):\n
* cachefull - Triggered when the cache is full. Listeners receive an\n
* object with a tile property as first argument. The tile references\n
* the tile that couldn\'t be cached.\n
*/\n
\n
/**\n
* APIProperty: eventListeners\n
* {Object} Object with event listeners, keyed by event name. An optional\n
* scope property defines the scope that listeners will be executed in.\n
*/\n
\n
/**\n
* APIProperty: layers\n
* {Array(<OpenLayers.Layer.Grid>)}. Optional. If provided, caching\n
* will be enabled for these layers only, otherwise for all cacheable\n
* layers.\n
*/\n
layers: null,\n
\n
/**\n
* APIProperty: imageFormat\n
* {String} The image format used for caching. The default is "image/png".\n
* Supported formats depend on the user agent. If an unsupported\n
* <imageFormat> is provided, "image/png" will be used. For aerial\n
* imagery, "image/jpeg" is recommended.\n
*/\n
imageFormat: "image/png",\n
\n
/**\n
* Property: quotaRegEx\n
* {RegExp}\n
*/\n
quotaRegEx: (/quota/i),\n
\n
/**\n
* Constructor: OpenLayers.Control.CacheWrite\n
*\n
* Parameters:\n
* options - {Object} Object with API properties for this control.\n
*/\n
\n
/** \n
* Method: setMap\n
* Set the map property for the control. \n
* \n
* Parameters:\n
* map - {<OpenLayers.Map>} \n
*/\n
setMap: function(map) {\n
OpenLayers.Control.prototype.setMap.apply(this, arguments);\n
var i, layers = this.layers || map.layers;\n
for (i=layers.length-1; i>=0; --i) {\n
this.addLayer({layer: layers[i]});\n
}\n
if (!this.layers) {\n
map.events.on({\n
addlayer: this.addLayer,\n
removeLayer: this.removeLayer,\n
scope: this\n
});\n
}\n
},\n
\n
/**\n
* Method: addLayer\n
* Adds a layer to the control. Once added, tiles requested for this layer\n
* will be cached.\n
*\n
* Parameters:\n
* evt - {Object} Object with a layer property referencing an\n
* <OpenLayers.Layer> instance\n
*/\n
addLayer: function(evt) {\n
evt.layer.events.on({\n
tileloadstart: this.makeSameOrigin,\n
tileloaded: this.cache,\n
scope: this\n
}); \n
},\n
\n
/**\n
* Method: removeLayer\n
* Removes a layer from the control. Once removed, tiles requested for this\n
* layer will no longer be cached.\n
*\n
* Parameters:\n
* evt - {Object} Object with a layer property referencing an\n
* <OpenLayers.Layer> instance\n
*/\n
removeLayer: function(evt) {\n
evt.layer.events.un({\n
tileloadstart: this.makeSameOrigin,\n
tileloaded: this.cache,\n
scope: this\n
});\n
},\n
\n
/**\n
* Method: makeSameOrigin\n
* If the tile does not have CORS image loading enabled and is from a\n
* different origin, use OpenLayers.ProxyHost to make it a same origin url.\n
*\n
* Parameters:\n
* evt - {<OpenLayers.Event>}\n
*/\n
makeSameOrigin: function(evt) {\n
if (this.active) {\n
var tile = evt.tile;\n
if (tile instanceof OpenLayers.Tile.Image &&\n
!tile.crossOriginKeyword &&\n
tile.url.substr(0, 5) !== "data:") {\n
var sameOriginUrl = OpenLayers.Request.makeSameOrigin(\n
tile.url, OpenLayers.ProxyHost\n
);\n
OpenLayers.Control.CacheWrite.urlMap[sameOriginUrl] = tile.url;\n
tile.url = sameOriginUrl;\n
}\n
}\n
},\n
\n
/**\n
* Method: cache\n
* Adds a tile to the cache. When the cache is full, the "cachefull" event\n
* is triggered.\n
*\n
* Parameters:\n
* obj - {Object} Object with a tile property, tile being the\n
* <OpenLayers.Tile.Image> with the data to add to the cache\n
*/\n
cache: function(obj) {\n
if (this.active && window.localStorage) {\n
var tile = obj.tile;\n
if (tile instanceof OpenLayers.Tile.Image &&\n
tile.url.substr(0, 5) !== \'data:\') {\n
try {\n
var canvasContext = tile.getCanvasContext();\n
if (canvasContext) {\n
var urlMap = OpenLayers.Control.CacheWrite.urlMap;\n
var url = urlMap[tile.url] || tile.url;\n
window.localStorage.setItem(\n
"olCache_" + url,\n
canvasContext.canvas.toDataURL(this.imageFormat)\n
);\n
delete urlMap[tile.url];\n
}\n
} catch(e) {\n
// local storage full or CORS violation\n
var reason = e.name || e.message;\n
if (reason && this.quotaRegEx.test(reason)) {\n
this.events.triggerEvent("cachefull", {tile: tile});\n
} else {\n
OpenLayers.Console.error(e.toString());\n
}\n
}\n
}\n
}\n
},\n
\n
/**\n
* Method: destroy\n
* The destroy method is used to perform any clean up before the control\n
* is dereferenced. Typically this is where event listeners are removed\n
* to prevent memory leaks.\n
*/\n
destroy: function() {\n
if (this.layers || this.map) {\n
var i, layers = this.layers || this.map.layers;\n
for (i=layers.length-1; i>=0; --i) {\n
this.removeLayer({layer: layers[i]});\n
}\n
}\n
if (this.map) {\n
this.map.events.un({\n
addlayer: this.addLayer,\n
removeLayer: this.removeLayer,\n
scope: this\n
});\n
}\n
OpenLayers.Control.prototype.destroy.apply(this, arguments);\n
},\n
\n
CLASS_NAME: "OpenLayers.Control.CacheWrite"\n
});\n
\n
/**\n
* APIFunction: OpenLayers.Control.CacheWrite.clearCache\n
* Clears all tiles cached with <OpenLayers.Control.CacheWrite> from the cache.\n
*/\n
OpenLayers.Control.CacheWrite.clearCache = function() {\n
if (!window.localStorage) { return; }\n
var i, key;\n
for (i=window.localStorage.length-1; i>=0; --i) {\n
key = window.localStorage.key(i);\n
if (key.substr(0, 8) === "olCache_") {\n
window.localStorage.removeItem(key);\n
}\n
}\n
};\n
\n
/**\n
* Property: OpenLayers.Control.CacheWrite.urlMap\n
* {Object} Mapping of same origin urls to cache url keys. Entries will be\n
* deleted as soon as a tile was cached.\n
*/\n
OpenLayers.Control.CacheWrite.urlMap = {};\n
\n
\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>8033</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53684100.81</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>DragPan.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for \n
* full list of contributors). Published under the 2-clause BSD license.\n
* See license.txt in the OpenLayers distribution or repository for the\n
* full text of the license. */\n
\n
/**\n
* @requires OpenLayers/Control.js\n
* @requires OpenLayers/Handler/Drag.js\n
*/\n
\n
/**\n
* Class: OpenLayers.Control.DragPan\n
* The DragPan control pans the map with a drag of the mouse.\n
*\n
* Inherits from:\n
* - <OpenLayers.Control>\n
*/\n
OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, {\n
\n
/** \n
* Property: type\n
* {OpenLayers.Control.TYPES}\n
*/\n
type: OpenLayers.Control.TYPE_TOOL,\n
\n
/**\n
* Property: panned\n
* {Boolean} The map moved.\n
*/\n
panned: false,\n
\n
/**\n
* Property: interval\n
* {Integer} The number of milliseconds that should ellapse before\n
* panning the map again. Defaults to 1 millisecond. In most cases\n
* you won\'t want to change this value. For slow machines/devices\n
* larger values can be tried out.\n
*/\n
interval: 1,\n
\n
/**\n
* APIProperty: documentDrag\n
* {Boolean} If set to true, mouse dragging will continue even if the\n
* mouse cursor leaves the map viewport. Default is false.\n
*/\n
documentDrag: false,\n
\n
/**\n
* Property: kinetic\n
* {<OpenLayers.Kinetic>} The OpenLayers.Kinetic object.\n
*/\n
kinetic: null,\n
\n
/**\n
* APIProperty: enableKinetic\n
* {Boolean} Set this option to enable "kinetic dragging". Can be\n
* set to true or to an object. If set to an object this\n
* object will be passed to the {<OpenLayers.Kinetic>}\n
* constructor. Defaults to false.\n
* If you set this property, you should ensure that \n
* OpenLayers/Kinetic.js is included in your build config\n
*/\n
enableKinetic: false,\n
\n
/**\n
* APIProperty: kineticInterval\n
* {Integer} Interval in milliseconds between 2 steps in the "kinetic\n
* scrolling". Applies only if enableKinetic is set. Defaults\n
* to 10 milliseconds.\n
*/\n
kineticInterval: 10,\n
\n
\n
/**\n
* Method: draw\n
* Creates a Drag handler, using <panMap> and\n
* <panMapDone> as callbacks.\n
*/ \n
draw: function() {\n
if(this.enableKinetic) {\n
var config = {interval: this.kineticInterval};\n
if(typeof this.enableKinetic === "object") {\n
config = OpenLayers.Util.extend(config, this.enableKinetic);\n
}\n
this.kinetic = new OpenLayers.Kinetic(config);\n
}\n
this.handler = new OpenLayers.Handler.Drag(this, {\n
"move": this.panMap,\n
"done": this.panMapDone,\n
"down": this.panMapStart\n
}, {\n
interval: this.interval,\n
documentDrag: this.documentDrag\n
}\n
);\n
},\n
\n
/**\n
* Method: panMapStart\n
*/\n
panMapStart: function() {\n
if(this.kinetic) {\n
this.kinetic.begin();\n
}\n
},\n
\n
/**\n
* Method: panMap\n
*\n
* Parameters:\n
* xy - {<OpenLayers.Pixel>} Pixel of the mouse position\n
*/\n
panMap: function(xy) {\n
if(this.kinetic) {\n
this.kinetic.update(xy);\n
}\n
this.panned = true;\n
this.map.pan(\n
this.handler.last.x - xy.x,\n
this.handler.last.y - xy.y,\n
{dragging: true, animate: false}\n
);\n
},\n
\n
/**\n
* Method: panMapDone\n
* Finish the panning operation. Only call setCenter (through <panMap>)\n
* if the map has actually been moved.\n
*\n
* Parameters:\n
* xy - {<OpenLayers.Pixel>} Pixel of the mouse position\n
*/\n
panMapDone: function(xy) {\n
if(this.panned) {\n
var res = null;\n
if (this.kinetic) {\n
res = this.kinetic.end(xy);\n
}\n
this.map.pan(\n
this.handler.last.x - xy.x,\n
this.handler.last.y - xy.y,\n
{dragging: !!res, animate: false}\n
);\n
if (res) {\n
var self = this;\n
this.kinetic.move(res, function(x, y, end) {\n
self.map.pan(x, y, {dragging: !end, animate: false});\n
});\n
}\n
this.panned = false;\n
}\n
},\n
\n
CLASS_NAME: "OpenLayers.Control.DragPan"\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4416</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment