Browse Source

Merge pull request #23 from albig/master

Add Typeswitch for DFG-Viewer, Update OpenLayers
tags/v1.3.0^0 v1.3.0
Alexander Bigga 7 years ago
parent
commit
0e3c0f18fd
  1. 3
      dlf/ext_autoload.php
  2. 2
      dlf/ext_emconf.php
  3. 51
      dlf/ext_localconf.php
  4. 16
      dlf/lib/OpenLayers/authors.txt
  5. 24
      dlf/lib/OpenLayers/lib/OpenLayers.js
  6. 22
      dlf/lib/OpenLayers/lib/OpenLayers/Animation.js
  7. 35
      dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes.js
  8. 196
      dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Bounds.js
  9. 2
      dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Class.js
  10. 31
      dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Date.js
  11. 2
      dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Element.js
  12. 2
      dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/LonLat.js
  13. 2
      dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Pixel.js
  14. 2
      dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Size.js
  15. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Console.js
  16. 8
      dlf/lib/OpenLayers/lib/OpenLayers/Control.js
  17. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/ArgParser.js
  18. 6
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Attribution.js
  19. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Button.js
  20. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/CacheRead.js
  21. 62
      dlf/lib/OpenLayers/lib/OpenLayers/Control/CacheWrite.js
  22. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/DragFeature.js
  23. 21
      dlf/lib/OpenLayers/lib/OpenLayers/Control/DragPan.js
  24. 3
      dlf/lib/OpenLayers/lib/OpenLayers/Control/DrawFeature.js
  25. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/EditingToolbar.js
  26. 15
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Geolocate.js
  27. 3
      dlf/lib/OpenLayers/lib/OpenLayers/Control/GetFeature.js
  28. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Graticule.js
  29. 14
      dlf/lib/OpenLayers/lib/OpenLayers/Control/KeyboardDefaults.js
  30. 281
      dlf/lib/OpenLayers/lib/OpenLayers/Control/LayerSwitcher.js
  31. 45
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Measure.js
  32. 321
      dlf/lib/OpenLayers/lib/OpenLayers/Control/ModifyFeature.js
  33. 95
      dlf/lib/OpenLayers/lib/OpenLayers/Control/MousePosition.js
  34. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/NavToolbar.js
  35. 40
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Navigation.js
  36. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/NavigationHistory.js
  37. 35
      dlf/lib/OpenLayers/lib/OpenLayers/Control/OverviewMap.js
  38. 53
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Pan.js
  39. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/PanPanel.js
  40. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/PanZoom.js
  41. 14
      dlf/lib/OpenLayers/lib/OpenLayers/Control/PanZoomBar.js
  42. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Panel.js
  43. 13
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Permalink.js
  44. 108
      dlf/lib/OpenLayers/lib/OpenLayers/Control/PinchZoom.js
  45. 8
      dlf/lib/OpenLayers/lib/OpenLayers/Control/SLDSelect.js
  46. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Scale.js
  47. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/ScaleLine.js
  48. 24
      dlf/lib/OpenLayers/lib/OpenLayers/Control/SelectFeature.js
  49. 4
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Snapping.js
  50. 4
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Split.js
  51. 5
      dlf/lib/OpenLayers/lib/OpenLayers/Control/TouchNavigation.js
  52. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/TransformFeature.js
  53. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/UTFGrid.js
  54. 117
      dlf/lib/OpenLayers/lib/OpenLayers/Control/WMSGetFeatureInfo.js
  55. 3
      dlf/lib/OpenLayers/lib/OpenLayers/Control/WMTSGetFeatureInfo.js
  56. 6
      dlf/lib/OpenLayers/lib/OpenLayers/Control/Zoom.js
  57. 49
      dlf/lib/OpenLayers/lib/OpenLayers/Control/ZoomBox.js
  58. 18
      dlf/lib/OpenLayers/lib/OpenLayers/Control/ZoomIn.js
  59. 18
      dlf/lib/OpenLayers/lib/OpenLayers/Control/ZoomOut.js
  60. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Control/ZoomPanel.js
  61. 19
      dlf/lib/OpenLayers/lib/OpenLayers/Control/ZoomToMaxExtent.js
  62. 251
      dlf/lib/OpenLayers/lib/OpenLayers/Events.js
  63. 29
      dlf/lib/OpenLayers/lib/OpenLayers/Events/buttonclick.js
  64. 321
      dlf/lib/OpenLayers/lib/OpenLayers/Events/featureclick.js
  65. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Feature.js
  66. 8
      dlf/lib/OpenLayers/lib/OpenLayers/Feature/Vector.js
  67. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Filter.js
  68. 9
      dlf/lib/OpenLayers/lib/OpenLayers/Filter/Comparison.js
  69. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Filter/FeatureId.js
  70. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Filter/Function.js
  71. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Filter/Logical.js
  72. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Filter/Spatial.js
  73. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format.js
  74. 4
      dlf/lib/OpenLayers/lib/OpenLayers/Format/ArcXML.js
  75. 4
      dlf/lib/OpenLayers/lib/OpenLayers/Format/ArcXML/Features.js
  76. 4
      dlf/lib/OpenLayers/lib/OpenLayers/Format/Atom.js
  77. 34
      dlf/lib/OpenLayers/lib/OpenLayers/Format/CQL.js
  78. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/CSWGetDomain.js
  79. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js
  80. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/CSWGetRecords.js
  81. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js
  82. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/Context.js
  83. 557
      dlf/lib/OpenLayers/lib/OpenLayers/Format/EncodedPolyline.js
  84. 4
      dlf/lib/OpenLayers/lib/OpenLayers/Format/Filter.js
  85. 91
      dlf/lib/OpenLayers/lib/OpenLayers/Format/Filter/v1.js
  86. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/Filter/v1_0_0.js
  87. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/Filter/v1_1_0.js
  88. 4
      dlf/lib/OpenLayers/lib/OpenLayers/Format/GML.js
  89. 14
      dlf/lib/OpenLayers/lib/OpenLayers/Format/GML/Base.js
  90. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/GML/v2.js
  91. 17
      dlf/lib/OpenLayers/lib/OpenLayers/Format/GML/v3.js
  92. 18
      dlf/lib/OpenLayers/lib/OpenLayers/Format/GPX.js
  93. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/GeoJSON.js
  94. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/GeoRSS.js
  95. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/JSON.js
  96. 15
      dlf/lib/OpenLayers/lib/OpenLayers/Format/KML.js
  97. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/OGCExceptionReport.js
  98. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/OSM.js
  99. 2
      dlf/lib/OpenLayers/lib/OpenLayers/Format/OWSCommon.js
  100. 6
      dlf/lib/OpenLayers/lib/OpenLayers/Format/OWSCommon/v1.js

3
dlf/ext_autoload.php

@ -56,7 +56,8 @@ return array (
'tx_dlf_toc' => $extensionPath.'plugins/toc/class.tx_dlf_toc.php',
'tx_dlf_toolbox' => $extensionPath.'plugins/toolbox/class.tx_dlf_toolbox.php',
'tx_dlf_toolsPdf' => $extensionPath.'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php',
'tx_dlf_validator' => $extensionPath.'plugins/validator/class.tx_dlf_validator.php'
'tx_dlf_validator' => $extensionPath.'plugins/validator/class.tx_dlf_validator.php',
'tx_dlf_doctype' => $extensionPath.'plugins/doctype/class.tx_dlf_doctype.php'
);
?>

2
dlf/ext_emconf.php

@ -39,7 +39,7 @@ $EM_CONF[$_EXTKEY] = array(
'modify_tables' => '',
'clearCacheOnLoad' => FALSE,
'lockType' => '',
'version' => '1.2.2-dev',
'version' => '1.3.0',
'constraints' => array(
'depends' => array(
'php' => '5.3.0-',

51
dlf/ext_localconf.php

@ -68,4 +68,55 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array
// Register AJAX eID handlers.
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = 'EXT:'.$_EXTKEY.'/plugins/search/class.tx_dlf_search_suggest.php';
if (TYPO3_MODE === 'FE') {
/*
* docType user function to use in typoscript:
*
* STORAGEID: uid of dlf storage folder
* DOCTYPE: document type string to test
*
* [userFunc = user_dlf_docTypeCheck(STORAGEID:DOCTYPE)]
*
* do something different
*
* [global]
*
**/
function user_dlf_docTypeCheck($cmd) {
// we have to split the cmd as we cannot have two parameters.
// this changed in TYPO3 6.2
$pidCondition = explode(':', $cmd);
$conf['pages'] = $pidCondition[0];
$docType = t3lib_div::makeInstance('tx_dlf_doctype');
switch($pidCondition[1]){
case "periodical":
if ($docType->main($cObj, $conf) === "periodical")
return TRUE;
break;
case "newspaper_global_anchor":
if ($docType->main($cObj, $conf) === "newspaper_global_anchor")
return TRUE;
break;
case "newspaper_year_anchor":
if ($docType->main($cObj, $conf) === "newspaper_year_anchor")
return TRUE;
break;
case "newspaper_issue":
if ($docType->main($cObj, $conf) === "newspaper_issue")
return TRUE;
break;
default : return FALSE;
}
// this function has to return FALSE or TRUE nothing else
return FALSE;
}
}
?>

16
dlf/lib/OpenLayers/AUTHORS.txt → dlf/lib/OpenLayers/authors.txt

@ -7,7 +7,7 @@ Seb Benthall
Bruno Binet
Stéphane Brunner
Howard Butler
Bertil Chaupis
Bertil Chaupis
John Cole
Tim Coulter
Robert Coup
@ -32,10 +32,10 @@ Peter William Robins
Gregers Rygg
Tim Schaub
Christopher Schmidt
Cameron Shorter
Cameron Shorter
Pedro Simonetti
Paul Spencer
Paul Smith
Paul Spencer
Paul Smith
Glen Stampoultzis
James Stembridge
Erik Uzureau
@ -47,10 +47,10 @@ Steve Woodbridge
David Zwarg
Some portions of OpenLayers are used under the Apache 2.0 license, available
in licenses/APACHE-2.0.txt.
in doc/licenses/APACHE-2.0.txt.
Some portions of OpenLayers are used under the MIT license, available in
licenses/MIT-LICENSE.txt.
Some portions of OpenLayers are used under the MIT license, availabie in
doc/licenses/MIT-LICENSE.txt.
Some portions of OpenLayers are Copyright 2001 Robert Penner, and are used
under the BSD license, available in licenses/BSD-LICENSE.txt
under the BSD license, available in doc/licenses/BSD-LICENSE.txt

24
dlf/lib/OpenLayers/lib/OpenLayers.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -132,6 +132,7 @@
jsFiles = [
"OpenLayers/BaseTypes/Class.js",
"OpenLayers/Util.js",
"OpenLayers/Util/vendorPrefix.js",
"OpenLayers/Animation.js",
"OpenLayers/BaseTypes.js",
"OpenLayers/BaseTypes/Bounds.js",
@ -143,10 +144,9 @@
"OpenLayers/Console.js",
"OpenLayers/Tween.js",
"OpenLayers/Kinetic.js",
"Rico/Corner.js",
"Rico/Color.js",
"OpenLayers/Events.js",
"OpenLayers/Events/buttonclick.js",
"OpenLayers/Events/featureclick.js",
"OpenLayers/Request.js",
"OpenLayers/Request/XMLHttpRequest.js",
"OpenLayers/Projection.js",
@ -190,7 +190,6 @@
"OpenLayers/Layer/Zoomify.js",
"OpenLayers/Layer/ArcGISCache.js",
"OpenLayers/Popup/Anchored.js",
"OpenLayers/Popup/AnchoredBubble.js",
"OpenLayers/Popup/Framed.js",
"OpenLayers/Popup/FramedCloud.js",
"OpenLayers/Feature.js",
@ -305,6 +304,7 @@
"OpenLayers/Format/GML/v2.js",
"OpenLayers/Format/GML/v3.js",
"OpenLayers/Format/Atom.js",
"OpenLayers/Format/EncodedPolyline.js",
"OpenLayers/Format/KML.js",
"OpenLayers/Format/GeoRSS.js",
"OpenLayers/Format/WFS.js",
@ -312,6 +312,10 @@
"OpenLayers/Format/OWSCommon/v1.js",
"OpenLayers/Format/OWSCommon/v1_0_0.js",
"OpenLayers/Format/OWSCommon/v1_1_0.js",
"OpenLayers/Format/WCSCapabilities.js",
"OpenLayers/Format/WCSCapabilities/v1.js",
"OpenLayers/Format/WCSCapabilities/v1_0_0.js",
"OpenLayers/Format/WCSCapabilities/v1_1_0.js",
"OpenLayers/Format/WFSCapabilities.js",
"OpenLayers/Format/WFSCapabilities/v1.js",
"OpenLayers/Format/WFSCapabilities/v1_0_0.js",
@ -393,7 +397,10 @@
"OpenLayers/Symbolizer/Raster.js",
"OpenLayers/Lang.js",
"OpenLayers/Lang/en.js",
"OpenLayers/Spherical.js"
"OpenLayers/Spherical.js",
"OpenLayers/TileManager.js",
"OpenLayers/WPSClient.js",
"OpenLayers/WPSProcess.js"
]; // etc.
}
@ -413,5 +420,10 @@
/**
* Constant: VERSION_NUMBER
*
* This constant identifies the version of OpenLayers.
*
* When asking questions or reporting issues, make sure to include the output of
* OpenLayers.VERSION_NUMBER in the question or issue-description.
*/
OpenLayers.VERSION_NUMBER="Release 2.12";
OpenLayers.VERSION_NUMBER="Release 2.13.1";

22
dlf/lib/OpenLayers/lib/OpenLayers/Animation.js

@ -1,10 +1,11 @@
/**
* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license.
*
* full text of the license. */
/**
* @requires OpenLayers/SingleFile.js
* @requires OpenLayers/Util/vendorPrefix.js
*/
/**
@ -19,11 +20,8 @@ OpenLayers.Animation = (function(window) {
* Property: isNative
* {Boolean} true if a native requestAnimationFrame function is available
*/
var isNative = !!(window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame);
var requestAnimationFrame = OpenLayers.Util.vendorPrefix.js(window, "requestAnimationFrame");
var isNative = !!(requestAnimationFrame);
/**
* Function: requestFrame
@ -36,11 +34,7 @@ OpenLayers.Animation = (function(window) {
* element - {DOMElement} Optional element that visually bounds the animation.
*/
var requestFrame = (function() {
var request = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
var request = window[requestAnimationFrame] ||
function(callback, element) {
window.setTimeout(callback, 16);
};

35
dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -127,7 +127,9 @@ OpenLayers.String = {
if (i == 0) {
replacement = context;
}
if (replacement === undefined) {
break;
}
replacement = replacement[subs[i]];
}
@ -189,13 +191,18 @@ OpenLayers.String = {
*
* Parameters:
* value - {String}
* trimWhitespace - {Boolean}
*
* Returns:
* {Number|String} a Number if the passed value is a number, a String
* otherwise.
*/
numericIf: function(value) {
return OpenLayers.String.isNumeric(value) ? parseFloat(value) : value;
numericIf: function(value, trimWhitespace) {
var originalValue = value;
if (trimWhitespace === true && value != null && value.replace) {
value = value.replace(/^\s*|\s*$/g, "");
}
return OpenLayers.String.isNumeric(value) ? parseFloat(value) : originalValue;
}
};
@ -290,7 +297,25 @@ OpenLayers.Number = {
str = integer + dsep + rem;
}
return str;
}
},
/**
* Method: zeroPad
* Create a zero padded string optionally with a radix for casting numbers.
*
* Parameters:
* num - {Number} The number to be zero padded.
* len - {Number} The length of the string to be returned.
* radix - {Number} An integer between 2 and 36 specifying the base to use
* for representing numeric values.
*/
zeroPad: function(num, len, radix) {
var str = num.toString(radix || 10);
while (str.length < len) {
str = "0" + str;
}
return str;
}
};
/**

196
dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Bounds.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -63,7 +63,7 @@ OpenLayers.Bounds = OpenLayers.Class({
* left - {Number} The left bounds of the box. Note that for width
* calculations, this is assumed to be less than the right value.
* bottom - {Number} The bottom bounds of the box. Note that for height
* calculations, this is assumed to be more than the top value.
* calculations, this is assumed to be less than the top value.
* right - {Number} The right bounds.
* top - {Number} The top bounds.
*
@ -128,6 +128,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: toString
* Returns a string representation of the bounds object.
*
* Returns:
* {String} String representation of bounds object.
@ -138,6 +139,11 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: toArray
* Returns an array representation of the bounds object.
*
* Returns an array of left, bottom, right, top properties, or -- when the
* optional parameter is true -- an array of the bottom, left, top,
* right properties.
*
* Parameters:
* reverseAxisOrder - {Boolean} Should we reverse the axis order?
@ -155,6 +161,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: toBBOX
* Returns a boundingbox-string representation of the bounds object.
*
* Parameters:
* decimal - {Integer} How many significant digits in the bbox coords?
@ -163,7 +170,7 @@ OpenLayers.Bounds = OpenLayers.Class({
*
* Returns:
* {String} Simple String representation of bounds object.
* (e.g. <i>"5,42,10,45"</i>)
* (e.g. "5,42,10,45")
*/
toBBOX:function(decimal, reverseAxisOrder) {
if (decimal== null) {
@ -202,9 +209,10 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: getWidth
* Returns the width of the bounds.
*
* Returns:
* {Float} The width of the bounds
* {Float} The width of the bounds (right minus left).
*/
getWidth:function() {
return (this.right - this.left);
@ -212,6 +220,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: getHeight
* Returns the height of the bounds.
*
* Returns:
* {Float} The height of the bounds (top minus bottom).
@ -222,9 +231,10 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: getSize
* Returns an <OpenLayers.Size> object of the bounds.
*
* Returns:
* {<OpenLayers.Size>} The size of the box.
* {<OpenLayers.Size>} The size of the bounds.
*/
getSize:function() {
return new OpenLayers.Size(this.getWidth(), this.getHeight());
@ -232,6 +242,8 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: getCenterPixel
* Returns the <OpenLayers.Pixel> object which represents the center of the
* bounds.
*
* Returns:
* {<OpenLayers.Pixel>} The center of the bounds in pixel space.
@ -243,7 +255,9 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: getCenterLonLat
*
* Returns the <OpenLayers.LonLat> object which represents the center of the
* bounds.
*
* Returns:
* {<OpenLayers.LonLat>} The center of the bounds in map space.
*/
@ -297,11 +311,24 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: add
*
* Shifts the coordinates of the bound by the given horizontal and vertical
* deltas.
*
* (start code)
* var bounds = new OpenLayers.Bounds(0, 0, 10, 10);
* bounds.toString();
* // => "0,0,10,10"
*
* bounds.add(-1.5, 4).toString();
* // => "-1.5,4,8.5,14"
* (end)
*
* This method will throw a TypeError if it is passed null as an argument.
*
* Parameters:
* x - {Float}
* y - {Float}
*
* x - {Float} horizontal delta
* y - {Float} vertical delta
*
* Returns:
* {<OpenLayers.Bounds>} A new bounds whose coordinates are the same as
* this, but shifted by the passed-in x and y values.
@ -316,51 +343,77 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: extend
* Extend the bounds to include the point, lonlat, or bounds specified.
* Note, this function assumes that left < right and bottom < top.
*
* Parameters:
* object - {Object} Can be LonLat, Point, or Bounds
* Extend the bounds to include the <OpenLayers.LonLat>,
* <OpenLayers.Geometry.Point> or <OpenLayers.Bounds> specified.
*
* Please note that this function assumes that left < right and
* bottom < top.
*
* Parameters:
* object - {<OpenLayers.LonLat>, <OpenLayers.Geometry.Point> or
* <OpenLayers.Bounds>} The object to be included in the new bounds
* object.
*/
extend:function(object) {
var bounds = null;
if (object) {
// clear cached center location
switch(object.CLASS_NAME) {
case "OpenLayers.LonLat":
bounds = new OpenLayers.Bounds(object.lon, object.lat,
object.lon, object.lat);
case "OpenLayers.LonLat":
this.extendXY(object.lon, object.lat);
break;
case "OpenLayers.Geometry.Point":
bounds = new OpenLayers.Bounds(object.x, object.y,
object.x, object.y);
this.extendXY(object.x, object.y);
break;
case "OpenLayers.Bounds":
bounds = object;
case "OpenLayers.Bounds":
// clear cached center location
this.centerLonLat = null;
if ( (this.left == null) || (object.left < this.left)) {
this.left = object.left;
}
if ( (this.bottom == null) || (object.bottom < this.bottom) ) {
this.bottom = object.bottom;
}
if ( (this.right == null) || (object.right > this.right) ) {
this.right = object.right;
}
if ( (this.top == null) || (object.top > this.top) ) {
this.top = object.top;
}
break;
}
if (bounds) {
this.centerLonLat = null;
if ( (this.left == null) || (bounds.left < this.left)) {
this.left = bounds.left;
}
if ( (this.bottom == null) || (bounds.bottom < this.bottom) ) {
this.bottom = bounds.bottom;
}
if ( (this.right == null) || (bounds.right > this.right) ) {
this.right = bounds.right;
}
if ( (this.top == null) || (bounds.top > this.top) ) {
this.top = bounds.top;
}
}
}
},
/**
* APIMethod: extendXY
* Extend the bounds to include the XY coordinate specified.
*
* Parameters:
* x - {number} The X part of the the coordinate.
* y - {number} The Y part of the the coordinate.
*/
extendXY:function(x, y) {
// clear cached center location
this.centerLonLat = null;
if ((this.left == null) || (x < this.left)) {
this.left = x;
}
if ((this.bottom == null) || (y < this.bottom)) {
this.bottom = y;
}
if ((this.right == null) || (x > this.right)) {
this.right = x;
}
if ((this.top == null) || (y > this.top)) {
this.top = y;
}
},
/**
* APIMethod: containsLonLat
* Returns whether the bounds object contains the given <OpenLayers.LonLat>.
*
* Parameters:
* ll - {<OpenLayers.LonLat>|Object} OpenLayers.LonLat or an
@ -399,6 +452,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: containsPixel
* Returns whether the bounds object contains the given <OpenLayers.Pixel>.
*
* Parameters:
* px - {<OpenLayers.Pixel>}
@ -414,6 +468,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: contains
* Returns whether the bounds object contains the given x and y.
*
* Parameters:
* x - {Float}
@ -535,7 +590,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: containsBounds
* Determine whether the target bounds is contained within this bounds.
* Returns whether the bounds object contains the given <OpenLayers.Bounds>.
*
* bounds - {<OpenLayers.Bounds>} The target bounds.
* partial - {Boolean} If any of the target corners is within this bounds
@ -565,10 +620,12 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: determineQuadrant
*
* Returns the the quadrant ("br", "tr", "tl", "bl") in which the given
* <OpenLayers.LonLat> lies.
*
* Parameters:
* lonlat - {<OpenLayers.LonLat>}
*
*
* Returns:
* {String} The quadrant ("br" "tr" "tl" "bl") of the bounds in which the
* coordinate lies.
@ -615,6 +672,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: wrapDateLine
* Wraps the bounds object around the dateline.
*
* Parameters:
* maxExtent - {<OpenLayers.Bounds>}
@ -681,12 +739,18 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIFunction: fromString
* Alternative constructor that builds a new OpenLayers.Bounds from a
* parameter string
*
* parameter string.
*
* (begin code)
* OpenLayers.Bounds.fromString("5,42,10,45");
* // => equivalent to ...
* new OpenLayers.Bounds(5, 42, 10, 45);
* (end)
*
* Parameters:
* str - {String}Comma-separated bounds string. (e.g. <i>"5,42,10,45"</i>)
* str - {String} Comma-separated bounds string. (e.g. "5,42,10,45")
* reverseAxisOrder - {Boolean} Does the string use reverse axis order?
*
*
* Returns:
* {<OpenLayers.Bounds>} New bounds object built from the
* passed-in String.
@ -698,11 +762,16 @@ OpenLayers.Bounds.fromString = function(str, reverseAxisOrder) {
/**
* APIFunction: fromArray
* Alternative constructor that builds a new OpenLayers.Bounds
* from an array
*
* Alternative constructor that builds a new OpenLayers.Bounds from an array.
*
* (begin code)
* OpenLayers.Bounds.fromArray( [5, 42, 10, 45] );
* // => equivalent to ...
* new OpenLayers.Bounds(5, 42, 10, 45);
* (end)
*
* Parameters:
* bbox - {Array(Float)} Array of bounds values (e.g. <i>[5,42,10,45]</i>)
* bbox - {Array(Float)} Array of bounds values (e.g. [5,42,10,45])
* reverseAxisOrder - {Boolean} Does the array use reverse axis order?
*
* Returns:
@ -716,12 +785,17 @@ OpenLayers.Bounds.fromArray = function(bbox, reverseAxisOrder) {
/**
* APIFunction: fromSize
* Alternative constructor that builds a new OpenLayers.Bounds
* from a size
*
* Alternative constructor that builds a new OpenLayers.Bounds from a size.
*
* (begin code)
* OpenLayers.Bounds.fromSize( new OpenLayers.Size(10, 20) );
* // => equivalent to ...
* new OpenLayers.Bounds(0, 20, 10, 0);
* (end)
*
* Parameters:
* size - {<OpenLayers.Size>|Object} OpenLayers.Size or an object with
* a 'w' and 'h' properties.
* size - {<OpenLayers.Size> or Object} <OpenLayers.Size> or an object with
* both 'w' and 'h' properties.
*
* Returns:
* {<OpenLayers.Bounds>} New bounds object built from the passed-in size.
@ -737,6 +811,14 @@ OpenLayers.Bounds.fromSize = function(size) {
* Function: oppositeQuadrant
* Get the opposite quadrant for a given quadrant string.
*
* (begin code)
* OpenLayers.Bounds.oppositeQuadrant( "tl" );
* // => "br"
*
* OpenLayers.Bounds.oppositeQuadrant( "tr" );
* // => "bl"
* (end)
*
* Parameters:
* quadrant - {String} two character quadrant shortstring
*

2
dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Class.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

31
dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Date.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -15,6 +15,14 @@
*/
OpenLayers.Date = {
/**
* APIProperty: dateRegEx
* The regex to be used for validating dates. You can provide your own
* regex for instance for adding support for years before BC. Default
* value is: /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/
*/
dateRegEx: /^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/,
/**
* APIMethod: toISOString
* Generates a string representing a date. The format of the string follows
@ -41,13 +49,6 @@ OpenLayers.Date = {
return date.toISOString();
};
} else {
function pad(num, len) {
var str = num + "";
while (str.length < len) {
str = "0" + str;
}
return str;
}
return function(date) {
var str;
if (isNaN(date.getTime())) {
@ -57,12 +58,12 @@ OpenLayers.Date = {
} else {
str =
date.getUTCFullYear() + "-" +
pad(date.getUTCMonth() + 1, 2) + "-" +
pad(date.getUTCDate(), 2) + "T" +
pad(date.getUTCHours(), 2) + ":" +
pad(date.getUTCMinutes(), 2) + ":" +
pad(date.getUTCSeconds(), 2) + "." +
pad(date.getUTCMilliseconds(), 3) + "Z";
OpenLayers.Number.zeroPad(date.getUTCMonth() + 1, 2) + "-" +
OpenLayers.Number.zeroPad(date.getUTCDate(), 2) + "T" +
OpenLayers.Number.zeroPad(date.getUTCHours(), 2) + ":" +
OpenLayers.Number.zeroPad(date.getUTCMinutes(), 2) + ":" +
OpenLayers.Number.zeroPad(date.getUTCSeconds(), 2) + "." +
OpenLayers.Number.zeroPad(date.getUTCMilliseconds(), 3) + "Z";
}
return str;
};
@ -91,7 +92,7 @@ OpenLayers.Date = {
*/
parse: function(str) {
var date;
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)?$/);
var match = str.match(this.dateRegEx);
if (match && (match[1] || match[7])) { // must have at least year or time
var year = parseInt(match[1], 10) || 0;
var month = (parseInt(match[2], 10) - 1) || 0;

2
dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Element.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

2
dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/LonLat.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

2
dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Pixel.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

2
dlf/lib/OpenLayers/lib/OpenLayers/BaseTypes/Size.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

2
dlf/lib/OpenLayers/lib/OpenLayers/Console.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

8
dlf/lib/OpenLayers/lib/OpenLayers/Control.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -120,6 +120,12 @@ OpenLayers.Control = OpenLayers.Class({
*/
active: null,
/**
* Property: handlerOptions
* {Object} Used to set non-default properties on the control's handler
*/
handlerOptions: null,
/**
* Property: handler
* {<OpenLayers.Handler>} null

2
dlf/lib/OpenLayers/lib/OpenLayers/Control/ArgParser.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

6
dlf/lib/OpenLayers/lib/OpenLayers/Control/Attribution.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -19,8 +19,8 @@ OpenLayers.Control.Attribution =
OpenLayers.Class(OpenLayers.Control, {
/**
* APIProperty: seperator
* {String} String used to seperate layers.
* APIProperty: separator
* {String} String used to separate layers.
*/
separator: ", ",

2
dlf/lib/OpenLayers/lib/OpenLayers/Control/Button.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

2
dlf/lib/OpenLayers/lib/OpenLayers/Control/CacheRead.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

62
dlf/lib/OpenLayers/lib/OpenLayers/Control/CacheWrite.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -111,7 +111,7 @@ OpenLayers.Control.CacheWrite = OpenLayers.Class(OpenLayers.Control, {
addLayer: function(evt) {
evt.layer.events.on({
tileloadstart: this.makeSameOrigin,
tileloaded: this.cache,
tileloaded: this.onTileLoaded,
scope: this
});
},
@ -128,7 +128,7 @@ OpenLayers.Control.CacheWrite = OpenLayers.Class(OpenLayers.Control, {
removeLayer: function(evt) {
evt.layer.events.un({
tileloadstart: this.makeSameOrigin,
tileloaded: this.cache,
tileloaded: this.onTileLoaded,
scope: this
});
},
@ -157,6 +157,22 @@ OpenLayers.Control.CacheWrite = OpenLayers.Class(OpenLayers.Control, {
},
/**
* Method: onTileLoaded
* Decides whether a tile can be cached and calls the cache method.
*
* Parameters:
* evt - {Event}
*/
onTileLoaded: function(evt) {
if (this.active && !evt.aborted &&
evt.tile instanceof OpenLayers.Tile.Image &&
evt.tile.url.substr(0, 5) !== 'data:') {
this.cache({tile: evt.tile});
delete OpenLayers.Control.CacheWrite.urlMap[evt.tile.url];
}
},
/**
* Method: cache
* Adds a tile to the cache. When the cache is full, the "cachefull" event
* is triggered.
@ -166,29 +182,25 @@ OpenLayers.Control.CacheWrite = OpenLayers.Class(OpenLayers.Control, {
* <OpenLayers.Tile.Image> with the data to add to the cache
*/
cache: function(obj) {
if (this.active && window.localStorage) {
if (window.localStorage) {
var tile = obj.tile;
if (tile instanceof OpenLayers.Tile.Image &&
tile.url.substr(0, 5) !== 'data:') {
try {
var canvasContext = tile.getCanvasContext();
if (canvasContext) {
var urlMap = OpenLayers.Control.CacheWrite.urlMap;
var url = urlMap[tile.url] || tile.url;
window.localStorage.setItem(
"olCache_" + url,
canvasContext.canvas.toDataURL(this.imageFormat)
);
delete urlMap[tile.url];
}
} catch(e) {
// local storage full or CORS violation
var reason = e.name || e.message;
if (reason && this.quotaRegEx.test(reason)) {
this.events.triggerEvent("cachefull", {tile: tile});
} else {
OpenLayers.Console.error(e.toString());
}
try {
var canvasContext = tile.getCanvasContext();
if (canvasContext) {
var urlMap = OpenLayers.Control.CacheWrite.urlMap;
var url = urlMap[tile.url] || tile.url;
window.localStorage.setItem(
"olCache_" + url,
canvasContext.canvas.toDataURL(this.imageFormat)
);
}
} catch(e) {
// local storage full or CORS violation
var reason = e.name || e.message;
if (reason && this.quotaRegEx.test(reason)) {
this.events.triggerEvent("cachefull", {tile: tile});
} else {
OpenLayers.Console.error(e.toString());
}
}
}

2
dlf/lib/OpenLayers/lib/OpenLayers/Control/DragFeature.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

21
dlf/lib/OpenLayers/lib/OpenLayers/Control/DragPan.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -32,11 +32,12 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, {
/**
* Property: interval
* {Integer} The number of milliseconds that should ellapse before
* panning the map again. Defaults to 1 millisecond. In most cases
* you won't want to change this value. For slow machines/devices
* larger values can be tried out.
* panning the map again. Defaults to 0 milliseconds, which means that
* no separate cycle is used for panning. In most cases you won't want
* to change this value. For slow machines/devices larger values can be
* tried out.
*/
interval: 1,
interval: 0,
/**
* APIProperty: documentDrag
@ -56,11 +57,11 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, {
* {Boolean} Set this option to enable "kinetic dragging". Can be
* set to true or to an object. If set to an object this
* object will be passed to the {<OpenLayers.Kinetic>}
* constructor. Defaults to false.
* If you set this property, you should ensure that
* OpenLayers/Kinetic.js is included in your build config
* constructor. Defaults to true.
* To get kinetic dragging, ensure that OpenLayers/Kinetic.js is
* included in your build config.
*/
enableKinetic: false,
enableKinetic: true,
/**
* APIProperty: kineticInterval
@ -77,7 +78,7 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, {
* <panMapDone> as callbacks.
*/
draw: function() {
if(this.enableKinetic) {
if (this.enableKinetic && OpenLayers.Kinetic) {
var config = {interval: this.kineticInterval};
if(typeof this.enableKinetic === "object") {
config = OpenLayers.Util.extend(config, this.enableKinetic);

3
dlf/lib/OpenLayers/lib/OpenLayers/Control/DrawFeature.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -62,7 +62,6 @@ OpenLayers.Control.DrawFeature = OpenLayers.Class(OpenLayers.Control, {
* APIProperty: handlerOptions
* {Object} Used to set non-default properties on the control's handler
*/
handlerOptions: null,
/**
* Constructor: OpenLayers.Control.DrawFeature

2
dlf/lib/OpenLayers/lib/OpenLayers/Control/EditingToolbar.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

15
dlf/lib/OpenLayers/lib/OpenLayers/Control/Geolocate.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -45,8 +45,15 @@ OpenLayers.Control.Geolocate = OpenLayers.Class(OpenLayers.Control, {
/**
* Property: geolocation
* {Object} The geolocation engine, as a property to be possibly mocked.
* This is set lazily to avoid a memory leak in IE9.
*/
geolocation: navigator.geolocation,
geolocation: null,
/**
* Property: available
* {Boolean} The navigator.geolocation object is available.
*/
available: ('geolocation' in navigator),
/**
* APIProperty: bind
@ -90,6 +97,10 @@ OpenLayers.Control.Geolocate = OpenLayers.Class(OpenLayers.Control, {
* {Boolean} The control was effectively activated.
*/
activate: function () {
if (this.available && !this.geolocation) {
// set lazily to avoid IE9 memory leak
this.geolocation = navigator.geolocation;
}
if (!this.geolocation) {
this.events.triggerEvent("locationuncapable");
return false;

3
dlf/lib/OpenLayers/lib/OpenLayers/Control/GetFeature.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -144,7 +144,6 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
* {Object} Additional options for the handlers used by this control. This
* is a hash with the keys "click", "box" and "hover".
*/
handlerOptions: null,
/**
* Property: handlers

2
dlf/lib/OpenLayers/lib/OpenLayers/Control/Graticule.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

14
dlf/lib/OpenLayers/lib/OpenLayers/Control/KeyboardDefaults.js

@ -1,4 +1,4 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
@ -6,6 +6,7 @@
/**
* @requires OpenLayers/Control.js
* @requires OpenLayers/Handler/Keyboard.js
* @requires OpenLayers/Events.js
*/
/**
@ -75,7 +76,16 @@ OpenLayers.Control.KeyboardDefaults = OpenLayers.Class(OpenLayers.Control, {
*/
defaultKeyPress: function (evt) {
var size, handled = true;
switch(evt.keyCode) {
var target = OpenLayers.Event.element(evt);
if (target &&
(target.tagName == 'INPUT' ||
target.tagName == 'TEXTAREA' ||
target.tagName == 'SELECT')) {
return;
}
switch (evt.keyCode) {
case OpenLayers.Event.KEY_LEFT:
this.map.pan(-this.slideFactor, 0);
break;

281
dlf/lib/OpenLayers/lib/OpenLayers/Control/LayerSwitcher.js

@ -1,140 +1,116 @@
/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
/*