diff --git a/OpenLayers/OpenLayers.debug.js b/OpenLayers/OpenLayers.debug.js
index 3a5882f..e3f9c63 100644
--- a/OpenLayers/OpenLayers.debug.js
+++ b/OpenLayers/OpenLayers.debug.js
@@ -27,22 +27,22 @@
* OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is
* Copyright (c) 2006, Yahoo! Inc.
* All rights reserved.
- *
+ *
* Redistribution and use of this software in source and binary forms, with or
* without modification, are permitted provided that the following conditions
* are met:
- *
+ *
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* * Neither the name of Yahoo! Inc. nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission of Yahoo! Inc.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -52,7 +52,7 @@
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/* ======================================================================
@@ -101,22 +101,22 @@ var OpenLayers = {
}
return (function() { return l; });
})(),
-
+
/**
* Property: ImgPath
- * {String} Set this to the path where control images are stored, a path
- * given here must end with a slash. If set to '' (which is the default)
+ * {String} Set this to the path where control images are stored, a path
+ * given here must end with a slash. If set to '' (which is the default)
* OpenLayers will use its script location + "img/".
- *
- * You will need to set this property when you have a singlefile build of
+ *
+ * You will need to set this property when you have a singlefile build of
* OpenLayers that either is not named "OpenLayers.js" or if you move
- * the file in a way such that the image directory cannot be derived from
+ * the file in a way such that the image directory cannot be derived from
* the script location.
- *
+ *
* If your custom OpenLayers build is named "my-custom-ol.js" and the images
* of OpenLayers are in a folder "/resources/external/images/ol" a correct
* way of including OpenLayers in your HTML would be:
- *
+ *
* (code)
*
*
* (end code)
- *
- * Please remember that when your OpenLayers script is not named
- * "OpenLayers.js" you will have to make sure that the default theme is
- * loaded into the page by including an appropriate -tag,
+ *
+ * Please remember that when your OpenLayers script is not named
+ * "OpenLayers.js" you will have to make sure that the default theme is
+ * loaded into the page by including an appropriate -tag,
* e.g.:
- *
+ *
* (code)
*
* (end code)
@@ -152,13 +152,13 @@ var OpenLayers = {
/**
* Constructor: OpenLayers.Class
- * Base class used to construct all other classes. Includes support for
- * multiple inheritance.
- *
- * This constructor is new in OpenLayers 2.5. At OpenLayers 3.0, the old
- * syntax for creating classes and dealing with inheritance
+ * Base class used to construct all other classes. Includes support for
+ * multiple inheritance.
+ *
+ * This constructor is new in OpenLayers 2.5. At OpenLayers 3.0, the old
+ * syntax for creating classes and dealing with inheritance
* will be removed.
- *
+ *
* To create a new OpenLayers-style class, use the following syntax:
* (code)
* var MyClass = OpenLayers.Class(prototype);
@@ -169,7 +169,7 @@ var OpenLayers = {
* (code)
* var MyClass = OpenLayers.Class(Class1, Class2, prototype);
* (end)
- *
+ *
* Note that instanceof reflection will only reveal Class1 as superclass.
*
*/
@@ -275,7 +275,7 @@ OpenLayers.Util.extend = function(destination, source) {
* @requires OpenLayers/SingleFile.js
*/
-/**
+/**
* Header: OpenLayers Base Types
* OpenLayers custom string, number and function functions are described here.
*/
@@ -288,12 +288,12 @@ OpenLayers.String = {
/**
* APIFunction: startsWith
- * Test whether a string starts with another string.
- *
+ * Test whether a string starts with another string.
+ *
* Parameters:
* str - {String} The string to test.
* sub - {String} The substring to look for.
- *
+ *
* Returns:
* {Boolean} The first string starts with the second.
*/
@@ -304,43 +304,43 @@ OpenLayers.String = {
/**
* APIFunction: contains
* Test whether a string contains another string.
- *
+ *
* Parameters:
* str - {String} The string to test.
* sub - {String} The substring to look for.
- *
+ *
* Returns:
* {Boolean} The first string contains the second.
*/
contains: function(str, sub) {
return (str.indexOf(sub) != -1);
},
-
+
/**
* APIFunction: trim
* Removes leading and trailing whitespace characters from a string.
- *
+ *
* Parameters:
* str - {String} The (potentially) space padded string. This string is not
* modified.
- *
+ *
* Returns:
- * {String} A trimmed version of the string with all leading and
+ * {String} A trimmed version of the string with all leading and
* trailing spaces removed.
*/
trim: function(str) {
return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
},
-
+
/**
* APIFunction: camelize
- * Camel-case a hyphenated string.
+ * Camel-case a hyphenated string.
* Ex. "chicken-head" becomes "chickenHead", and
* "-chicken-head" becomes "ChickenHead".
*
* Parameters:
* str - {String} The string to be camelized. The original is not modified.
- *
+ *
* Returns:
* {String} The string, camelized
*/
@@ -353,7 +353,7 @@ OpenLayers.String = {
}
return camelizedString;
},
-
+
/**
* APIFunction: format
* Given a string with tokens in the form ${token}, return a string
@@ -380,7 +380,7 @@ OpenLayers.String = {
context = window;
}
- // Example matching:
+ // Example matching:
// str = ${foo.bar}
// match = foo.bar
var replacer = function(str, match) {
@@ -408,13 +408,13 @@ OpenLayers.String = {
}
// If replacement is undefined, return the string 'undefined'.
- // This is a workaround for a bugs in browsers not properly
+ // This is a workaround for a bugs in browsers not properly
// dealing with non-participating groups in regular expressions:
// http://blog.stevenlevithan.com/archives/npcg-javascript
if (typeof replacement == 'undefined') {
return 'undefined';
} else {
- return replacement;
+ return replacement;
}
};
@@ -427,13 +427,13 @@ OpenLayers.String = {
* Examples: ${a}, ${a.b.c}, ${a-b}, ${5}
*/
tokenRegEx: /\$\{([\w.]+?)\}/g,
-
+
/**
* Property: numberRegEx
* Used to test strings as numbers.
*/
numberRegEx: /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,
-
+
/**
* APIFunction: isNumeric
* Determine whether a string contains only a numeric value.
@@ -452,18 +452,18 @@ OpenLayers.String = {
isNumeric: function(value) {
return OpenLayers.String.numberRegEx.test(value);
},
-
+
/**
* APIFunction: numericIf
* Converts a string that appears to be a numeric value into a number.
- *
+ *
* Parameters:
* value - {String}
* trimWhitespace - {Boolean}
*
* Returns:
* {Number|String} a Number if the passed value is a number, a String
- * otherwise.
+ * otherwise.
*/
numericIf: function(value, trimWhitespace) {
var originalValue = value;
@@ -486,21 +486,21 @@ OpenLayers.Number = {
* Decimal separator to use when formatting numbers.
*/
decimalSeparator: ".",
-
+
/**
* Property: thousandsSeparator
* Thousands separator to use when formatting numbers.
*/
thousandsSeparator: ",",
-
+
/**
* APIFunction: limitSigDigs
* Limit the number of significant digits on a float.
- *
+ *
* Parameters:
* num - {Float}
* sig - {Integer}
- *
+ *
* Returns:
* {Float} The number, rounded to the specified number of significant
* digits.
@@ -512,11 +512,11 @@ OpenLayers.Number = {
}
return fig;
},
-
+
/**
* APIFunction: format
* Formats a number for output.
- *
+ *
* Parameters:
* num - {Float}
* dec - {Integer} Number of decimal places to round to.
@@ -530,9 +530,9 @@ OpenLayers.Number = {
* {String} A string representing the formatted number.
*/
format: function(num, dec, tsep, dsep) {
- dec = (typeof dec != "undefined") ? dec : 0;
+ dec = (typeof dec != "undefined") ? dec : 0;
tsep = (typeof tsep != "undefined") ? tsep :
- OpenLayers.Number.thousandsSeparator;
+ OpenLayers.Number.thousandsSeparator;
dsep = (typeof dsep != "undefined") ? dsep :
OpenLayers.Number.decimalSeparator;
@@ -545,15 +545,15 @@ OpenLayers.Number = {
// integer where we do not want to touch the decimals
dec = 0;
}
-
+
var integer = parts[0];
if (tsep) {
- var thousands = /(-?[0-9]+)([0-9]{3})/;
- while(thousands.test(integer)) {
- integer = integer.replace(thousands, "$1" + tsep + "$2");
+ var thousands = /(-?[0-9]+)([0-9]{3})/;
+ while(thousands.test(integer)) {
+ integer = integer.replace(thousands, "$1" + tsep + "$2");
}
}
-
+
var str;
if (dec == 0) {
str = integer;
@@ -583,7 +583,7 @@ OpenLayers.Number = {
str = "0" + str;
}
return str;
- }
+ }
};
/**
@@ -595,11 +595,11 @@ OpenLayers.Function = {
* APIFunction: bind
* Bind a function to an object. Method to easily create closures with
* 'this' altered.
- *
+ *
* Parameters:
* func - {Function} Input function.
* object - {Object} The object to bind to the input function (as this).
- *
+ *
* Returns:
* {Function} A closure with 'this' set to the passed in object.
*/
@@ -615,16 +615,16 @@ OpenLayers.Function = {
return func.apply(object, newArgs);
};
},
-
+
/**
* APIFunction: bindAsEventListener
* Bind a function to an object, and configure it to receive the event
- * object as first parameter when called.
- *
+ * object as first parameter when called.
+ *
* Parameters:
* func - {Function} Input function to serve as an event listener.
* object - {Object} A reference to this.
- *
+ *
* Returns:
* {Function}
*/
@@ -633,16 +633,16 @@ OpenLayers.Function = {
return func.call(object, event || window.event);
};
},
-
+
/**
* APIFunction: False
- * A simple function to that just does "return false". We use this to
- * avoid attaching anonymous functions to DOM event handlers, which
+ * A simple function to that just does "return false". We use this to
+ * avoid attaching anonymous functions to DOM event handlers, which
* causes "issues" on IE<8.
- *
+ *
* Usage:
* document.onclick = OpenLayers.Function.False;
- *
+ *
* Returns:
* {Boolean}
*/
@@ -652,20 +652,20 @@ OpenLayers.Function = {
/**
* APIFunction: True
- * A simple function to that just does "return true". We use this to
- * avoid attaching anonymous functions to DOM event handlers, which
+ * A simple function to that just does "return true". We use this to
+ * avoid attaching anonymous functions to DOM event handlers, which
* causes "issues" on IE<8.
- *
+ *
* Usage:
* document.onclick = OpenLayers.Function.True;
- *
+ *
* Returns:
* {Boolean}
*/
True : function() {
return true;
},
-
+
/**
* APIFunction: Void
* A reusable function that returns ``undefined``.
@@ -723,11 +723,11 @@ OpenLayers.Array = {
selected.push(val);
}
}
- }
+ }
}
return selected;
}
-
+
};
/* ======================================================================
OpenLayers/BaseTypes/Bounds.js
@@ -747,7 +747,7 @@ OpenLayers.Array = {
* Instances of this class represent bounding boxes. Data stored as left,
* bottom, right, top floats. All values are initialized to null, however,
* you should make sure you set them before using the bounds for anything.
- *
+ *
* Possible use case:
* (code)
* bounds = new OpenLayers.Bounds();
@@ -781,7 +781,7 @@ OpenLayers.Bounds = OpenLayers.Class({
* {Number} Maximum vertical coordinate.
*/
top: null,
-
+
/**
* Property: centerLonLat
* {} A cached center location. This should not be
@@ -834,7 +834,7 @@ OpenLayers.Bounds = OpenLayers.Class({
* {} A fresh copy of the bounds
*/
clone:function() {
- return new OpenLayers.Bounds(this.left, this.bottom,
+ return new OpenLayers.Bounds(this.left, this.bottom,
this.right, this.top);
},
@@ -847,26 +847,26 @@ OpenLayers.Bounds = OpenLayers.Class({
*
* Returns:
* {Boolean} The passed-in bounds object has the same left,
- * right, top, bottom components as this. Note that if bounds
+ * right, top, bottom components as this. Note that if bounds
* passed in is null, returns false.
*/
equals:function(bounds) {
var equals = false;
if (bounds != null) {
- equals = ((this.left == bounds.left) &&
+ equals = ((this.left == bounds.left) &&
(this.right == bounds.right) &&
- (this.top == bounds.top) &&
+ (this.top == bounds.top) &&
(this.bottom == bounds.bottom));
}
return equals;
},
- /**
+ /**
* APIMethod: toString
* Returns a string representation of the bounds object.
- *
+ *
* Returns:
- * {String} String representation of bounds object.
+ * {String} String representation of bounds object.
*/
toString:function() {
return [this.left, this.bottom, this.right, this.top].join(",");
@@ -892,24 +892,24 @@ OpenLayers.Bounds = OpenLayers.Class({
} else {
return [this.left, this.bottom, this.right, this.top];
}
- },
+ },
- /**
+ /**
* APIMethod: toBBOX
* Returns a boundingbox-string representation of the bounds object.
- *
+ *
* Parameters:
* decimal - {Integer} How many significant digits in the bbox coords?
* Default is 6
* reverseAxisOrder - {Boolean} Should we reverse the axis order?
- *
+ *
* Returns:
* {String} Simple String representation of bounds object.
* (e.g. "5,42,10,45")
*/
toBBOX:function(decimal, reverseAxisOrder) {
if (decimal== null) {
- decimal = 6;
+ decimal = 6;
}
var mult = Math.pow(10, decimal);
var xmin = Math.round(this.left * mult) / mult;
@@ -922,7 +922,7 @@ OpenLayers.Bounds = OpenLayers.Class({
return xmin + "," + ymin + "," + xmax + "," + ymax;
}
},
-
+
/**
* APIMethod: toGeometry
* Create a new polygon geometry based on this bounds.
@@ -941,11 +941,11 @@ OpenLayers.Bounds = OpenLayers.Class({
])
]);
},
-
+
/**
* APIMethod: getWidth
* Returns the width of the bounds.
- *
+ *
* Returns:
* {Float} The width of the bounds (right minus left).
*/
@@ -956,7 +956,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: getHeight
* Returns the height of the bounds.
- *
+ *
* Returns:
* {Float} The height of the bounds (top minus bottom).
*/
@@ -967,7 +967,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: getSize
* Returns an object of the bounds.
- *
+ *
* Returns:
* {} The size of the bounds.
*/
@@ -979,7 +979,7 @@ OpenLayers.Bounds = OpenLayers.Class({
* APIMethod: getCenterPixel
* Returns the object which represents the center of the
* bounds.
- *
+ *
* Returns:
* {} The center of the bounds in pixel space.
*/
@@ -1007,12 +1007,12 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: scale
- * Scales the bounds around a pixel or lonlat. Note that the new
+ * Scales the bounds around a pixel or lonlat. Note that the new
* bounds may return non-integer properties, even if a pixel
- * is passed.
- *
+ * is passed.
+ *
* Parameters:
- * ratio - {Float}
+ * ratio - {Float}
* origin - { or }
* Default is center.
*
@@ -1024,7 +1024,7 @@ OpenLayers.Bounds = OpenLayers.Class({
if(origin == null){
origin = this.getCenterLonLat();
}
-
+
var origx,origy;
// get origin coordinates
@@ -1040,7 +1040,7 @@ OpenLayers.Bounds = OpenLayers.Class({
var bottom = (this.bottom - origy) * ratio + origy;
var right = (this.right - origx) * ratio + origx;
var top = (this.top - origy) * ratio + origy;
-
+
return new OpenLayers.Bounds(left, bottom, right, top);
},
@@ -1075,7 +1075,7 @@ OpenLayers.Bounds = OpenLayers.Class({
return new OpenLayers.Bounds(this.left + x, this.bottom + y,
this.right + x, this.top + y);
},
-
+
/**
* APIMethod: extend
* Extend the bounds to include the ,
@@ -1149,7 +1149,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: containsLonLat
* Returns whether the bounds object contains the given .
- *
+ *
* Parameters:
* ll - {|Object} OpenLayers.LonLat or an
* object with a 'lon' and 'lat' properties.
@@ -1188,7 +1188,7 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: containsPixel
* Returns whether the bounds object contains the given .
- *
+ *
* Parameters:
* px - {}
* inclusive - {Boolean} Whether or not to include the border. Default is
@@ -1200,11 +1200,11 @@ OpenLayers.Bounds = OpenLayers.Class({
containsPixel:function(px, inclusive) {
return this.contains(px.x, px.y, inclusive);
},
-
+
/**
* APIMethod: contains
* Returns whether the bounds object contains the given x and y.
- *
+ *
* Parameters:
* x - {Float}
* y - {Float}
@@ -1230,12 +1230,12 @@ OpenLayers.Bounds = OpenLayers.Class({
var contains = false;
if (inclusive) {
- contains = ((x >= this.left) && (x <= this.right) &&
+ contains = ((x >= this.left) && (x <= this.right) &&
(y >= this.bottom) && (y <= this.top));
} else {
- contains = ((x > this.left) && (x < this.right) &&
+ contains = ((x > this.left) && (x < this.right) &&
(y > this.bottom) && (y < this.top));
- }
+ }
return contains;
},
@@ -1244,17 +1244,17 @@ OpenLayers.Bounds = OpenLayers.Class({
* Determine whether the target bounds intersects this bounds. Bounds are
* considered intersecting if any of their edges intersect or if one
* bounds contains the other.
- *
+ *
* Parameters:
* bounds - {} The target bounds.
* options - {Object} Optional parameters.
- *
+ *
* Acceptable options:
* inclusive - {Boolean} Treat coincident borders as intersecting. Default
* is true. If false, bounds that do not overlap but only touch at the
* border will not be considered as intersecting.
* worldBounds - {} If a worldBounds is provided, two
- * bounds will be considered as intersecting if they intersect when
+ * bounds will be considered as intersecting if they intersect when
* shifted to within the world bounds. This applies only to bounds that
* cross or are completely outside the world bounds.
*
@@ -1282,7 +1282,7 @@ OpenLayers.Bounds = OpenLayers.Class({
self.top == bounds.bottom ||
self.bottom == bounds.top
);
-
+
// if the two bounds only touch at an edge, and inclusive is false,
// then the bounds don't *really* intersect.
if (options.inclusive || !mightTouch) {
@@ -1317,16 +1317,16 @@ OpenLayers.Bounds = OpenLayers.Class({
intersects = self.intersectsBounds(bounds, {inclusive: options.inclusive});
} else if (boundsCrosses && !selfCrosses) {
self = self.add(-width, 0);
- intersects = bounds.intersectsBounds(self, {inclusive: options.inclusive});
+ intersects = bounds.intersectsBounds(self, {inclusive: options.inclusive});
}
}
return intersects;
},
-
+
/**
* APIMethod: containsBounds
* Returns whether the bounds object contains the given .
- *
+ *
* bounds - {} The target bounds.
* partial - {Boolean} If any of the target corners is within this bounds
* consider the bounds contained. Default is false. If false, the
@@ -1335,7 +1335,7 @@ OpenLayers.Bounds = OpenLayers.Class({
* true.
*
* Returns:
- * {Boolean} The passed-in bounds object is contained within this bounds.
+ * {Boolean} The passed-in bounds object is contained within this bounds.
*/
containsBounds:function(bounds, partial, inclusive) {
if (partial == null) {
@@ -1348,12 +1348,12 @@ OpenLayers.Bounds = OpenLayers.Class({
var bottomRight = this.contains(bounds.right, bounds.bottom, inclusive);
var topLeft = this.contains(bounds.left, bounds.top, inclusive);
var topRight = this.contains(bounds.right, bounds.top, inclusive);
-
+
return (partial) ? (bottomLeft || bottomRight || topLeft || topRight)
: (bottomLeft && bottomRight && topLeft && topRight);
},
- /**
+ /**
* APIMethod: determineQuadrant
* Returns the the quadrant ("br", "tr", "tl", "bl") in which the given
* lies.
@@ -1366,23 +1366,23 @@ OpenLayers.Bounds = OpenLayers.Class({
* coordinate lies.
*/
determineQuadrant: function(lonlat) {
-
+
var quadrant = "";
var center = this.getCenterLonLat();
-
+
quadrant += (lonlat.lat < center.lat) ? "b" : "t";
quadrant += (lonlat.lon < center.lon) ? "l" : "r";
-
- return quadrant;
+
+ return quadrant;
},
-
+
/**
* APIMethod: transform
- * Transform the Bounds object from source to dest.
+ * Transform the Bounds object from source to dest.
*
- * Parameters:
- * source - {} Source projection.
- * dest - {} Destination projection.
+ * Parameters:
+ * source - {} Source projection.
+ * dest - {} Destination projection.
*
* Returns:
* {} Itself, for use in chaining operations.
@@ -1408,72 +1408,72 @@ OpenLayers.Bounds = OpenLayers.Class({
/**
* APIMethod: wrapDateLine
* Wraps the bounds object around the dateline.
- *
+ *
* Parameters:
* maxExtent - {}
* options - {Object} Some possible options are:
*
* Allowed Options:
- * leftTolerance - {float} Allow for a margin of error
- * with the 'left' value of this
+ * leftTolerance - {float} Allow for a margin of error
+ * with the 'left' value of this
* bound.
* Default is 0.
- * rightTolerance - {float} Allow for a margin of error
- * with the 'right' value of
+ * rightTolerance - {float} Allow for a margin of error
+ * with the 'right' value of
* this bound.
* Default is 0.
- *
+ *
* Returns:
- * {} A copy of this bounds, but wrapped around the
- * "dateline" (as specified by the borders of
- * maxExtent). Note that this function only returns
- * a different bounds value if this bounds is
- * *entirely* outside of the maxExtent. If this
- * bounds straddles the dateline (is part in/part
- * out of maxExtent), the returned bounds will always
+ * {} A copy of this bounds, but wrapped around the
+ * "dateline" (as specified by the borders of
+ * maxExtent). Note that this function only returns
+ * a different bounds value if this bounds is
+ * *entirely* outside of the maxExtent. If this
+ * bounds straddles the dateline (is part in/part
+ * out of maxExtent), the returned bounds will always
* cross the left edge of the given maxExtent.
*.
*/
- wrapDateLine: function(maxExtent, options) {
+ wrapDateLine: function(maxExtent, options) {
options = options || {};
-
+
var leftTolerance = options.leftTolerance || 0;
var rightTolerance = options.rightTolerance || 0;
var newBounds = this.clone();
-
+
if (maxExtent) {
var width = maxExtent.getWidth();
//shift right?
- while (newBounds.left < maxExtent.left &&
- newBounds.right - rightTolerance <= maxExtent.left ) {
+ while (newBounds.left < maxExtent.left &&
+ newBounds.right - rightTolerance <= maxExtent.left ) {
newBounds = newBounds.add(width, 0);
}
//shift left?
- while (newBounds.left + leftTolerance >= maxExtent.right &&
- newBounds.right > maxExtent.right ) {
+ while (newBounds.left + leftTolerance >= maxExtent.right &&
+ newBounds.right > maxExtent.right ) {
newBounds = newBounds.add(-width, 0);
}
-
+
// crosses right only? force left
var newLeft = newBounds.left + leftTolerance;
- if (newLeft < maxExtent.right && newLeft > maxExtent.left &&
+ if (newLeft < maxExtent.right && newLeft > maxExtent.left &&
newBounds.right - rightTolerance > maxExtent.right) {
newBounds = newBounds.add(-width, 0);
}
}
-
+
return newBounds;
},
CLASS_NAME: "OpenLayers.Bounds"
});
-/**
+/**
* APIFunction: fromString
- * Alternative constructor that builds a new OpenLayers.Bounds from a
+ * Alternative constructor that builds a new OpenLayers.Bounds from a
* parameter string.
*
* (begin code)
@@ -1482,12 +1482,12 @@ OpenLayers.Bounds = OpenLayers.Class({
* new OpenLayers.Bounds(5, 42, 10, 45);
* (end)
*
- * Parameters:
+ * Parameters:
* str - {String} Comma-separated bounds string. (e.g. "5,42,10,45")
* reverseAxisOrder - {Boolean} Does the string use reverse axis order?
*
* Returns:
- * {} New bounds object built from the
+ * {} New bounds object built from the
* passed-in String.
*/
OpenLayers.Bounds.fromString = function(str, reverseAxisOrder) {
@@ -1495,7 +1495,7 @@ OpenLayers.Bounds.fromString = function(str, reverseAxisOrder) {
return OpenLayers.Bounds.fromArray(bounds, reverseAxisOrder);
};
-/**
+/**
* APIFunction: fromArray
* Alternative constructor that builds a new OpenLayers.Bounds from an array.
*
@@ -1518,7 +1518,7 @@ OpenLayers.Bounds.fromArray = function(bbox, reverseAxisOrder) {
new OpenLayers.Bounds(bbox[0], bbox[1], bbox[2], bbox[3]);
};
-/**
+/**
* APIFunction: fromSize
* Alternative constructor that builds a new OpenLayers.Bounds from a size.
*
@@ -1558,16 +1558,16 @@ OpenLayers.Bounds.fromSize = function(size) {
* quadrant - {String} two character quadrant shortstring
*
* Returns:
- * {String} The opposing quadrant ("br" "tr" "tl" "bl"). For Example, if
- * you pass in "bl" it returns "tr", if you pass in "br" it
+ * {String} The opposing quadrant ("br" "tr" "tl" "bl"). For Example, if
+ * you pass in "bl" it returns "tr", if you pass in "br" it
* returns "tl", etc.
*/
OpenLayers.Bounds.oppositeQuadrant = function(quadrant) {
var opp = "";
-
+
opp += (quadrant.charAt(0) == 't') ? 'b' : 't';
opp += (quadrant.charAt(1) == 'l') ? 'r' : 'l';
-
+
return opp;
};
/* ======================================================================
@@ -1591,10 +1591,10 @@ OpenLayers.Element = {
/**
* APIFunction: visible
- *
- * Parameters:
+ *
+ * Parameters:
* element - {DOMElement}
- *
+ *
* Returns:
* {Boolean} Is the element visible?
*/
@@ -1605,14 +1605,14 @@ OpenLayers.Element = {
/**
* APIFunction: toggle
* Toggle the visibility of element(s) passed in
- *
+ *
* Parameters:
* element - {DOMElement} Actually user can pass any number of elements
*/
toggle: function() {
for (var i=0, len=arguments.length; i"lon=5,lat=42")
*/
toString:function() {
return ("lon=" + this.lon + ",lat=" + this.lat);
},
- /**
+ /**
* APIMethod: toShortString
- *
+ *
* Returns:
- * {String} Shortened String representation of OpenLayers.LonLat object.
+ * {String} Shortened String representation of OpenLayers.LonLat object.
* (e.g. "5, 42")
*/
toShortString:function() {
return (this.lon + ", " + this.lat);
},
- /**
+ /**
* APIMethod: clone
- *
+ *
* Returns:
- * {} New OpenLayers.LonLat object with the same lon
+ * {} New OpenLayers.LonLat object with the same lon
* and lat values
*/
clone:function() {
return new OpenLayers.LonLat(this.lon, this.lat);
},
- /**
+ /**
* APIMethod: add
- *
+ *
* Parameters:
* lon - {Float}
* lat - {Float}
- *
+ *
* Returns:
- * {} A new OpenLayers.LonLat object with the lon and
- * lat passed-in added to this's.
+ * {} A new OpenLayers.LonLat object with the lon and
+ * lat passed-in added to this's.
*/
add:function(lon, lat) {
if ( (lon == null) || (lat == null) ) {
throw new TypeError('LonLat.add cannot receive null values');
}
- return new OpenLayers.LonLat(this.lon + OpenLayers.Util.toFloat(lon),
+ return new OpenLayers.LonLat(this.lon + OpenLayers.Util.toFloat(lon),
this.lat + OpenLayers.Util.toFloat(lat));
},
- /**
+ /**
* APIMethod: equals
- *
+ *
* Parameters:
* ll - {}
- *
+ *
* Returns:
- * {Boolean} Boolean value indicating whether the passed-in
- * object has the same lon and lat
+ * {Boolean} Boolean value indicating whether the passed-in
+ * object has the same lon and lat
* components as this.
* Note: if ll passed in is null, returns false
*/
@@ -1898,9 +1898,9 @@ OpenLayers.LonLat = OpenLayers.Class({
* Transform the LonLat object from source to dest. This transformation is
* *in place*: if you want a *new* lonlat, use .clone() first.
*
- * Parameters:
- * source - {} Source projection.
- * dest - {} Destination projection.
+ * Parameters:
+ * source - {} Source projection.
+ * dest - {} Destination projection.
*
* Returns:
* {} Itself, for use in chaining operations.
@@ -1912,51 +1912,51 @@ OpenLayers.LonLat = OpenLayers.Class({
this.lat = point.y;
return this;
},
-
+
/**
* APIMethod: wrapDateLine
- *
+ *
* Parameters:
* maxExtent - {}
- *
+ *
* Returns:
- * {} A copy of this lonlat, but wrapped around the
- * "dateline" (as specified by the borders of
+ * {} A copy of this lonlat, but wrapped around the
+ * "dateline" (as specified by the borders of
* maxExtent)
*/
- wrapDateLine: function(maxExtent) {
+ wrapDateLine: function(maxExtent) {
var newLonLat = this.clone();
-
+
if (maxExtent) {
//shift right?
while (newLonLat.lon < maxExtent.left) {
newLonLat.lon += maxExtent.getWidth();
- }
-
+ }
+
//shift left?
while (newLonLat.lon > maxExtent.right) {
newLonLat.lon -= maxExtent.getWidth();
- }
+ }
}
-
+
return newLonLat;
},
CLASS_NAME: "OpenLayers.LonLat"
});
-/**
+/**
* Function: fromString
- * Alternative constructor that builds a new from a
+ * Alternative constructor that builds a new from a
* parameter string
- *
+ *
* Parameters:
- * str - {String} Comma-separated Lon,Lat coordinate string.
+ * str - {String} Comma-separated Lon,Lat coordinate string.
* (e.g. "5,40")
- *
+ *
* Returns:
- * {} New object built from the
+ * {} New object built from the
* passed-in String.
*/
OpenLayers.LonLat.fromString = function(str) {
@@ -1964,16 +1964,16 @@ OpenLayers.LonLat.fromString = function(str) {
return new OpenLayers.LonLat(pair[0], pair[1]);
};
-/**
+/**
* Function: fromArray
- * Alternative constructor that builds a new from an
+ * Alternative constructor that builds a new from an
* array of two numbers that represent lon- and lat-values.
- *
+ *
* Parameters:
* arr - {Array(Float)} Array of lon/lat values (e.g. [5,-42])
- *
+ *
* Returns:
- * {} New object built from the
+ * {} New object built from the
* passed-in array.
*/
OpenLayers.LonLat.fromArray = function(arr) {
@@ -2000,7 +2000,7 @@ OpenLayers.LonLat.fromArray = function(arr) {
* This class represents a screen coordinate, in x and y coordinates
*/
OpenLayers.Pixel = OpenLayers.Class({
-
+
/**
* APIProperty: x
* {Number} The x coordinate
@@ -2012,7 +2012,7 @@ OpenLayers.Pixel = OpenLayers.Class({
* {Number} The y coordinate
*/
y: 0.0,
-
+
/**
* Constructor: OpenLayers.Pixel
* Create a new OpenLayers.Pixel instance
@@ -2028,7 +2028,7 @@ OpenLayers.Pixel = OpenLayers.Class({
this.x = parseFloat(x);
this.y = parseFloat(y);
},
-
+
/**
* Method: toString
* Cast this object into a string
@@ -2048,9 +2048,9 @@ OpenLayers.Pixel = OpenLayers.Class({
* {} A clone pixel
*/
clone:function() {
- return new OpenLayers.Pixel(this.x, this.y);
+ return new OpenLayers.Pixel(this.x, this.y);
},
-
+
/**
* APIMethod: equals
* Determine whether one pixel is equivalent to another
@@ -2098,7 +2098,7 @@ OpenLayers.Pixel = OpenLayers.Class({
* y - {Integer}
*
* Returns:
- * {} A new Pixel with this pixel's x&y augmented by the
+ * {} A new Pixel with this pixel's x&y augmented by the
* values passed in.
*/
add:function(x, y) {
@@ -2110,13 +2110,13 @@ OpenLayers.Pixel = OpenLayers.Class({
/**
* APIMethod: offset
- *
+ *
* Parameters
* px - {|Object} An OpenLayers.Pixel or an object with
* a 'x' and 'y' properties.
- *
+ *
* Returns:
- * {} A new Pixel with this pixel's x&y augmented by the
+ * {} A new Pixel with this pixel's x&y augmented by the
* x&y values of the pixel passed in.
*/
offset:function(px) {
@@ -2153,7 +2153,7 @@ OpenLayers.Size = OpenLayers.Class({
* {Number} width
*/
w: 0.0,
-
+
/**
* APIProperty: h
* {Number} height
@@ -2179,7 +2179,7 @@ OpenLayers.Size = OpenLayers.Class({
* Return the string representation of a size object
*
* Returns:
- * {String} The string representation of OpenLayers.Size object.
+ * {String} The string representation of OpenLayers.Size object.
* (e.g. "w=55,h=66")
*/
toString:function() {
@@ -2207,7 +2207,7 @@ OpenLayers.Size = OpenLayers.Class({
* sz - {|Object} An OpenLayers.Size or an object with
* a 'w' and 'h' properties.
*
- * Returns:
+ * Returns:
* {Boolean} The passed in size has the same h and w properties as this one.
* Note that if sz passed in is null, returns false.
*/
@@ -2247,7 +2247,7 @@ OpenLayers.Size = OpenLayers.Class({
* Note that behavior will differ with the Firebug extention and Firebug Lite.
* Most notably, the Firebug Lite console does not currently allow for
* hyperlinks to code or for clicking on object to explore their properties.
- *
+ *
*/
OpenLayers.Console = {
/**
@@ -2256,7 +2256,7 @@ OpenLayers.Console = {
* included. We explicitly require the Firebug Lite script to trigger
* functionality of the OpenLayers.Console methods.
*/
-
+
/**
* APIFunction: log
* Log an object in the console. The Firebug Lite console logs string
@@ -2266,7 +2266,7 @@ OpenLayers.Console = {
* will be used in string substitution. Any additional arguments (beyond
* the number substituted in a format string) will be appended in a space-
* delimited line.
- *
+ *
* Parameters:
* object - {Object}
*/
@@ -2278,7 +2278,7 @@ OpenLayers.Console = {
* where it was called.
*
* May be called with multiple arguments as with OpenLayers.Console.log().
- *
+ *
* Parameters:
* object - {Object}
*/
@@ -2290,7 +2290,7 @@ OpenLayers.Console = {
* coding and a hyperlink to the line where it was called.
*
* May be called with multiple arguments as with OpenLayers.Console.log().
- *
+ *
* Parameters:
* object - {Object}
*/
@@ -2302,7 +2302,7 @@ OpenLayers.Console = {
* color coding and a hyperlink to the line where it was called.
*
* May be called with multiple arguments as with OpenLayers.Console.log().
- *
+ *
* Parameters:
* object - {Object}
*/
@@ -2314,12 +2314,12 @@ OpenLayers.Console = {
* coding and a hyperlink to the line where it was called.
*
* May be called with multiple arguments as with OpenLayers.Console.log().
- *
+ *
* Parameters:
* object - {Object}
*/
error: function() {},
-
+
/**
* APIFunction: userError
* A single interface for showing error messages to the user. The default
@@ -2327,7 +2327,7 @@ OpenLayers.Console = {
* reassigning OpenLayers.Console.userError to a different function.
*
* Expects a single error message
- *
+ *
* Parameters:
* error - {Object}
*/
@@ -2341,7 +2341,7 @@ OpenLayers.Console = {
* the console and throw an exception.
*
* May be called with multiple arguments as with OpenLayers.Console.log().
- *
+ *
* Parameters:
* object - {Object}
*/
@@ -2351,7 +2351,7 @@ OpenLayers.Console = {
* APIFunction: dir
* Prints an interactive listing of all properties of the object. This
* looks identical to the view that you would see in the DOM tab.
- *
+ *
* Parameters:
* object - {Object}
*/
@@ -2362,7 +2362,7 @@ OpenLayers.Console = {
* Prints the XML source tree of an HTML or XML element. This looks
* identical to the view that you would see in the HTML tab. You can click
* on any node to inspect it in the HTML tab.
- *
+ *
* Parameters:
* object - {Object}
*/
@@ -2375,7 +2375,7 @@ OpenLayers.Console = {
* as well as the values that were passed as arguments to each function.
* You can click each function to take you to its source in the Script tab,
* and click each argument value to inspect it in the DOM or HTML tabs.
- *
+ *
*/
trace: function() {},
@@ -2386,7 +2386,7 @@ OpenLayers.Console = {
* to close the block.
*
* May be called with multiple arguments as with OpenLayers.Console.log().
- *
+ *
* Parameters:
* object - {Object}
*/
@@ -2398,7 +2398,7 @@ OpenLayers.Console = {
* OpenLayers.Console.group
*/
groupEnd: function() {},
-
+
/**
* APIFunction: time
* Creates a new timer under the given name. Call
@@ -2426,7 +2426,7 @@ OpenLayers.Console = {
* contain the text to be printed in the header of the profile report.
*
* This function is not currently implemented in Firebug Lite.
- *
+ *
* Parameters:
* title - {String} Optional title for the profiler
*/
@@ -2435,7 +2435,7 @@ OpenLayers.Console = {
/**
* APIFunction: profileEnd
* Turns off the JavaScript profiler and prints its report.
- *
+ *
* This function is not currently implemented in Firebug Lite.
*/
profileEnd: function() {},
@@ -2496,8 +2496,8 @@ OpenLayers.Console = {
* and methods to set and get the current language.
*/
OpenLayers.Lang = {
-
- /**
+
+ /**
* Property: code
* {String} Current language code to use in OpenLayers. Use the
* method to set this value and the method to
@@ -2505,13 +2505,13 @@ OpenLayers.Lang = {
*/
code: null,
- /**
+ /**
* APIProperty: defaultCode
* {String} Default language to use when a specific language can't be
* found. Default is "en".
*/
defaultCode: "en",
-
+
/**
* APIFunction: getCode
* Get the current language code.
@@ -2525,7 +2525,7 @@ OpenLayers.Lang = {
}
return OpenLayers.Lang.code;
},
-
+
/**
* APIFunction: setCode
* Set the language code for string translation. This code is used by
@@ -2564,7 +2564,7 @@ OpenLayers.Lang = {
);
lang = OpenLayers.Lang.defaultCode;
}
-
+
OpenLayers.Lang.code = lang;
},
@@ -2578,7 +2578,7 @@ OpenLayers.Lang = {
* key - {String} The key for an i18n string value in the dictionary.
* context - {Object} Optional context to be used with
* .
- *
+ *
* Returns:
* {String} A internationalized string.
*/
@@ -2594,7 +2594,7 @@ OpenLayers.Lang = {
}
return message;
}
-
+
};
@@ -2609,7 +2609,7 @@ OpenLayers.Lang = {
* key - {String} The key for an i18n string value in the dictionary.
* context - {Object} Optional context to be used with
* .
- *
+ *
* Returns:
* {String} A internationalized string.
*/
@@ -2638,7 +2638,7 @@ OpenLayers.i18n = OpenLayers.Lang.translate;
*/
OpenLayers.Util = OpenLayers.Util || {};
-/**
+/**
* Function: getElement
* This is the old $() from prototype
*
@@ -2683,10 +2683,10 @@ OpenLayers.Util.isElement = function(o) {
* Tests that the provided object is an array.
* This test handles the cross-IFRAME case not caught
* by "a instanceof Array" and should be used instead.
- *
+ *
* Parameters:
* a - {Object} the object test.
- *
+ *
* Returns:
* {Boolean} true if the object is an array.
*/
@@ -2694,7 +2694,7 @@ OpenLayers.Util.isArray = function(a) {
return (Object.prototype.toString.call(a) === '[object Array]');
};
-/**
+/**
* Function: removeItem
* Remove an object from an array. Iterates through the array
* to find the item, then removes it.
@@ -2702,7 +2702,7 @@ OpenLayers.Util.isArray = function(a) {
* Parameters:
* array - {Array}
* item - {Object}
- *
+ *
* Returns:
* {Array} A reference to the array
*/
@@ -2716,14 +2716,14 @@ OpenLayers.Util.removeItem = function(array, item) {
return array;
};
-/**
+/**
* Function: indexOf
* Seems to exist already in FF, but not in MOZ.
- *
+ *
* Parameters:
* array - {Array}
* obj - {*}
- *
+ *
* Returns:
* {Integer} The index at which the first object was found in the array.
* If not found, returns -1.
@@ -2738,7 +2738,7 @@ OpenLayers.Util.indexOf = function(array, obj) {
return i;
}
}
- return -1;
+ return -1;
}
};
@@ -2757,8 +2757,8 @@ OpenLayers.Util.dotless = /\./g;
/**
* Function: modifyDOMElement
- *
- * Modifies many properties of a DOM element all at once. Passing in
+ *
+ * Modifies many properties of a DOM element all at once. Passing in
* null to an individual parameter will avoid setting the attribute.
*
* Parameters:
@@ -2771,14 +2771,14 @@ OpenLayers.Util.dotless = /\./g;
* sz - {|Object} The element width and height,
* OpenLayers.Size or an object with a
* 'w' and 'h' properties.
- * position - {String} The position attribute. eg: absolute,
+ * position - {String} The position attribute. eg: absolute,
* relative, etc.
* border - {String} The style.border attribute. eg:
* solid black 2px
- * overflow - {String} The style.overview attribute.
+ * overflow - {String} The style.overview attribute.
* opacity - {Float} Fractional value (0.0 - 1.0)
*/
-OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position,
+OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position,
border, overflow, opacity) {
if (id) {
@@ -2810,16 +2810,16 @@ OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position,
}
};
-/**
+/**
* Function: createDiv
* Creates a new div and optionally set some standard attributes.
* Null may be passed to each parameter if you do not wish to
* set a particular attribute.
* Note - zIndex is NOT set on the resulting div.
- *
+ *
* Parameters:
* id - {String} An identifier for this element. If no id is
- * passed an identifier will be created
+ * passed an identifier will be created
* automatically. Note that dots (".") will be replaced with
* underscore ("_") when generating ids.
* px - {|Object} The element left and top position,
@@ -2828,19 +2828,19 @@ OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position,
* sz - {|Object} The element width and height,
* OpenLayers.Size or an object with a
* 'w' and 'h' properties.
- * imgURL - {String} A url pointing to an image to use as a
+ * imgURL - {String} A url pointing to an image to use as a
* background image.
* position - {String} The style.position value. eg: absolute,
* relative etc.
- * border - {String} The the style.border value.
+ * border - {String} The the style.border value.
* eg: 2px solid black
* overflow - {String} The style.overflow value. Eg. hidden
* opacity - {Float} Fractional value (0.0 - 1.0)
- *
- * Returns:
+ *
+ * Returns:
* {DOMElement} A DOM Div created with the specified attributes.
*/
-OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position,
+OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position,
border, overflow, opacity) {
var dom = document.createElement('div');
@@ -2856,7 +2856,7 @@ OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position,
if (!position) {
position = "absolute";
}
- OpenLayers.Util.modifyDOMElement(dom, id, px, sz, position,
+ OpenLayers.Util.modifyDOMElement(dom, id, px, sz, position,
border, overflow, opacity);
return dom;
@@ -2865,7 +2865,7 @@ OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position,
/**
* Function: createImage
* Creates an img element with specific attribute values.
- *
+ *
* Parameters:
* id - {String} The id field for the img. If none assigned one will be
* automatically generated.
@@ -2881,7 +2881,7 @@ OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position,
* opacity - {Float} Fractional value (0.0 - 1.0)
* delayDisplay - {Boolean} If true waits until the image has been
* loaded.
- *
+ *
* Returns:
* {DOMElement} A DOM Image created with the specified attributes.
*/
@@ -2897,7 +2897,7 @@ OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,
if (!position) {
position = "relative";
}
- OpenLayers.Util.modifyDOMElement(image, id, px, sz, position,
+ OpenLayers.Util.modifyDOMElement(image, id, px, sz, position,
border, null, opacity);
if (delayDisplay) {
@@ -2909,14 +2909,14 @@ OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,
OpenLayers.Event.observe(image, "load", display);
OpenLayers.Event.observe(image, "error", display);
}
-
+
//set special properties
image.style.alt = id;
image.galleryImg = "no";
if (imgURL) {
image.src = imgURL;
}
-
+
return image;
};
@@ -2938,7 +2938,7 @@ OpenLayers.Util.alphaHackNeeded = null;
* Checks whether it's necessary (and possible) to use the png alpha
* hack which allows alpha transparency for png images under Internet
* Explorer.
- *
+ *
* Returns:
* {Boolean} true if the png alpha hack is necessary and possible, false otherwise.
*/
@@ -2947,25 +2947,25 @@ OpenLayers.Util.alphaHack = function() {
var arVersion = navigator.appVersion.split("MSIE");
var version = parseFloat(arVersion[1]);
var filter = false;
-
- // IEs4Lin dies when trying to access document.body.filters, because
+
+ // IEs4Lin dies when trying to access document.body.filters, because
// the property is there, but requires a DLL that can't be provided. This
// means that we need to wrap this in a try/catch so that this can
// continue.
-
- try {
+
+ try {
filter = !!(document.body.filters);
- } catch (e) {}
-
- OpenLayers.Util.alphaHackNeeded = (filter &&
+ } catch (e) {}
+
+ OpenLayers.Util.alphaHackNeeded = (filter &&
(version >= 5.5) && (version < 7));
}
return OpenLayers.Util.alphaHackNeeded;
};
-/**
+/**
* Function: modifyAlphaImageDiv
- *
+ *
* Parameters:
* div - {DOMElement} Div containing Alpha-adjusted Image
* id - {String}
@@ -2978,9 +2978,9 @@ OpenLayers.Util.alphaHack = function() {
* border - {String}
* sizing - {String} 'crop', 'scale', or 'image'. Default is "scale"
* opacity - {Float} Fractional value (0.0 - 1.0)
- */
-OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL,
- position, border, sizing,
+ */
+OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL,
+ position, border, sizing,
opacity) {
OpenLayers.Util.modifyDOMElement(div, id, px, sz, position,
@@ -2991,9 +2991,9 @@ OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL,
if (imgURL) {
img.src = imgURL;
}
- OpenLayers.Util.modifyDOMElement(img, div.id + "_innerImage", null, sz,
+ OpenLayers.Util.modifyDOMElement(img, div.id + "_innerImage", null, sz,
"relative", border);
-
+
if (OpenLayers.Util.alphaHack()) {
if(div.style.display != "none") {
div.style.display = "inline-block";
@@ -3001,11 +3001,11 @@ OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL,
if (sizing == null) {
sizing = "scale";
}
-
+
div.style.filter = "progid:DXImageTransform.Microsoft" +
".AlphaImageLoader(src='" + img.src + "', " +
"sizingMethod='" + sizing + "')";
- if (parseFloat(div.style.opacity) >= 0.0 &&
+ if (parseFloat(div.style.opacity) >= 0.0 &&
parseFloat(div.style.opacity) < 1.0) {
div.style.filter += " alpha(opacity=" + div.style.opacity * 100 + ")";
}
@@ -3014,9 +3014,9 @@ OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL,
}
};
-/**
+/**
* Function: createAlphaImageDiv
- *
+ *
* Parameters:
* id - {String}
* px - {|Object} OpenLayers.Pixel or an object with
@@ -3030,38 +3030,38 @@ OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL,
* opacity - {Float} Fractional value (0.0 - 1.0)
* delayDisplay - {Boolean} If true waits until the image has been
* loaded.
- *
+ *
* Returns:
- * {DOMElement} A DOM Div created with a DOM Image inside it. If the hack is
+ * {DOMElement} A DOM Div created with a DOM Image inside it. If the hack is
* needed for transparency in IE, it is added.
- */
-OpenLayers.Util.createAlphaImageDiv = function(id, px, sz, imgURL,
- position, border, sizing,
+ */
+OpenLayers.Util.createAlphaImageDiv = function(id, px, sz, imgURL,
+ position, border, sizing,
opacity, delayDisplay) {
-
+
var div = OpenLayers.Util.createDiv();
- var img = OpenLayers.Util.createImage(null, null, null, null, null, null,
+ var img = OpenLayers.Util.createImage(null, null, null, null, null, null,
null, delayDisplay);
img.className = "olAlphaImg";
div.appendChild(img);
- OpenLayers.Util.modifyAlphaImageDiv(div, id, px, sz, imgURL, position,
+ OpenLayers.Util.modifyAlphaImageDiv(div, id, px, sz, imgURL, position,
border, sizing, opacity);
-
+
return div;
};
-/**
+/**
* Function: upperCaseObject
- * Creates a new hashtable and copies over all the keys from the
+ * Creates a new hashtable and copies over all the keys from the
* passed-in object, but storing them under an uppercased
* version of the key at which they were stored.
- *
- * Parameters:
+ *
+ * Parameters:
* object - {Object}
- *
- * Returns:
+ *
+ * Returns:
* {Object} A new Object with all the same keys but uppercased
*/
OpenLayers.Util.upperCaseObject = function (object) {
@@ -3072,12 +3072,12 @@ OpenLayers.Util.upperCaseObject = function (object) {
return uObject;
};
-/**
+/**
* Function: applyDefaults
* Takes an object and copies any properties that don't exist from
* another properties, by analogy with OpenLayers.Util.extend() from
* Prototype.js.
- *
+ *
* Parameters:
* to - {Object} The destination object.
* from - {Object} The source object. Any properties of this object that
@@ -3113,27 +3113,27 @@ OpenLayers.Util.applyDefaults = function (to, from) {
&& from.hasOwnProperty('toString') && !to.hasOwnProperty('toString')) {
to.toString = from.toString;
}
-
+
return to;
};
/**
* Function: getParameterString
- *
+ *
* Parameters:
* params - {Object}
- *
+ *
* Returns:
- * {String} A concatenation of the properties of an object in
- * http parameter notation.
+ * {String} A concatenation of the properties of an object in
+ * http parameter notation.
* (ex. "key1=value1&key2=value2&key3=value3")
* If a parameter is actually a list, that parameter will then
* be set to a comma-seperated list of values (foo,bar) instead
- * of being URL escaped (foo%3Abar).
+ * of being URL escaped (foo%3Abar).
*/
OpenLayers.Util.getParameterString = function(params) {
var paramsArray = [];
-
+
for (var key in params) {
var value = params[key];
if ((value != null) && (typeof value != 'function')) {
@@ -3157,7 +3157,7 @@ OpenLayers.Util.getParameterString = function(params) {
paramsArray.push(encodeURIComponent(key) + "=" + encodedValue);
}
}
-
+
return paramsArray.join("&");
};
@@ -3166,11 +3166,11 @@ OpenLayers.Util.getParameterString = function(params) {
* Appends a parameter string to a url. This function includes the logic for
* using the appropriate character (none, & or ?) to append to the url before
* appending the param string.
- *
+ *
* Parameters:
* url - {String} The url to append to
* paramStr - {String} The param string to append
- *
+ *
* Returns:
* {String} The new url
*/
@@ -3185,9 +3185,9 @@ OpenLayers.Util.urlAppend = function(url, paramStr) {
return newUrl;
};
-/**
+/**
* Function: getImagesLocation
- *
+ *
* Returns:
* {String} The fully formatted image location string
*/
@@ -3195,9 +3195,9 @@ OpenLayers.Util.getImagesLocation = function() {
return OpenLayers.ImgPath || (OpenLayers._getScriptLocation() + "img/");
};
-/**
+/**
* Function: getImageLocation
- *
+ *
* Returns:
* {String} The fully formatted location string for a specified image
*/
@@ -3206,18 +3206,18 @@ OpenLayers.Util.getImageLocation = function(image) {
};
-/**
+/**
* Function: Try
- * Execute functions until one of them doesn't throw an error.
+ * Execute functions until one of them doesn't throw an error.
* Capitalized because "try" is a reserved word in JavaScript.
* Taken directly from OpenLayers.Util.Try()
- *
+ *
* Parameters:
* [*] - {Function} Any number of parameters may be passed to Try()
- * It will attempt to execute each of them until one of them
- * successfully executes.
+ * It will attempt to execute each of them until one of them
+ * successfully executes.
* If none executes successfully, returns null.
- *
+ *
* Returns:
* {*} The value returned by the first successfully executed function.
*/
@@ -3237,16 +3237,16 @@ OpenLayers.Util.Try = function() {
/**
* Function: getXmlNodeValue
- *
+ *
* Parameters:
* node - {XMLNode}
- *
+ *
* Returns:
* {String} The text value of the given node, without breaking in firefox or IE
*/
OpenLayers.Util.getXmlNodeValue = function(node) {
var val = null;
- OpenLayers.Util.Try(
+ OpenLayers.Util.Try(
function() {
val = node.text;
if (!val) {
@@ -3255,20 +3255,20 @@ OpenLayers.Util.getXmlNodeValue = function(node) {
if (!val) {
val = node.firstChild.nodeValue;
}
- },
+ },
function() {
val = node.textContent;
- });
+ });
return val;
};
-/**
+/**
* Function: mouseLeft
- *
+ *
* Parameters:
* evt - {Event}
* div - {HTMLDivElement}
- *
+ *
* Returns:
* {Boolean}
*/
@@ -3328,10 +3328,10 @@ OpenLayers.Util.toFloat = function (number, precision) {
/**
* Function: rad
- *
+ *
* Parameters:
* x - {Float}
- *
+ *
* Returns:
* {Float}
*/
@@ -3478,20 +3478,20 @@ OpenLayers.Util.destinationVincenty = function(lonlat, brng, dist) {
/**
* Function: getParameters
- * Parse the parameters from a URL or from the current page itself into a
+ * Parse the parameters from a URL or from the current page itself into a
* JavaScript Object. Note that parameter values with commas are separated
* out into an Array.
- *
+ *
* Parameters:
* url - {String} Optional url used to extract the query string.
- * If url is null or is not supplied, query string is taken
+ * If url is null or is not supplied, query string is taken
* from the page location.
* options - {Object} Additional options. Optional.
*
* Valid options:
* splitArgs - {Boolean} Split comma delimited params into arrays? Default is
* true.
- *
+ *
* Returns:
* {Object} An object of key/value pairs from the query string.
*/
@@ -3521,7 +3521,7 @@ OpenLayers.Util.getParameters = function(url, options) {
} catch (err) {
key = unescape(key);
}
-
+
// being liberal by replacing "+" with " "
var value = (keyValue[1] || '').replace(/\+/g, " ");
@@ -3530,17 +3530,17 @@ OpenLayers.Util.getParameters = function(url, options) {
} catch (err) {
value = unescape(value);
}
-
+
// follow OGC convention of comma delimited values
if (options.splitArgs !== false) {
value = value.split(",");
}
- //if there's only one value, do not return as array
+ //if there's only one value, do not return as array
if (value.length == 1) {
value = value[0];
- }
-
+ }
+
parameters[key] = value;
}
}
@@ -3559,11 +3559,11 @@ OpenLayers.Util.lastSeqID = 0;
* Create a unique identifier for this session. Each time this function
* is called, a counter is incremented. The return will be the optional
* prefix (defaults to "id_") appended with the counter value.
- *
+ *
* Parameters:
* prefix - {String} Optional string to prefix unique id. Default is "id_".
* Note that dots (".") in the prefix will be replaced with underscore ("_").
- *
+ *
* Returns:
* {String} A unique id string, built on the passed in prefix.
*/
@@ -3573,8 +3573,8 @@ OpenLayers.Util.createUniqueID = function(prefix) {
} else {
prefix = prefix.replace(OpenLayers.Util.dotless, "_");
}
- OpenLayers.Util.lastSeqID += 1;
- return prefix + OpenLayers.Util.lastSeqID;
+ OpenLayers.Util.lastSeqID += 1;
+ return prefix + OpenLayers.Util.lastSeqID;
};
/**
@@ -3586,7 +3586,7 @@ OpenLayers.Util.createUniqueID = function(prefix) {
* The hardcoded table is maintain in a CS-MAP source code module named CSdataU.c
* The hardcoded table of PROJ.4 units are in pj_units.c.
*/
-OpenLayers.INCHES_PER_UNIT = {
+OpenLayers.INCHES_PER_UNIT = {
'inches': 1.0,
'ft': 12.0,
'mi': 63360.0,
@@ -3681,7 +3681,7 @@ OpenLayers.Util.extend(OpenLayers.INCHES_PER_UNIT, {
"ind-ch": 20.11669506 / OpenLayers.METERS_PER_INCH //Indian Chain
});
-/**
+/**
* Constant: DOTS_PER_INCH
* {Integer} 72 (A sensible default)
*/
@@ -3689,32 +3689,32 @@ OpenLayers.DOTS_PER_INCH = 72;
/**
* Function: normalizeScale
- *
+ *
* Parameters:
* scale - {float}
- *
+ *
* Returns:
- * {Float} A normalized scale value, in 1 / X format.
+ * {Float} A normalized scale value, in 1 / X format.
* This means that if a value less than one ( already 1/x) is passed
- * in, it just returns scale directly. Otherwise, it returns
+ * in, it just returns scale directly. Otherwise, it returns
* 1 / scale
*/
OpenLayers.Util.normalizeScale = function (scale) {
- var normScale = (scale > 1.0) ? (1.0 / scale)
+ var normScale = (scale > 1.0) ? (1.0 / scale)
: scale;
return normScale;
};
/**
* Function: getResolutionFromScale
- *
+ *
* Parameters:
* scale - {Float}
* units - {String} Index into OpenLayers.INCHES_PER_UNIT hashtable.
* Default is degrees
- *
+ *
* Returns:
- * {Float} The corresponding resolution given passed-in scale and unit
+ * {Float} The corresponding resolution given passed-in scale and unit
* parameters. If the given scale is falsey, the returned resolution will
* be undefined.
*/
@@ -3726,21 +3726,21 @@ OpenLayers.Util.getResolutionFromScale = function (scale, units) {
}
var normScale = OpenLayers.Util.normalizeScale(scale);
resolution = 1 / (normScale * OpenLayers.INCHES_PER_UNIT[units]
- * OpenLayers.DOTS_PER_INCH);
+ * OpenLayers.DOTS_PER_INCH);
}
return resolution;
};
/**
* Function: getScaleFromResolution
- *
+ *
* Parameters:
* resolution - {Float}
* units - {String} Index into OpenLayers.INCHES_PER_UNIT hashtable.
* Default is degrees
- *
+ *
* Returns:
- * {Float} The corresponding scale given passed-in resolution and unit
+ * {Float} The corresponding scale given passed-in resolution and unit
* parameters.
*/
OpenLayers.Util.getScaleFromResolution = function (resolution, units) {
@@ -3762,22 +3762,22 @@ OpenLayers.Util.getScaleFromResolution = function (resolution, units) {
* OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is
* Copyright (c) 2006, Yahoo! Inc.
* All rights reserved.
- *
+ *
* Redistribution and use of this software in source and binary forms, with or
* without modification, are permitted provided that the following conditions
* are met:
- *
+ *
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- *
+ *
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- *
+ *
* * Neither the name of Yahoo! Inc. nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission of Yahoo! Inc.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -3787,12 +3787,12 @@ OpenLayers.Util.getScaleFromResolution = function (resolution, units) {
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Parameters:
* forElement - {DOMElement}
- *
+ *
* Returns:
* {Array} two item array, Left value then Top value.
*/
@@ -3825,7 +3825,7 @@ OpenLayers.Util.pagePosition = function(forElement) {
box = forElement.getBoundingClientRect();
var scrollTop = window.pageYOffset || viewportElement.scrollTop;
var scrollLeft = window.pageXOffset || viewportElement.scrollLeft;
-
+
pos[0] = box.left + scrollLeft;
pos[1] = box.top + scrollTop;
@@ -3870,7 +3870,7 @@ OpenLayers.Util.pagePosition = function(forElement) {
parent = parent.offsetParent;
}
}
-
+
return pos;
};
@@ -3896,20 +3896,20 @@ OpenLayers.Util.getViewportElement = function() {
return viewportElement;
};
-/**
+/**
* Function: isEquivalentUrl
- * Test two URLs for equivalence.
- *
+ * Test two URLs for equivalence.
+ *
* Setting 'ignoreCase' allows for case-independent comparison.
- *
- * Comparison is based on:
+ *
+ * Comparison is based on:
* - Protocol
* - Host (evaluated without the port)
* - Port (set 'ignorePort80' to ignore "80" values)
* - Hash ( set 'ignoreHash' to disable)
- * - Pathname (for relative <-> absolute comparison)
+ * - Pathname (for relative <-> absolute comparison)
* - Arguments (so they can be out of order)
- *
+ *
* Parameters:
* url1 - {String}
* url2 - {String}
@@ -3954,13 +3954,13 @@ OpenLayers.Util.isEquivalentUrl = function(url1, url2, options) {
for(var key in urlObj2.args) {
return false;
}
-
+
return true;
};
/**
* Function: createUrlObject
- *
+ *
* Parameters:
* url - {String}
* options - {Object} A hash of options.
@@ -3971,9 +3971,9 @@ OpenLayers.Util.isEquivalentUrl = function(url1, url2, options) {
* ignoreHash - {Boolean} Don't include part of url after the hash (#).
* splitArgs - {Boolean} Split comma delimited params into arrays? Default is
* true.
- *
+ *
* Returns:
- * {Object} An object with separate url, a, port, host, and args parsed out
+ * {Object} An object with separate url, a, port, host, and args parsed out
* and ready for comparison
*/
OpenLayers.Util.createUrlObject = function(url, options) {
@@ -3994,21 +3994,21 @@ OpenLayers.Util.createUrlObject = function(url, options) {
url = fullUrl + parts.join("/") + "/" + url;
}
}
-
+
if (options.ignoreCase) {
- url = url.toLowerCase();
+ url = url.toLowerCase();
}
var a = document.createElement('a');
a.href = url;
-
+
var urlObject = {};
-
+
//host (without port)
urlObject.host = a.host.split(":").shift();
//protocol
- urlObject.protocol = a.protocol;
+ urlObject.protocol = a.protocol;
//port (get uniform browser behavior with port 80 here)
if(options.ignorePort80) {
@@ -4018,8 +4018,8 @@ OpenLayers.Util.createUrlObject = function(url, options) {
}
//hash
- urlObject.hash = (options.ignoreHash || a.hash === "#") ? "" : a.hash;
-
+ urlObject.hash = (options.ignoreHash || a.hash === "#") ? "" : a.hash;
+
//args
var queryString = a.search;
if (!queryString) {
@@ -4035,30 +4035,30 @@ OpenLayers.Util.createUrlObject = function(url, options) {
// window.location.pathname has a leading "/", but
// a.pathname has no leading "/".
urlObject.pathname = (a.pathname.charAt(0) == "/") ? a.pathname : "/" + a.pathname;
-
- return urlObject;
+
+ return urlObject;
};
-
+
/**
* Function: removeTail
* Takes a url and removes everything after the ? and #
- *
+ *
* Parameters:
* url - {String} The url to process
- *
+ *
* Returns:
* {String} The string with all queryString and Hash removed
*/
OpenLayers.Util.removeTail = function(url) {
var head = null;
-
+
var qMark = url.indexOf("?");
var hashMark = url.indexOf("#");
if (qMark == -1) {
head = (hashMark != -1) ? url.substr(0,hashMark) : url;
} else {
- head = (hashMark != -1) ? url.substr(0,Math.min(qMark, hashMark))
+ head = (hashMark != -1) ? url.substr(0,Math.min(qMark, hashMark))
: url.substr(0, qMark);
}
return head;
@@ -4114,19 +4114,19 @@ OpenLayers.BROWSER_NAME = (function() {
/**
* Function: getBrowserName
- *
+ *
* Returns:
- * {String} A string which specifies which is the current
- * browser in which we are running.
- *
+ * {String} A string which specifies which is the current
+ * browser in which we are running.
+ *
* Currently-supported browser detection and codes:
* * 'opera' -- Opera
* * 'msie' -- Internet Explorer
* * 'safari' -- Safari
* * 'firefox' -- Firefox
* * 'mozilla' -- Mozilla
- *
- * If we are unable to property identify the browser, we
+ *
+ * If we are unable to property identify the browser, we
* return an empty string.
*/
OpenLayers.Util.getBrowserName = function() {
@@ -4137,37 +4137,37 @@ OpenLayers.Util.getBrowserName = function() {
* Method: getRenderedDimensions
* Renders the contentHTML offscreen to determine actual dimensions for
* popup sizing. As we need layout to determine dimensions the content
- * is rendered -9999px to the left and absolute to ensure the
+ * is rendered -9999px to the left and absolute to ensure the
* scrollbars do not flicker
- *
+ *
* Parameters:
* contentHTML
- * size - {} If either the 'w' or 'h' properties is
- * specified, we fix that dimension of the div to be measured. This is
- * useful in the case where we have a limit in one dimension and must
+ * size - {} If either the 'w' or 'h' properties is
+ * specified, we fix that dimension of the div to be measured. This is
+ * useful in the case where we have a limit in one dimension and must
* therefore meaure the flow in the other dimension.
* options - {Object}
*
* Allowed Options:
* displayClass - {String} Optional parameter. A CSS class name(s) string
* to provide the CSS context of the rendered content.
- * containerElement - {DOMElement} Optional parameter. Insert the HTML to
- * this node instead of the body root when calculating dimensions.
- *
+ * containerElement - {DOMElement} Optional parameter. Insert the HTML to
+ * this node instead of the body root when calculating dimensions.
+ *
* Returns:
* {}
*/
OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) {
-
+
var w, h;
-
+
// create temp container div with restricted size
var container = document.createElement("div");
container.style.visibility = "hidden";
-
- var containerElement = (options && options.containerElement)
+
+ var containerElement = (options && options.containerElement)
? options.containerElement : document.body;
-
+
// Opera and IE7 can't handle a node with position:aboslute if it inherits
// position:absolute from a parent.
var parentHasPositionAbsolute = false;
@@ -4183,7 +4183,7 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) {
}
parent = parent.parentNode;
}
- if(parentHasPositionAbsolute && (containerElement.clientHeight === 0 ||
+ if(parentHasPositionAbsolute && (containerElement.clientHeight === 0 ||
containerElement.clientWidth === 0) ){
superContainer = document.createElement("div");
superContainer.style.visibility = "hidden";
@@ -4210,11 +4210,11 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) {
if (options && options.displayClass) {
container.className = options.displayClass;
}
-
+
// create temp content div and assign content
var content = document.createElement("div");
content.innerHTML = contentHTML;
-
+
// we need overflow visible when calculating the size
content.style.overflow = "visible";
if (content.childNodes) {
@@ -4223,24 +4223,24 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) {
content.childNodes[i].style.overflow = "visible";
}
}
-
- // add content to restricted container
+
+ // add content to restricted container
container.appendChild(content);
-
+
// append container to body for rendering
if (superContainer) {
containerElement.appendChild(superContainer);
} else {
containerElement.appendChild(container);
}
-
+
// calculate scroll width of content and add corners and shadow width
if (!w) {
w = parseInt(content.scrollWidth);
-
+
// update container width to allow height to adjust
container.style.width = w + "px";
- }
+ }
// capture height and add shadow and corner image widths
if (!h) {
h = parseInt(content.scrollHeight);
@@ -4254,35 +4254,35 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) {
} else {
containerElement.removeChild(container);
}
-
+
return new OpenLayers.Size(w, h);
};
/**
* APIFunction: getScrollbarWidth
* This function has been modified by the OpenLayers from the original version,
- * written by Matthew Eernisse and released under the Apache 2
+ * written by Matthew Eernisse and released under the Apache 2
* license here:
- *
+ *
* http://www.fleegix.org/articles/2006/05/30/getting-the-scrollbar-width-in-pixels
- *
- * It has been modified simply to cache its value, since it is physically
- * impossible that this code could ever run in more than one browser at
- * once.
- *
+ *
+ * It has been modified simply to cache its value, since it is physically
+ * impossible that this code could ever run in more than one browser at
+ * once.
+ *
* Returns:
* {Integer}
*/
OpenLayers.Util.getScrollbarWidth = function() {
-
+
var scrollbarWidth = OpenLayers.Util._scrollbarWidth;
-
+
if (scrollbarWidth == null) {
var scr = null;
var inn = null;
var wNoScroll = 0;
var wScroll = 0;
-
+
// Outer scrolling div
scr = document.createElement('div');
scr.style.position = 'absolute';
@@ -4292,28 +4292,28 @@ OpenLayers.Util.getScrollbarWidth = function() {
scr.style.height = '50px';
// Start with no scrollbar
scr.style.overflow = 'hidden';
-
+
// Inner content div
inn = document.createElement('div');
inn.style.width = '100%';
inn.style.height = '200px';
-
+
// Put the inner div in the scrolling div
scr.appendChild(inn);
// Append the scrolling div to the doc
document.body.appendChild(scr);
-
+
// Width of the inner div sans scrollbar
wNoScroll = inn.offsetWidth;
-
+
// Add the scrollbar
scr.style.overflow = 'scroll';
// Width of the inner div width scrollbar
wScroll = inn.offsetWidth;
-
+
// Remove the scrolling div from the doc
document.body.removeChild(document.body.lastChild);
-
+
// Pixel width of the scroller
OpenLayers.Util._scrollbarWidth = (wNoScroll - wScroll);
scrollbarWidth = OpenLayers.Util._scrollbarWidth;
@@ -4324,7 +4324,7 @@ OpenLayers.Util.getScrollbarWidth = function() {
/**
* APIFunction: getFormattedLonLat
- * This function will return latitude or longitude value formatted as
+ * This function will return latitude or longitude value formatted as
*
* Parameters:
* coordinate - {Float} the coordinate value to be formatted
@@ -4334,7 +4334,7 @@ OpenLayers.Util.getScrollbarWidth = function() {
* 'dms' show degrees minutes and seconds
* 'dm' show only degrees and minutes
* 'd' show only degrees
- *
+ *
* Returns:
* {String} the coordinate value formatted as a string
*/
@@ -4355,15 +4355,15 @@ OpenLayers.Util.getFormattedLonLat = function(coordinate, axis, dmsOption) {
coordinateseconds = Math.round(coordinateseconds*10);
coordinateseconds /= 10;
- if( coordinateseconds >= 60) {
- coordinateseconds -= 60;
- coordinateminutes += 1;
- if( coordinateminutes >= 60) {
- coordinateminutes -= 60;
- coordinatedegrees += 1;
- }
+ if( coordinateseconds >= 60) {
+ coordinateseconds -= 60;
+ coordinateminutes += 1;
+ if( coordinateminutes >= 60) {
+ coordinateminutes -= 60;
+ coordinatedegrees += 1;
+ }
}
-
+
if( coordinatedegrees < 10 ) {
coordinatedegrees = "0" + coordinatedegrees;
}
@@ -4374,7 +4374,7 @@ OpenLayers.Util.getFormattedLonLat = function(coordinate, axis, dmsOption) {
coordinateminutes = "0" + coordinateminutes;
}
str += coordinateminutes + "'";
-
+
if (dmsOption.indexOf('dms') >= 0) {
if( coordinateseconds < 10 ) {
coordinateseconds = "0" + coordinateseconds;
@@ -4382,7 +4382,7 @@ OpenLayers.Util.getFormattedLonLat = function(coordinate, axis, dmsOption) {
str += coordinateseconds + '"';
}
}
-
+
if (axis == "lon") {
str += coordinate < 0 ? OpenLayers.i18n("W") : OpenLayers.i18n("E");
} else {
@@ -4411,13 +4411,13 @@ OpenLayers.Util.getFormattedLonLat = function(coordinate, axis, dmsOption) {
* of OpenLayers.Format are expected to have read and write methods.
*/
OpenLayers.Format = OpenLayers.Class({
-
+
/**
* Property: options
* {Object} A reference to options passed to the constructor.
*/
options: null,
-
+
/**
* APIProperty: externalProjection
* {} When passed a externalProjection and
@@ -4425,7 +4425,7 @@ OpenLayers.Format = OpenLayers.Class({
* reads or writes. The externalProjection is the projection used by
* the content which is passed into read or which comes out of write.
* In order to reproject, a projection transformation function for the
- * specified projections must be available. This support may be
+ * specified projections must be available. This support may be
* provided via proj4js or via a custom transformation function. See
* {} for more information on
* custom transformations.
@@ -4479,7 +4479,7 @@ OpenLayers.Format = OpenLayers.Class({
OpenLayers.Util.extend(this, options);
this.options = options;
},
-
+
/**
* APIMethod: destroy
* Clean up.
@@ -4490,8 +4490,8 @@ OpenLayers.Format = OpenLayers.Class({
/**
* Method: read
* Read data from a string, and return an object whose type depends on the
- * subclass.
- *
+ * subclass.
+ *
* Parameters:
* data - {string} Data to read/parse.
*
@@ -4501,10 +4501,10 @@ OpenLayers.Format = OpenLayers.Class({
read: function(data) {
throw new Error('Read not implemented.');
},
-
+
/**
* Method: write
- * Accept an object, and return a string.
+ * Accept an object, and return a string.
*
* Parameters:
* object - {Object} Object to be serialized
@@ -4517,7 +4517,7 @@ OpenLayers.Format = OpenLayers.Class({
},
CLASS_NAME: "OpenLayers.Format"
-});
+});
/* ======================================================================
OpenLayers/Format/CSWGetRecords.js
====================================================================== */
@@ -4572,15 +4572,15 @@ OpenLayers.Format.CSWGetRecords.DEFAULTS = {
/**
* Class: OpenLayers.Control
* Controls affect the display or behavior of the map. They allow everything
- * from panning and zooming to displaying a scale indicator. Controls by
+ * from panning and zooming to displaying a scale indicator. Controls by
* default are added to the map they are contained within however it is
* possible to add a control to an external div by passing the div in the
* options parameter.
- *
+ *
* Example:
* The following example shows how to add many of the common controls
* to a map.
- *
+ *
* > var map = new OpenLayers.Map('map', { controls: [] });
* >
* > map.addControl(new OpenLayers.Control.PanZoomBar());
@@ -4591,10 +4591,10 @@ OpenLayers.Format.CSWGetRecords.DEFAULTS = {
* > map.addControl(new OpenLayers.Control.OverviewMap());
* > map.addControl(new OpenLayers.Control.KeyboardDefaults());
*
- * The next code fragment is a quick example of how to intercept
+ * The next code fragment is a quick example of how to intercept
* shift-mouse click to display the extent of the bounding box
* dragged out by the user. Usually controls are not created
- * in exactly this manner. See the source for a more complete
+ * in exactly this manner. See the source for a more complete
* example:
*
* > var control = new OpenLayers.Control();
@@ -4602,7 +4602,7 @@ OpenLayers.Format.CSWGetRecords.DEFAULTS = {
* > draw: function () {
* > // this Handler.Box will intercept the shift-mousedown
* > // before Control.MouseDefault gets to see it
- * > this.box = new OpenLayers.Handler.Box( control,
+ * > this.box = new OpenLayers.Handler.Box( control,
* > {"done": this.notice},
* > {keyMask: OpenLayers.Handler.MOD_SHIFT});
* > this.box.activate();
@@ -4611,61 +4611,61 @@ OpenLayers.Format.CSWGetRecords.DEFAULTS = {
* > notice: function (bounds) {
* > OpenLayers.Console.userError(bounds);
* > }
- * > });
+ * > });
* > map.addControl(control);
- *
+ *
*/
OpenLayers.Control = OpenLayers.Class({
- /**
- * Property: id
- * {String}
+ /**
+ * Property: id
+ * {String}
*/
id: null,
-
- /**
- * Property: map
+
+ /**
+ * Property: map
* {} this gets set in the addControl() function in
- * OpenLayers.Map
+ * OpenLayers.Map
*/
map: null,
- /**
- * APIProperty: div
- * {DOMElement} The element that contains the control, if not present the
+ /**
+ * APIProperty: div
+ * {DOMElement} The element that contains the control, if not present the
* control is placed inside the map.
*/
div: null,
- /**
- * APIProperty: type
+ /**
+ * APIProperty: type
* {Number} Controls can have a 'type'. The type determines the type of
* interactions which are possible with them when they are placed in an
- * .
+ * .
*/
- type: null,
+ type: null,
- /**
+ /**
* Property: allowSelection
* {Boolean} By default, controls do not allow selection, because
* it may interfere with map dragging. If this is true, OpenLayers
* will not prevent selection of the control.
* Default is false.
*/
- allowSelection: false,
+ allowSelection: false,
- /**
- * Property: displayClass
+ /**
+ * Property: displayClass
* {string} This property is used for CSS related to the drawing of the
- * Control.
+ * Control.
*/
displayClass: "",
-
+
/**
- * APIProperty: title
- * {string} This property is used for showing a tooltip over the
- * Control.
- */
+ * APIProperty: title
+ * {string} This property is used for showing a tooltip over the
+ * Control.
+ */
title: "",
/**
@@ -4675,9 +4675,9 @@ OpenLayers.Control = OpenLayers.Class({
*/
autoActivate: false,
- /**
- * APIProperty: active
- * {Boolean} The control is active (read-only). Use and
+ /**
+ * APIProperty: active
+ * {Boolean} The control is active (read-only). Use and
* to change control state.
*/
active: null,
@@ -4688,8 +4688,8 @@ OpenLayers.Control = OpenLayers.Class({
*/
handlerOptions: null,
- /**
- * Property: handler
+ /**
+ * Property: handler
* {} null
*/
handler: null,
@@ -4703,7 +4703,7 @@ OpenLayers.Control = OpenLayers.Class({
*/
eventListeners: null,
- /**
+ /**
* APIProperty: events
* {} Events instance for listeners and triggering
* control specific events.
@@ -4732,22 +4732,22 @@ OpenLayers.Control = OpenLayers.Class({
* Constructor: OpenLayers.Control
* Create an OpenLayers Control. The options passed as a parameter
* directly extend the control. For example passing the following:
- *
+ *
* > var control = new OpenLayers.Control({div: myDiv});
*
* Overrides the default div attribute value of null.
- *
+ *
* Parameters:
- * options - {Object}
+ * options - {Object}
*/
initialize: function (options) {
// We do this before the extend so that instances can override
// className in options.
- this.displayClass =
+ this.displayClass =
this.CLASS_NAME.replace("OpenLayers.", "ol").replace(/\./g, "");
-
+
OpenLayers.Util.extend(this, options);
-
+
this.events = new OpenLayers.Events(this);
if(this.eventListeners instanceof Object) {
this.events.on(this.eventListeners);
@@ -4794,14 +4794,14 @@ OpenLayers.Control = OpenLayers.Class({
this.div = null;
},
- /**
+ /**
* Method: setMap
* Set the map property for the control. This is done through an accessor
- * so that subclasses can override this and take special action once
- * they have their map variable set.
+ * so that subclasses can override this and take special action once
+ * they have their map variable set.
*
* Parameters:
- * map - {}
+ * map - {}
*/
setMap: function(map) {
this.map = map;
@@ -4809,13 +4809,13 @@ OpenLayers.Control = OpenLayers.Class({
this.handler.setMap(map);
}
},
-
+
/**
* Method: draw
* The draw method is called when the control is ready to be displayed
* on the page. If a div has not been created one is created. Controls
- * with a visual component will almost always want to override this method
- * to customize the look of control.
+ * with a visual component will almost always want to override this method
+ * to customize the look of control.
*
* Parameters:
* px - {} The top-left pixel position of the control
@@ -4831,8 +4831,8 @@ OpenLayers.Control = OpenLayers.Class({
if (!this.allowSelection) {
this.div.className += " olControlNoSelect";
this.div.setAttribute("unselectable", "on", 0);
- this.div.onselectstart = OpenLayers.Function.False;
- }
+ this.div.onselectstart = OpenLayers.Function.False;
+ }
if (this.title != "") {
this.div.title = this.title;
}
@@ -4846,7 +4846,7 @@ OpenLayers.Control = OpenLayers.Class({
/**
* Method: moveTo
- * Sets the left and top style attributes to the passed in pixel
+ * Sets the left and top style attributes to the passed in pixel
* coordinates.
*
* Parameters:
@@ -4864,7 +4864,7 @@ OpenLayers.Control = OpenLayers.Class({
* Explicitly activates a control and it's associated
* handler if one has been set. Controls can be
* deactivated by calling the deactivate() method.
- *
+ *
* Returns:
* {Boolean} True if the control was successfully activated or
* false if the control was already active.
@@ -4886,12 +4886,12 @@ OpenLayers.Control = OpenLayers.Class({
this.events.triggerEvent("activate");
return true;
},
-
+
/**
* APIMethod: deactivate
* Deactivates a control and it's associated handler if any. The exact
* effect of this depends on the control itself.
- *
+ *
* Returns:
* {Boolean} True if the control was effectively deactivated or false
* if the control was already inactive.
@@ -4951,10 +4951,10 @@ OpenLayers.Control.TYPE_TOOL = 3;
*/
OpenLayers.Event = {
- /**
- * Property: observers
+ /**
+ * Property: observers
* {Object} A hashtable cache of the event observers. Keyed by
- * element._eventCacheID
+ * element._eventCacheID
*/
observers: false,
@@ -4963,58 +4963,58 @@ OpenLayers.Event = {
* {int}
*/
KEY_SPACE: 32,
-
- /**
- * Constant: KEY_BACKSPACE
- * {int}
+
+ /**
+ * Constant: KEY_BACKSPACE
+ * {int}
*/
KEY_BACKSPACE: 8,
- /**
- * Constant: KEY_TAB
- * {int}
+ /**
+ * Constant: KEY_TAB
+ * {int}
*/
KEY_TAB: 9,
- /**
- * Constant: KEY_RETURN
- * {int}
+ /**
+ * Constant: KEY_RETURN
+ * {int}
*/
KEY_RETURN: 13,
- /**
- * Constant: KEY_ESC
- * {int}
+ /**
+ * Constant: KEY_ESC
+ * {int}
*/
KEY_ESC: 27,
- /**
- * Constant: KEY_LEFT
- * {int}
+ /**
+ * Constant: KEY_LEFT
+ * {int}
*/
KEY_LEFT: 37,
- /**
- * Constant: KEY_UP
- * {int}
+ /**
+ * Constant: KEY_UP
+ * {int}
*/
KEY_UP: 38,
- /**
- * Constant: KEY_RIGHT
- * {int}
+ /**
+ * Constant: KEY_RIGHT
+ * {int}
*/
KEY_RIGHT: 39,
- /**
- * Constant: KEY_DOWN
- * {int}
+ /**
+ * Constant: KEY_DOWN
+ * {int}
*/
KEY_DOWN: 40,
- /**
- * Constant: KEY_DELETE
- * {int}
+ /**
+ * Constant: KEY_DELETE
+ * {int}
*/
KEY_DELETE: 46,
@@ -5022,12 +5022,12 @@ OpenLayers.Event = {
/**
* Method: element
* Cross browser event element detection.
- *
+ *
* Parameters:
- * event - {Event}
- *
+ * event - {Event}
+ *
* Returns:
- * {DOMElement} The element that caused the event
+ * {DOMElement} The element that caused the event
*/
element: function(event) {
return event.target || event.srcElement;
@@ -5063,11 +5063,11 @@ OpenLayers.Event = {
/**
* Method: isLeftClick
- * Determine whether event was caused by a left click.
+ * Determine whether event was caused by a left click.
*
* Parameters:
- * event - {Event}
- *
+ * event - {Event}
+ *
* Returns:
* {Boolean}
*/
@@ -5078,11 +5078,11 @@ OpenLayers.Event = {
/**
* Method: isRightClick
- * Determine whether event was caused by a right mouse click.
+ * Determine whether event was caused by a right mouse click.
*
* Parameters:
- * event - {Event}
- *
+ * event - {Event}
+ *
* Returns:
* {Boolean}
*/
@@ -5090,23 +5090,23 @@ OpenLayers.Event = {
return (((event.which) && (event.which == 3)) ||
((event.button) && (event.button == 2)));
},
-
+
/**
* Method: stop
- * Stops an event from propagating.
+ * Stops an event from propagating.
*
- * Parameters:
- * event - {Event}
- * allowDefault - {Boolean} If true, we stop the event chain but
+ * Parameters:
+ * event - {Event}
+ * allowDefault - {Boolean} If true, we stop the event chain but
* still allow the default browser behaviour (text selection,
* radio-button clicking, etc). Default is false.
*/
stop: function(event, allowDefault) {
-
- if (!allowDefault) {
+
+ if (!allowDefault) {
OpenLayers.Event.preventDefault(event);
}
-
+
if (event.stopPropagation) {
event.stopPropagation();
} else {
@@ -5130,13 +5130,13 @@ OpenLayers.Event = {
}
},
- /**
+ /**
* Method: findElement
- *
+ *
* Parameters:
- * event - {Event}
- * tagName - {String}
- *
+ * event - {Event}
+ * tagName - {String}
+ *
* Returns:
* {DOMElement} The first node with the given tagName, starting from the
* node the event was triggered on and traversing the DOM upwards
@@ -5150,14 +5150,14 @@ OpenLayers.Event = {
return element;
},
- /**
+ /**
* Method: observe
- *
+ *
* Parameters:
- * elementParam - {DOMElement || String}
- * name - {String}
- * observer - {function}
- * useCapture - {Boolean}
+ * elementParam - {DOMElement || String}
+ * name - {String}
+ * observer - {function}
+ * useCapture - {Boolean}
*/
observe: function(elementParam, name, observer, useCapture) {
var element = OpenLayers.Util.getElement(elementParam);
@@ -5206,14 +5206,14 @@ OpenLayers.Event = {
}
},
- /**
+ /**
* Method: stopObservingElement
- * Given the id of an element to stop observing, cycle through the
- * element's cached observers, calling stopObserving on each one,
+ * Given the id of an element to stop observing, cycle through the
+ * element's cached observers, calling stopObserving on each one,
* skipping those entries which can no longer be removed.
- *
+ *
* parameters:
- * elementParam - {DOMElement || String}
+ * elementParam - {DOMElement || String}
*/
stopObservingElement: function(elementParam) {
var element = OpenLayers.Util.getElement(elementParam);
@@ -5226,8 +5226,8 @@ OpenLayers.Event = {
* Method: _removeElementObservers
*
* Parameters:
- * elementObservers - {Array(Object)} Array of (element, name,
- * observer, usecapture) objects,
+ * elementObservers - {Array(Object)} Array of (element, name,
+ * observer, usecapture) objects,
* taken directly from hashtable
*/
_removeElementObservers: function(elementObservers) {
@@ -5243,24 +5243,24 @@ OpenLayers.Event = {
/**
* Method: stopObserving
- *
+ *
* Parameters:
- * elementParam - {DOMElement || String}
- * name - {String}
- * observer - {function}
- * useCapture - {Boolean}
- *
+ * elementParam - {DOMElement || String}
+ * name - {String}
+ * observer - {function}
+ * useCapture - {Boolean}
+ *
* Returns:
* {Boolean} Whether or not the event observer was removed
*/
stopObserving: function(elementParam, name, observer, useCapture) {
useCapture = useCapture || false;
-
+
var element = OpenLayers.Util.getElement(elementParam);
var cacheID = element._eventCacheID;
if (name == 'keypress') {
- if ( navigator.appVersion.match(/Konqueror|Safari|KHTML/) ||
+ if ( navigator.appVersion.match(/Konqueror|Safari|KHTML/) ||
element.detachEvent) {
name = 'keydown';
}
@@ -5270,27 +5270,27 @@ OpenLayers.Event = {
var foundEntry = false;
var elementObservers = OpenLayers.Event.observers[cacheID];
if (elementObservers) {
-
+
// find the specific event type in the element's list
var i=0;
while(!foundEntry && i < elementObservers.length) {
var cacheEntry = elementObservers[i];
-
+
if ((cacheEntry.name == name) &&
(cacheEntry.observer == observer) &&
(cacheEntry.useCapture == useCapture)) {
-
+
elementObservers.splice(i, 1);
if (elementObservers.length == 0) {
delete OpenLayers.Event.observers[cacheID];
}
foundEntry = true;
- break;
+ break;
}
- i++;
+ i++;
}
}
-
+
//actually remove the event listener from browser
if (foundEntry) {
if (element.removeEventListener) {
@@ -5301,11 +5301,11 @@ OpenLayers.Event = {
}
return foundEntry;
},
-
- /**
+
+ /**
* Method: unloadCache
* Cycle through all the element entries in the events cache and call
- * stopObservingElement on each.
+ * stopObservingElement on each.
*/
unloadCache: function() {
// check for OpenLayers.Event before checking for observers, because
@@ -5314,7 +5314,7 @@ OpenLayers.Event = {
if (OpenLayers.Event && OpenLayers.Event.observers) {
for (var cacheID in OpenLayers.Event.observers) {
var elementObservers = OpenLayers.Event.observers[cacheID];
- OpenLayers.Event._removeElementObservers.apply(this,
+ OpenLayers.Event._removeElementObservers.apply(this,
[elementObservers]);
}
OpenLayers.Event.observers = false;
@@ -5332,61 +5332,61 @@ OpenLayers.Event.observe(window, 'unload', OpenLayers.Event.unloadCache, false);
*/
OpenLayers.Events = OpenLayers.Class({
- /**
+ /**
* Constant: BROWSER_EVENTS
- * {Array(String)} supported events
+ * {Array(String)} supported events
*/
BROWSER_EVENTS: [
"mouseover", "mouseout",
- "mousedown", "mouseup", "mousemove",
+ "mousedown", "mouseup", "mousemove",
"click", "dblclick", "rightclick", "dblrightclick",
"resize", "focus", "blur",
"touchstart", "touchmove", "touchend",
"keydown"
],
- /**
- * Property: listeners
- * {Object} Hashtable of Array(Function): events listener functions
+ /**
+ * Property: listeners
+ * {Object} Hashtable of Array(Function): events listener functions
*/
listeners: null,
- /**
- * Property: object
- * {Object} the code object issuing application events
+ /**
+ * Property: object
+ * {Object} the code object issuing application events
*/
object: null,
- /**
- * Property: element
- * {DOMElement} the DOM element receiving browser events
+ /**
+ * Property: element
+ * {DOMElement} the DOM element receiving browser events
*/
element: null,
- /**
- * Property: eventHandler
- * {Function} bound event handler attached to elements
+ /**
+ * Property: eventHandler
+ * {Function} bound event handler attached to elements
*/
eventHandler: null,
- /**
- * APIProperty: fallThrough
- * {Boolean}
+ /**
+ * APIProperty: fallThrough
+ * {Boolean}
*/
fallThrough: null,
- /**
+ /**
* APIProperty: includeXY
* {Boolean} Should the .xy property automatically be created for browser
* mouse events? In general, this should be false. If it is true, then
- * mouse events will automatically generate a '.xy' property on the
+ * mouse events will automatically generate a '.xy' property on the
* event object that is passed. (Prior to OpenLayers 2.7, this was true
* by default.) Otherwise, you can call the getMousePosition on the
* relevant events handler on the object available via the 'evt.object'
* property of the evt object. So, for most events, you can call:
- * function named(evt) {
- * this.xy = this.object.events.getMousePosition(evt)
- * }
+ * function named(evt) {
+ * this.xy = this.object.events.getMousePosition(evt)
+ * }
*
* This option typically defaults to false for performance reasons:
* when creating an events object whose primary purpose is to manage
@@ -5396,13 +5396,13 @@ OpenLayers.Events = OpenLayers.Class({
* This option is also used to control whether the events object caches
* offsets. If this is false, it will not: the reason for this is that
* it is only expected to be called many times if the includeXY property
- * is set to true. If you set this to true, you are expected to clear
+ * is set to true. If you set this to true, you are expected to clear
* the offset cache manually (using this.clearMouseCache()) if:
* the border of the element changes
* the location of the element in the page changes
*/
- includeXY: false,
-
+ includeXY: false,
+
/**
* APIProperty: extensions
* {Object} Event extensions registered with this instance. Keys are
@@ -5463,10 +5463,10 @@ OpenLayers.Events = OpenLayers.Class({
* // only required if extension provides more than one event type
* OpenLayers.Events.fooend = OpenLayers.Events.foostart;
* (end)
- *
+ *
*/
extensions: null,
-
+
/**
* Property: extensionCount
* {Object} Keys are event types (like in ), values are the
@@ -5504,8 +5504,8 @@ OpenLayers.Events = OpenLayers.Class({
this.extensions = {};
this.extensionCount = {};
this._msTouches = [];
-
- // if a dom element is specified, add a listeners list
+
+ // if a dom element is specified, add a listeners list
// for browser events on the element and register them
if (element != null) {
this.attachToElement(element);
@@ -5541,7 +5541,7 @@ OpenLayers.Events = OpenLayers.Class({
/**
* APIMethod: addEventType
* Deprecated. Any event can be triggered without adding it first.
- *
+ *
* Parameters:
* eventName - {String}
*/
@@ -5563,7 +5563,7 @@ OpenLayers.Events = OpenLayers.Class({
this.eventHandler = OpenLayers.Function.bindAsEventListener(
this.handleBrowserEvent, this
);
-
+
// to be used with observe and stopObserving
this.clearMouseListener = OpenLayers.Function.bind(
this.clearMouseCache, this
@@ -5584,7 +5584,7 @@ OpenLayers.Events = OpenLayers.Class({
// disable dragstart in IE so that mousedown/move/up works normally
OpenLayers.Event.observe(element, "dragstart", OpenLayers.Event.stop);
},
-
+
/**
* APIMethod: on
* Convenience method for registering listeners with a common scope.
@@ -5612,7 +5612,7 @@ OpenLayers.Events = OpenLayers.Class({
* (end)
*
* Parameters:
- * object - {Object}
+ * object - {Object}
*/
on: function(object) {
for(var type in object) {
@@ -5627,23 +5627,23 @@ OpenLayers.Events = OpenLayers.Class({
* Register an event on the events object.
*
* When the event is triggered, the 'func' function will be called, in the
- * context of 'obj'. Imagine we were to register an event, specifying an
- * OpenLayers.Bounds Object as 'obj'. When the event is triggered, the
+ * context of 'obj'. Imagine we were to register an event, specifying an
+ * OpenLayers.Bounds Object as 'obj'. When the event is triggered, the
* context in the callback function will be our Bounds object. This means
- * that within our callback function, we can access the properties and
- * methods of the Bounds object through the "this" variable. So our
- * callback could execute something like:
+ * that within our callback function, we can access the properties and
+ * methods of the Bounds object through the "this" variable. So our
+ * callback could execute something like:
* : leftStr = "Left: " + this.left;
- *
+ *
* or
- *
+ *
* : centerStr = "Center: " + this.getCenterLonLat();
*
* Parameters:
* type - {String} Name of the event to register
* obj - {Object} The object to bind the context to for the callback#.
* If no object is specified, default is the Events's 'object' property.
- * func - {Function} The callback function. If no callback is
+ * func - {Function} The callback function. If no callback is
* specified, this function does nothing.
* priority - {Boolean|Object} If true, adds the new listener to the
* *front* of the events queue instead of to the end.
@@ -5683,23 +5683,23 @@ OpenLayers.Events = OpenLayers.Class({
* APIMethod: registerPriority
* Same as register() but adds the new listener to the *front* of the
* events queue instead of to the end.
- *
- * TODO: get rid of this in 3.0 - Decide whether listeners should be
+ *
+ * TODO: get rid of this in 3.0 - Decide whether listeners should be
* called in the order they were registered or in reverse order.
*
*
* Parameters:
* type - {String} Name of the event to register
* obj - {Object} The object to bind the context to for the callback#.
- * If no object is specified, default is the Events's
+ * If no object is specified, default is the Events's
* 'object' property.
- * func - {Function} The callback function. If no callback is
+ * func - {Function} The callback function. If no callback is
* specified, this function does nothing.
*/
registerPriority: function (type, obj, func) {
this.register(type, obj, func, true);
},
-
+
/**
* APIMethod: un
* Convenience method for unregistering listeners with a common scope.
@@ -5738,9 +5738,9 @@ OpenLayers.Events = OpenLayers.Class({
* APIMethod: unregister
*
* Parameters:
- * type - {String}
+ * type - {String}
* obj - {Object} If none specified, defaults to this.object
- * func - {Function}
+ * func - {Function}
*/
unregister: function (type, obj, func) {
if (obj == null) {
@@ -5757,13 +5757,13 @@ OpenLayers.Events = OpenLayers.Class({
}
},
- /**
+ /**
* Method: remove
* Remove all listeners for a given event type. If type is not registered,
* does nothing.
*
* Parameters:
- * type - {String}
+ * type - {String}
*/
remove: function(type) {
if (this.listeners[type] != null) {
@@ -5773,10 +5773,10 @@ OpenLayers.Events = OpenLayers.Class({
/**
* APIMethod: triggerEvent
- * Trigger a specified registered event.
- *
+ * Trigger a specified registered event.
+ *
* Parameters:
- * type - {String}
+ * type - {String}
* evt - {Event || Object} will be passed to the listeners.
*
* Returns:
@@ -5800,7 +5800,7 @@ OpenLayers.Events = OpenLayers.Class({
if(!evt.type) {
evt.type = type;
}
-
+
// execute all callbacks registered for specified type
// get a clone of the listeners array to
// allow for splicing during callbacks
@@ -5817,7 +5817,7 @@ OpenLayers.Events = OpenLayers.Class({
}
}
// don't fall through to other DOM elements
- if (!this.fallThrough) {
+ if (!this.fallThrough) {
OpenLayers.Event.stop(evt, true);
}
return continueChain;
@@ -5825,12 +5825,12 @@ OpenLayers.Events = OpenLayers.Class({
/**
* Method: handleBrowserEvent
- * Basically just a wrapper to the triggerEvent() function, but takes
- * care to set a property 'xy' on the event with the current mouse
+ * Basically just a wrapper to the triggerEvent() function, but takes
+ * care to set a property 'xy' on the event with the current mouse
* position.
*
* Parameters:
- * evt - {Event}
+ * evt - {Event}
*/
handleBrowserEvent: function (evt) {
var type = evt.type, listeners = this.listeners[type];
@@ -5855,10 +5855,10 @@ OpenLayers.Events = OpenLayers.Class({
}
if (this.includeXY) {
evt.xy = this.getMousePosition(evt);
- }
+ }
this.triggerEvent(type, evt);
},
-
+
/**
* Method: getTouchClientXY
* WebKit has a few bugs for clientX/clientY. This method detects them
@@ -5866,7 +5866,7 @@ OpenLayers.Events = OpenLayers.Class({
*
* Parameters:
* evt - {Touch} a Touch object from a TouchEvent
- *
+ *
* Returns:
* {Object} An object with only clientX and clientY properties with the
* calculated values.
@@ -5878,7 +5878,7 @@ OpenLayers.Events = OpenLayers.Class({
winPageY = win.pageYOffset,
x = evt.clientX,
y = evt.clientY;
-
+
if (evt.pageY === 0 && Math.floor(y) > Math.floor(evt.pageY) ||
evt.pageX === 0 && Math.floor(x) > Math.floor(evt.pageX)) {
// iOS4 include scroll offset in clientX/Y
@@ -5890,34 +5890,34 @@ OpenLayers.Events = OpenLayers.Class({
x = evt.pageX - winPageX;
y = evt.pageY - winPageY;
}
-
+
evt.olClientX = x;
evt.olClientY = y;
-
+
return {
clientX: x,
clientY: y
};
},
-
+
/**
* APIMethod: clearMouseCache
- * Clear cached data about the mouse position. This should be called any
- * time the element that events are registered on changes position
+ * Clear cached data about the mouse position. This should be called any
+ * time the element that events are registered on changes position
* within the page.
*/
- clearMouseCache: function() {
+ clearMouseCache: function() {
this.element.scrolls = null;
this.element.lefttop = null;
this.element.offsets = null;
- },
+ },
/**
* Method: getMousePosition
- *
+ *
* Parameters:
- * evt - {Event}
- *
+ * evt - {Event}
+ *
* Returns:
* {} The current xy coordinate of the mouse, adjusted
* for offsets
@@ -5929,7 +5929,7 @@ OpenLayers.Events = OpenLayers.Class({
OpenLayers.Event.observe(window, "scroll", this.clearMouseListener);
this.element.hasScrollEvent = true;
}
-
+
if (!this.element.scrolls) {
var viewportElement = OpenLayers.Util.getViewportElement();
this.element.scrolls = [
@@ -5944,17 +5944,17 @@ OpenLayers.Events = OpenLayers.Class({
(document.documentElement.clientTop || 0)
];
}
-
+
if (!this.element.offsets) {
this.element.offsets = OpenLayers.Util.pagePosition(this.element);
}
return new OpenLayers.Pixel(
(evt.clientX + this.element.scrolls[0]) - this.element.offsets[0]
- - this.element.lefttop[0],
+ - this.element.lefttop[0],
(evt.clientY + this.element.scrolls[1]) - this.element.offsets[1]
- this.element.lefttop[1]
- );
+ );
},
/**
@@ -6095,7 +6095,7 @@ OpenLayers.Events = OpenLayers.Class({
break;
}
}
-
+
e.touches = touches.slice();
handler(e);
};
@@ -6134,14 +6134,14 @@ OpenLayers.Events = OpenLayers.Class({
* relative to the button.
*/
OpenLayers.Events.buttonclick = OpenLayers.Class({
-
+
/**
* Property: target
* {} The events instance that the buttonclick event will
* be triggered on.
*/
target: null,
-
+
/**
* Property: events
* {Array} Events to observe and conditionally stop from propagating when
@@ -6152,7 +6152,7 @@ OpenLayers.Events.buttonclick = OpenLayers.Class({
'mousedown', 'mouseup', 'click', 'dblclick',
'touchstart', 'touchmove', 'touchend', 'keydown'
],
-
+
/**
* Property: startRegEx
* {RegExp} Regular expression to test Event.type for events that start
@@ -6173,12 +6173,12 @@ OpenLayers.Events.buttonclick = OpenLayers.Class({
* a buttonclick sequence.
*/
completeRegEx: /^mouseup|touchend$/,
-
+
/**
* Property: startEvt
* {Event} The event that started the click sequence
*/
-
+
/**
* Constructor: OpenLayers.Events.buttonclick
* Construct a buttonclick event type. Applications are not supposed to
@@ -6197,7 +6197,7 @@ OpenLayers.Events.buttonclick = OpenLayers.Class({
});
}
},
-
+
/**
* Method: destroy
*/
@@ -6232,7 +6232,7 @@ OpenLayers.Events.buttonclick = OpenLayers.Class({
} while(--depth > 0 && element);
return button;
},
-
+
/**
* Method: ignore
* Check for event target elements that should be ignored by OpenLayers.
@@ -6286,7 +6286,7 @@ OpenLayers.Events.buttonclick = OpenLayers.Class({
var scrollLeft = window.pageXOffset || viewportElement.scrollLeft;
pos[0] = pos[0] - scrollLeft;
pos[1] = pos[1] - scrollTop;
-
+
this.target.triggerEvent("buttonclick", {
buttonElement: button,
buttonXY: {
@@ -6313,7 +6313,7 @@ OpenLayers.Events.buttonclick = OpenLayers.Class({
}
return propagate;
}
-
+
});
/* ======================================================================
OpenLayers/Util/vendorPrefix.js
@@ -6335,13 +6335,13 @@ OpenLayers.Util = OpenLayers.Util || {};
*/
OpenLayers.Util.vendorPrefix = (function() {
"use strict";
-
+
var VENDOR_PREFIXES = ["", "O", "ms", "Moz", "Webkit"],
divStyle = document.createElement("div").style,
cssCache = {},
jsCache = {};
-
+
/**
* Function: domToCss
* Converts a upper camel case DOM style property name to a CSS property
@@ -6424,7 +6424,7 @@ OpenLayers.Util.vendorPrefix = (function() {
}
return jsCache[property];
}
-
+
/**
* APIMethod: style
* Detect which property is used for a DOM style property
@@ -6439,12 +6439,12 @@ OpenLayers.Util.vendorPrefix = (function() {
function style(property) {
return js(divStyle, property);
}
-
+
return {
css: css,
js: js,
style: style,
-
+
// used for testing
cssCache: cssCache,
jsCache: jsCache
@@ -6466,19 +6466,19 @@ OpenLayers.Util.vendorPrefix = (function() {
/**
* Namespace: OpenLayers.Animation
- * A collection of utility functions for executing methods that repaint a
+ * A collection of utility functions for executing methods that repaint a
* portion of the browser window. These methods take advantage of the
* browser's scheduled repaints where requestAnimationFrame is available.
*/
OpenLayers.Animation = (function(window) {
-
+
/**
* Property: isNative
* {Boolean} true if a native requestAnimationFrame function is available
*/
var requestAnimationFrame = OpenLayers.Util.vendorPrefix.js(window, "requestAnimationFrame");
var isNative = !!(requestAnimationFrame);
-
+
/**
* Function: requestFrame
* Schedule a function to be called at the next available animation frame.
@@ -6499,14 +6499,14 @@ OpenLayers.Animation = (function(window) {
request.apply(window, [callback, element]);
};
})();
-
+
// private variables for animation loops
var counter = 0;
var loops = {};
-
+
/**
* Function: start
- * Executes a method with in series for some
+ * Executes a method with in series for some
* duration.
*
* Parameters:
@@ -6536,7 +6536,7 @@ OpenLayers.Animation = (function(window) {
requestFrame(loops[id], element);
return id;
}
-
+
/**
* Function: stop
* Terminates an animation loop started with .
@@ -6547,14 +6547,14 @@ OpenLayers.Animation = (function(window) {
function stop(id) {
delete loops[id];
}
-
+
return {
isNative: isNative,
requestFrame: requestFrame,
start: start,
stop: stop
};
-
+
})(window);
/* ======================================================================
OpenLayers/Tween.js
@@ -6574,32 +6574,32 @@ OpenLayers.Animation = (function(window) {
* Namespace: OpenLayers.Tween
*/
OpenLayers.Tween = OpenLayers.Class({
-
+
/**
* APIProperty: easing
* {(Function)} Easing equation used for the animation
* Defaultly set to OpenLayers.Easing.Expo.easeOut
*/
easing: null,
-
+
/**
* APIProperty: begin
* {Object} Values to start the animation with
*/
begin: null,
-
+
/**
* APIProperty: finish
* {Object} Values to finish the animation with
*/
finish: null,
-
+
/**
* APIProperty: duration
* {int} duration of the tween (number of steps)
*/
duration: null,
-
+
/**
* APIProperty: callbacks
* {Object} An object with start, eachStep and done properties whose values
@@ -6607,13 +6607,13 @@ OpenLayers.Tween = OpenLayers.Class({
* current computed value as argument.
*/
callbacks: null,
-
+
/**
* Property: time
* {int} Step counter
*/
time: null,
-
+
/**
* APIProperty: minFrameRate
* {Number} The minimum framerate for animations in frames per second. After
@@ -6629,34 +6629,34 @@ OpenLayers.Tween = OpenLayers.Class({
* frames
*/
startTime: null,
-
+
/**
* Property: animationId
* {int} Loop id returned by OpenLayers.Animation.start
*/
animationId: null,
-
+
/**
* Property: playing
* {Boolean} Tells if the easing is currently playing
*/
playing: false,
-
- /**
+
+ /**
* Constructor: OpenLayers.Tween
* Creates a Tween.
*
* Parameters:
* easing - {(Function)} easing function method to use
- */
+ */
initialize: function(easing) {
this.easing = (easing) ? easing : OpenLayers.Easing.Expo.easeOut;
},
-
+
/**
* APIMethod: start
* Plays the Tween, and calls the callback method on each step
- *
+ *
* Parameters:
* begin - {Object} values to start the animation with
* finish - {Object} values to finish the animation with
@@ -6682,7 +6682,7 @@ OpenLayers.Tween = OpenLayers.Class({
OpenLayers.Function.bind(this.play, this)
);
},
-
+
/**
* APIMethod: stop
* Stops the Tween, and calls the done callback
@@ -6692,7 +6692,7 @@ OpenLayers.Tween = OpenLayers.Class({
if (!this.playing) {
return;
}
-
+
if (this.callbacks && this.callbacks.done) {
this.callbacks.done.call(this, this.finish);
}
@@ -6700,7 +6700,7 @@ OpenLayers.Tween = OpenLayers.Class({
this.animationId = null;
this.playing = false;
},
-
+
/**
* Method: play
* Calls the appropriate easing method
@@ -6718,19 +6718,19 @@ OpenLayers.Tween = OpenLayers.Class({
value[i] = this.easing.apply(this, [this.time, b, c, this.duration]);
}
this.time++;
-
+
if (this.callbacks && this.callbacks.eachStep) {
// skip frames if frame rate drops below threshold
if ((new Date().getTime() - this.startTime) / this.time <= 1000 / this.minFrameRate) {
this.callbacks.eachStep.call(this, value);
}
}
-
+
if (this.time > this.duration) {
this.stop();
}
},
-
+
/**
* Create empty functions for all easing methods.
*/
@@ -6739,7 +6739,7 @@ OpenLayers.Tween = OpenLayers.Class({
/**
* Namespace: OpenLayers.Easing
- *
+ *
* Credits:
* Easing Equations by Robert Penner,
*/
@@ -6754,10 +6754,10 @@ OpenLayers.Easing = {
* Namespace: OpenLayers.Easing.Linear
*/
OpenLayers.Easing.Linear = {
-
+
/**
* Function: easeIn
- *
+ *
* Parameters:
* t - {Float} time
* b - {Float} beginning position
@@ -6770,10 +6770,10 @@ OpenLayers.Easing.Linear = {
easeIn: function(t, b, c, d) {
return c*t/d + b;
},
-
+
/**
* Function: easeOut
- *
+ *
* Parameters:
* t - {Float} time
* b - {Float} beginning position
@@ -6786,10 +6786,10 @@ OpenLayers.Easing.Linear = {
easeOut: function(t, b, c, d) {
return c*t/d + b;
},
-
+
/**
* Function: easeInOut
- *
+ *
* Parameters:
* t - {Float} time
* b - {Float} beginning position
@@ -6810,10 +6810,10 @@ OpenLayers.Easing.Linear = {
* Namespace: OpenLayers.Easing.Expo
*/
OpenLayers.Easing.Expo = {
-
+
/**
* Function: easeIn
- *
+ *
* Parameters:
* t - {Float} time
* b - {Float} beginning position
@@ -6826,10 +6826,10 @@ OpenLayers.Easing.Expo = {
easeIn: function(t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
-
+
/**
* Function: easeOut
- *
+ *
* Parameters:
* t - {Float} time
* b - {Float} beginning position
@@ -6842,10 +6842,10 @@ OpenLayers.Easing.Expo = {
easeOut: function(t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
-
+
/**
* Function: easeInOut
- *
+ *
* Parameters:
* t - {Float} time
* b - {Float} beginning position
@@ -6869,10 +6869,10 @@ OpenLayers.Easing.Expo = {
* Namespace: OpenLayers.Easing.Quad
*/
OpenLayers.Easing.Quad = {
-
+
/**
* Function: easeIn
- *
+ *
* Parameters:
* t - {Float} time
* b - {Float} beginning position
@@ -6885,10 +6885,10 @@ OpenLayers.Easing.Quad = {
easeIn: function(t, b, c, d) {
return c*(t/=d)*t + b;
},
-
+
/**
* Function: easeOut
- *
+ *
* Parameters:
* t - {Float} time
* b - {Float} beginning position
@@ -6901,10 +6901,10 @@ OpenLayers.Easing.Quad = {
easeOut: function(t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
-
+
/**
* Function: easeInOut
- *
+ *
* Parameters:
* t - {Float} time
* b - {Float} beginning position
@@ -6944,8 +6944,8 @@ OpenLayers.Easing.Quad = {
* on usage.
*
* Additional transforms may be added by using the
- * library. If the proj4js library is included, the method
- * will work between any two coordinate reference systems with proj4js
+ * library. If the proj4js library is included, the method
+ * will work between any two coordinate reference systems with proj4js
* definitions.
*
* If the proj4js library is not included, or if you wish to allow transforms
@@ -6959,13 +6959,13 @@ OpenLayers.Projection = OpenLayers.Class({
* {Object} Proj4js.Proj instance.
*/
proj: null,
-
+
/**
* Property: projCode
* {String}
*/
projCode: null,
-
+
/**
* Property: titleRegEx
* {RegExp} regular expression to strip the title from a proj4js definition
@@ -6974,8 +6974,8 @@ OpenLayers.Projection = OpenLayers.Class({
/**
* Constructor: OpenLayers.Projection
- * This class offers several methods for interacting with a wrapped
- * pro4js projection object.
+ * This class offers several methods for interacting with a wrapped
+ * pro4js projection object.
*
* Parameters:
* projCode - {String} A string identifying the Well Known Identifier for
@@ -6993,7 +6993,7 @@ OpenLayers.Projection = OpenLayers.Class({
this.proj = new Proj4js.Proj(projCode);
}
},
-
+
/**
* APIMethod: getCode
* Get the string SRS code.
@@ -7004,10 +7004,10 @@ OpenLayers.Projection = OpenLayers.Class({
getCode: function() {
return this.proj ? this.proj.srsCode : this.projCode;
},
-
+
/**
* APIMethod: getUnits
- * Get the units string for the projection -- returns null if
+ * Get the units string for the projection -- returns null if
* proj4js is not available.
*
* Returns:
@@ -7053,7 +7053,7 @@ OpenLayers.Projection = OpenLayers.Class({
OpenLayers.Projection.nullTransform;
}
}
- return equals;
+ return equals;
},
/* Method: destroy
@@ -7063,21 +7063,21 @@ OpenLayers.Projection = OpenLayers.Class({
delete this.proj;
delete this.projCode;
},
-
- CLASS_NAME: "OpenLayers.Projection"
-});
+
+ CLASS_NAME: "OpenLayers.Projection"
+});
/**
* Property: transforms
* {Object} Transforms is an object, with from properties, each of which may
- * have a to property. This allows you to define projections without
+ * have a to property. This allows you to define projections without
* requiring support for proj4js to be included.
*
* This object has keys which correspond to a 'source' projection object. The
* keys should be strings, corresponding to the projection.getCode() value.
* Each source projection object should have a set of destination projection
- * keys included in the object.
- *
+ * keys included in the object.
+ *
* Each value in the destination object should be a transformation function,
* where the function is expected to be passed an object with a .x and a .y
* property. The function should return the object, with the .x and .y
@@ -7143,7 +7143,7 @@ OpenLayers.Projection.addTransform = function(from, to, method) {
* APIMethod: transform
* Transform a point coordinate from one projection to another. Note that
* the input point is transformed in place.
- *
+ *
* Parameters:
* point - { | Object} An object with x and y
* properties representing coordinates in those dimensions.
@@ -7200,7 +7200,7 @@ OpenLayers.Projection.nullTransform = function(point) {
* equivalent. See http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2009/11/20/ArcGIS-Online-moving-to-Google-_2F00_-Bing-tiling-scheme_3A00_-What-does-this-mean-for-you_3F00_.aspx#12084.
* For geographic, OpenLayers recognizes EPSG:4326, CRS:84 and
* urn:ogc:def:crs:EPSG:6.6:4326. OpenLayers also knows about the reverse axis
- * order for EPSG:4326.
+ * order for EPSG:4326.
*/
(function() {
@@ -7234,7 +7234,7 @@ OpenLayers.Projection.nullTransform = function(point) {
}
}
}
-
+
// list of equivalent codes for web mercator
var mercator = ["EPSG:900913", "EPSG:3857", "EPSG:102113", "EPSG:102100"],
geographic = ["CRS:84", "urn:ogc:def:crs:EPSG:6.6:4326", "EPSG:4326"],
@@ -7269,16 +7269,16 @@ OpenLayers.Projection.nullTransform = function(point) {
* Class: OpenLayers.Map
* Instances of OpenLayers.Map are interactive maps embedded in a web page.
* Create a new map with the constructor.
- *
+ *
* On their own maps do not provide much functionality. To extend a map
- * it's necessary to add controls () and
- * layers () to the map.
+ * it's necessary to add controls () and
+ * layers () to the map.
*/
OpenLayers.Map = OpenLayers.Class({
-
+
/**
* Constant: Z_INDEX_BASE
- * {Object} Base z-indexes for different classes of thing
+ * {Object} Base z-indexes for different classes of thing
*/
Z_INDEX_BASE: {
BaseLayer: 100,
@@ -7310,14 +7310,14 @@ OpenLayers.Map = OpenLayers.Class({
*
* Supported map event types:
* preaddlayer - triggered before a layer has been added. The event
- * object will include a *layer* property that references the layer
- * to be added. When a listener returns "false" the adding will be
+ * object will include a *layer* property that references the layer
+ * to be added. When a listener returns "false" the adding will be
* aborted.
* addlayer - triggered after a layer has been added. The event object
* will include a *layer* property that references the added layer.
* preremovelayer - triggered before a layer has been removed. The event
- * object will include a *layer* property that references the layer
- * to be removed. When a listener returns "false" the removal will be
+ * object will include a *layer* property that references the layer
+ * to be removed. When a listener returns "false" the removal will be
* aborted.
* removelayer - triggered after a layer has been removed. The event
* object will include a *layer* property that references the removed
@@ -7348,7 +7348,7 @@ OpenLayers.Map = OpenLayers.Class({
* {String} Unique identifier for the map
*/
id: null,
-
+
/**
* Property: fractionalZoom
* {Boolean} For a base layer that supports it, allow the map resolution
@@ -7367,14 +7367,14 @@ OpenLayers.Map = OpenLayers.Class({
* former works for non-integer zoom levels.
*/
fractionalZoom: false,
-
+
/**
* APIProperty: events
- * {} An events object that handles all
+ * {} An events object that handles all
* events on the map
*/
events: null,
-
+
/**
* APIProperty: allOverlays
* {Boolean} Allow the map to function with "overlays" only. Defaults to
@@ -7401,14 +7401,14 @@ OpenLayers.Map = OpenLayers.Class({
* div property may or may not be provided. If the div property
* is not provided, the map can be rendered to a container later
* using the method.
- *
+ *
* Note:
* If you are calling after map construction, do not use
* auto. Instead, divide your by your
* maximum expected dimension.
*/
div: null,
-
+
/**
* Property: dragging
* {Boolean} The map is currently being dragged.
@@ -7420,7 +7420,7 @@ OpenLayers.Map = OpenLayers.Class({
* {} Size of the main div (this.div)
*/
size: null,
-
+
/**
* Property: viewPortDiv
* {HTMLDivElement} The element that represents the map viewport
@@ -7471,7 +7471,7 @@ OpenLayers.Map = OpenLayers.Class({
* min/max zoom level, projection, etc.
*/
baseLayer: null,
-
+
/**
* Property: center
* {} The current center of the map
@@ -7488,14 +7488,14 @@ OpenLayers.Map = OpenLayers.Class({
* Property: zoom
* {Integer} The current zoom level of the map
*/
- zoom: 0,
+ zoom: 0,
/**
* Property: panRatio
* {Float} The ratio of the current extent within
* which panning will tween.
*/
- panRatio: 1.5,
+ panRatio: 1.5,
/**
* APIProperty: options
@@ -7514,18 +7514,18 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIProperty: projection
- * {String} Set in the map options to specify the default projection
+ * {String} Set in the map options to specify the default projection
* for layers added to this map. When using a projection other than EPSG:4326
* (CRS:84, Geographic) or EPSG:3857 (EPSG:900913, Web Mercator),
* also set maxExtent, maxResolution or resolutions. Default is "EPSG:4326".
* Note that the projection of the map is usually determined
* by that of the current baseLayer (see and ).
*/
- projection: "EPSG:4326",
-
+ projection: "EPSG:4326",
+
/**
* APIProperty: units
- * {String} The map units. Possible values are 'degrees' (or 'dd'), 'm',
+ * {String} The map units. Possible values are 'degrees' (or 'dd'), 'm',
* 'ft', 'km', 'mi', 'inches'. Normally taken from the projection.
* Only required if both map and layers do not define a projection,
* or if they define a projection which does not define units
@@ -7534,9 +7534,9 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIProperty: resolutions
- * {Array(Float)} A list of map resolutions (map units per pixel) in
- * descending order. If this is not set in the layer constructor, it
- * will be set based on other resolution related properties
+ * {Array(Float)} A list of map resolutions (map units per pixel) in
+ * descending order. If this is not set in the layer constructor, it
+ * will be set based on other resolution related properties
* (maxExtent, maxResolution, maxScale, etc.).
*/
resolutions: null,
@@ -7578,7 +7578,7 @@ OpenLayers.Map = OpenLayers.Class({
* The value for will change calculations for tile URLs.
*/
maxExtent: null,
-
+
/**
* APIProperty: minExtent
* {|Array} If provided as an array, the array
@@ -7586,7 +7586,7 @@ OpenLayers.Map = OpenLayers.Class({
* The minimum extent for the map. Defaults to null.
*/
minExtent: null,
-
+
/**
* APIProperty: restrictedExtent
* {|Array} If provided as an array, the array
@@ -7610,19 +7610,19 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIProperty: theme
* {String} Relative path to a CSS file from which to load theme styles.
- * Specify null in the map options (e.g. {theme: null}) if you
- * want to get cascading style declarations - by putting links to
+ * Specify null in the map options (e.g. {theme: null}) if you
+ * want to get cascading style declarations - by putting links to
* stylesheets or style declarations directly in your page.
*/
theme: null,
-
- /**
+
+ /**
* APIProperty: displayProjection
* {} Requires proj4js support for projections other
* than EPSG:4326 or EPSG:900913/EPSG:3857. Projection used by
* several controls to display data to user. If this property is set,
* it will be set on any control which has a null displayProjection
- * property at the time the control is added to the map.
+ * property at the time the control is added to the map.
*/
displayProjection: null,
@@ -7650,7 +7650,7 @@ OpenLayers.Map = OpenLayers.Class({
* when the resize event is fired. Default is true.
*/
autoUpdateSize: true,
-
+
/**
* APIProperty: eventListeners
* {Object} If set as an option at construction, the eventListeners
@@ -7673,7 +7673,7 @@ OpenLayers.Map = OpenLayers.Class({
* animated panning.
*/
panMethod: OpenLayers.Easing.Expo.easeOut,
-
+
/**
* Property: panDuration
* {Integer} The number of steps to be passed to the
@@ -7682,7 +7682,7 @@ OpenLayers.Map = OpenLayers.Class({
* Default is 50.
*/
panDuration: 50,
-
+
/**
* Property: zoomTween
* {} Animated zooming tween object, see zoomTo()
@@ -7696,7 +7696,7 @@ OpenLayers.Map = OpenLayers.Class({
* animated zooming.
*/
zoomMethod: OpenLayers.Easing.Quad.easeOut,
-
+
/**
* Property: zoomDuration
* {Integer} The number of steps to be passed to the
@@ -7704,20 +7704,20 @@ OpenLayers.Map = OpenLayers.Class({
* Default is 20.
*/
zoomDuration: 20,
-
+
/**
* Property: paddingForPopups
- * {} Outside margin of the popup. Used to prevent
+ * {} Outside margin of the popup. Used to prevent
* the popup from getting too close to the map border.
*/
paddingForPopups : null,
-
+
/**
* Property: layerContainerOriginPx
* {Object} Cached object representing the layer container origin (in pixels).
*/
layerContainerOriginPx: null,
-
+
/**
* Property: minPx
* {Object} An object with a 'x' and 'y' values that is the lower
@@ -7727,7 +7727,7 @@ OpenLayers.Map = OpenLayers.Class({
* of Layer.
*/
minPx: null,
-
+
/**
* Property: maxPx
* {Object} An object with a 'x' and 'y' values that is the top
@@ -7736,7 +7736,7 @@ OpenLayers.Map = OpenLayers.Class({
* is valid.
*/
maxPx: null,
-
+
/**
* Constructor: OpenLayers.Map
* Constructor for a new OpenLayers.Map instance. There are two possible
@@ -7765,7 +7765,7 @@ OpenLayers.Map = OpenLayers.Class({
* If provided as an array, the array should consist of
* four values (left, bottom, right, top).
* Only specify if
and are not provided.
- *
+ *
* Examples:
* (code)
* // create a map with default options in an element with the id "map1"
@@ -7795,35 +7795,35 @@ OpenLayers.Map = OpenLayers.Class({
* maxExtent: new OpenLayers.Bounds(-200000, -200000, 200000, 200000)
* });
* (end)
- */
+ */
initialize: function (div, options) {
-
+
// If only one argument is provided, check if it is an object.
if(arguments.length === 1 && typeof div === "object") {
options = div;
div = options && options.div;
}
- // Simple-type defaults are set in class definition.
- // Now set complex-type defaults
+ // Simple-type defaults are set in class definition.
+ // Now set complex-type defaults
this.tileSize = new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,
OpenLayers.Map.TILE_HEIGHT);
-
+
this.paddingForPopups = new OpenLayers.Bounds(15, 15, 15, 15);
- this.theme = OpenLayers._getScriptLocation() +
- 'theme/default/style.css';
+ this.theme = OpenLayers._getScriptLocation() +
+ 'theme/default/style.css';
// backup original options
this.options = OpenLayers.Util.extend({}, options);
- // now override default options
+ // now override default options
OpenLayers.Util.extend(this, options);
-
+
var projCode = this.projection instanceof OpenLayers.Projection ?
this.projection.projCode : this.projection;
OpenLayers.Util.applyDefaults(this, OpenLayers.Projection.defaults[projCode]);
-
+
// allow extents and center to be arrays
if (this.maxExtent && !(this.maxExtent instanceof OpenLayers.Bounds)) {
this.maxExtent = new OpenLayers.Bounds(this.maxExtent);
@@ -7849,7 +7849,7 @@ OpenLayers.Map = OpenLayers.Class({
this.div.style.height = "1px";
this.div.style.width = "1px";
}
-
+
OpenLayers.Element.addClass(this.div, 'olMap');
// the viewPortDiv is the outermost div we modify
@@ -7863,10 +7863,10 @@ OpenLayers.Map = OpenLayers.Class({
this.div.appendChild(this.viewPortDiv);
this.events = new OpenLayers.Events(
- this, this.viewPortDiv, null, this.fallThrough,
+ this, this.viewPortDiv, null, this.fallThrough,
{includeXY: true}
);
-
+
if (OpenLayers.TileManager && this.tileManager !== null) {
if (!(this.tileManager instanceof OpenLayers.TileManager)) {
this.tileManager = new OpenLayers.TileManager(this.tileManager);
@@ -7880,7 +7880,7 @@ OpenLayers.Map = OpenLayers.Class({
this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1;
this.layerContainerOriginPx = {x: 0, y: 0};
this.applyTransform();
-
+
this.viewPortDiv.appendChild(this.layerContainerDiv);
this.updateSize();
@@ -7890,14 +7890,14 @@ OpenLayers.Map = OpenLayers.Class({
if (this.autoUpdateSize === true) {
// updateSize on catching the window's resize
- // Note that this is ok, as updateSize() does nothing if the
+ // Note that this is ok, as updateSize() does nothing if the
// map's size has not actually changed.
- this.updateSizeDestroy = OpenLayers.Function.bind(this.updateSize,
+ this.updateSizeDestroy = OpenLayers.Function.bind(this.updateSize,
this);
OpenLayers.Event.observe(window, 'resize',
this.updateSizeDestroy);
}
-
+
// only append link stylesheet if the theme property is set
if(this.theme) {
// check existing links for equivalent url
@@ -7920,7 +7920,7 @@ OpenLayers.Map = OpenLayers.Class({
document.getElementsByTagName('head')[0].appendChild(cssNode);
}
}
-
+
if (this.controls == null) { // default controls
this.controls = [];
if (OpenLayers.Control != null) { // running full or lite?
@@ -7952,17 +7952,17 @@ OpenLayers.Map = OpenLayers.Class({
this.popups = [];
this.unloadDestroy = OpenLayers.Function.bind(this.destroy, this);
-
+
// always call map.destroy()
OpenLayers.Event.observe(window, 'unload', this.unloadDestroy);
-
+
// add any initial layers
if (options && options.layers) {
- /**
+ /**
* If you have set options.center, the map center property will be
* set at this point. However, since setCenter has not been called,
- * addLayers gets confused. So we delete the map center in this
+ * addLayers gets confused. So we delete the map center in this
* case. Because the check below uses options.center, it will
* be properly set below.
*/
@@ -7984,7 +7984,7 @@ OpenLayers.Map = OpenLayers.Class({
}
},
- /**
+ /**
* APIMethod: getViewport
* Get the DOMElement representing the view port.
*
@@ -7994,11 +7994,11 @@ OpenLayers.Map = OpenLayers.Class({
getViewport: function() {
return this.viewPortDiv;
},
-
+
/**
* APIMethod: render
* Render the map to a specified container.
- *
+ *
* Parameters:
* div - {String|DOMElement} The container that the map should be rendered
* to. If different than the current container, the map viewport
@@ -8018,11 +8018,11 @@ OpenLayers.Map = OpenLayers.Class({
* so that if map is manually destroyed, we can unregister this.
*/
unloadDestroy: null,
-
+
/**
* Method: updateSizeDestroy
* When the map is destroyed, we need to stop listening to updateSize
- * events: this method stores the function we need to unregister in
+ * events: this method stores the function we need to unregister in
* non-IE browsers.
*/
updateSizeDestroy: null,
@@ -8034,7 +8034,7 @@ OpenLayers.Map = OpenLayers.Class({
* of the map from the DOM, you need to ensure that you destroy the
* map *before* this happens; otherwise, the page unload handler
* will fail because the DOM elements that map.destroy() wants
- * to clean up will be gone. (See
+ * to clean up will be gone. (See
* http://trac.osgeo.org/openlayers/ticket/2277 for more information).
* This will apply to GeoExt and also to other applications which
* modify the DOM of the container of the OpenLayers Map.
@@ -8044,7 +8044,7 @@ OpenLayers.Map = OpenLayers.Class({
if (!this.unloadDestroy) {
return false;
}
-
+
// make sure panning doesn't continue after destruction
if(this.panTween) {
this.panTween.stop();
@@ -8061,31 +8061,31 @@ OpenLayers.Map = OpenLayers.Class({
this.unloadDestroy = null;
if (this.updateSizeDestroy) {
- OpenLayers.Event.stopObserving(window, 'resize',
+ OpenLayers.Event.stopObserving(window, 'resize',
this.updateSizeDestroy);
}
-
- this.paddingForPopups = null;
+
+ this.paddingForPopups = null;
if (this.controls != null) {
for (var i = this.controls.length - 1; i>=0; --i) {
this.controls[i].destroy();
- }
+ }
this.controls = null;
}
if (this.layers != null) {
for (var i = this.layers.length - 1; i>=0; --i) {
- //pass 'false' to destroy so that map wont try to set a new
+ //pass 'false' to destroy so that map wont try to set a new
// baselayer after each baselayer is removed
this.layers[i].destroy(false);
- }
+ }
this.layers = null;
}
if (this.viewPortDiv && this.viewPortDiv.parentNode) {
this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);
}
this.viewPortDiv = null;
-
+
if (this.tileManager) {
this.tileManager.removeMap(this);
this.tileManager = null;
@@ -8265,7 +8265,7 @@ OpenLayers.Map = OpenLayers.Class({
/* The following functions deal with adding and */
/* removing Layers to and from the Map */
/* */
- /********************************************************/
+ /********************************************************/
/**
* APIMethod: getLayer
@@ -8275,7 +8275,7 @@ OpenLayers.Map = OpenLayers.Class({
* id - {String} A layer id
*
* Returns:
- * {} The Layer with the corresponding id from the map's
+ * {} The Layer with the corresponding id from the map's
* layer collection, or null if not found.
*/
getLayer: function(id) {
@@ -8292,11 +8292,11 @@ OpenLayers.Map = OpenLayers.Class({
/**
* Method: setLayerZIndex
- *
+ *
* Parameters:
- * layer - {}
- * zIdx - {int}
- */
+ * layer - {}
+ * zIdx - {int}
+ */
setLayerZIndex: function (layer, zIdx) {
layer.setZIndex(
this.Z_INDEX_BASE[layer.isBaseLayer ? 'BaseLayer' : 'Overlay']
@@ -8318,11 +8318,11 @@ OpenLayers.Map = OpenLayers.Class({
* APIMethod: addLayer
*
* Parameters:
- * layer - {}
+ * layer - {}
*
* Returns:
* {Boolean} True if the layer has been added to the map.
- */
+ */
addLayer: function (layer) {
for(var i = 0, len = this.layers.length; i < len; i++) {
if (this.layers[i] == layer) {
@@ -8335,7 +8335,7 @@ OpenLayers.Map = OpenLayers.Class({
if(this.allOverlays) {
layer.isBaseLayer = false;
}
-
+
layer.div.className = "olLayerDiv";
layer.div.style.overflow = "";
this.setLayerZIndex(layer, this.layers.length);
@@ -8367,43 +8367,43 @@ OpenLayers.Map = OpenLayers.Class({
},
/**
- * APIMethod: addLayers
+ * APIMethod: addLayers
*
* Parameters:
- * layers - {Array()}
- */
+ * layers - {Array()}
+ */
addLayers: function (layers) {
for (var i=0, len=layers.length; i}
+ * layer - {}
* setNewBaseLayer - {Boolean} Default is true
*/
removeLayer: function(layer, setNewBaseLayer) {
@@ -8445,7 +8445,7 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getNumLayers
- *
+ *
* Returns:
* {Int} The number of layers attached to the map.
*/
@@ -8453,7 +8453,7 @@ OpenLayers.Map = OpenLayers.Class({
return this.layers.length;
},
- /**
+ /**
* APIMethod: getLayerIndex
*
* Parameters:
@@ -8466,8 +8466,8 @@ OpenLayers.Map = OpenLayers.Class({
getLayerIndex: function (layer) {
return OpenLayers.Util.indexOf(this.layers, layer);
},
-
- /**
+
+ /**
* APIMethod: setLayerIndex
* Move the given layer to the specified (zero-based) index in the layer
* list, changing its z-index in the map display. Use
@@ -8476,8 +8476,8 @@ OpenLayers.Map = OpenLayers.Class({
* raise base layers above overlays.
*
* Parameters:
- * layer - {}
- * idx - {int}
+ * layer - {}
+ * idx - {int}
*/
setLayerIndex: function (layer, idx) {
var base = this.getLayerIndex(layer);
@@ -8505,34 +8505,34 @@ OpenLayers.Map = OpenLayers.Class({
}
},
- /**
+ /**
* APIMethod: raiseLayer
- * Change the index of the given layer by delta. If delta is positive,
+ * Change the index of the given layer by delta. If delta is positive,
* the layer is moved up the map's layer stack; if delta is negative,
* the layer is moved down. Again, note that this cannot (or at least
* should not) be effectively used to raise base layers above overlays.
*
* Paremeters:
- * layer - {}
- * delta - {int}
+ * layer - {}
+ * delta - {int}
*/
raiseLayer: function (layer, delta) {
var idx = this.getLayerIndex(layer) + delta;
this.setLayerIndex(layer, idx);
},
-
- /**
+
+ /**
* APIMethod: setBaseLayer
* Allows user to specify one of the currently-loaded layers as the Map's
* new base layer.
- *
+ *
* Parameters:
* newBaseLayer - {}
*/
setBaseLayer: function(newBaseLayer) {
-
+
if (newBaseLayer != this.baseLayer) {
-
+
// ensure newBaseLayer is already loaded
if (OpenLayers.Util.indexOf(this.layers, newBaseLayer) != -1) {
@@ -8542,14 +8542,14 @@ OpenLayers.Map = OpenLayers.Class({
this.getScale(), newBaseLayer.units
);
- // make the old base layer invisible
+ // make the old base layer invisible
if (this.baseLayer != null && !this.allOverlays) {
this.baseLayer.setVisibility(false);
}
// set new baselayer
this.baseLayer = newBaseLayer;
-
+
if(!this.allOverlays || this.baseLayer.visibility) {
this.baseLayer.setVisibility(true);
// Layer may previously have been visible but not in range.
@@ -8572,7 +8572,7 @@ OpenLayers.Map = OpenLayers.Class({
this.events.triggerEvent("changebaselayer", {
layer: this.baseLayer
});
- }
+ }
}
},
@@ -8584,35 +8584,35 @@ OpenLayers.Map = OpenLayers.Class({
/* The following functions deal with adding and */
/* removing Controls to and from the Map */
/* */
- /********************************************************/
+ /********************************************************/
/**
* APIMethod: addControl
- * Add the passed over control to the map. Optionally
+ * Add the passed over control to the map. Optionally
* position the control at the given pixel.
- *
+ *
* Parameters:
* control - {}
* px - {}
- */
+ */
addControl: function (control, px) {
this.controls.push(control);
this.addControlToMap(control, px);
},
-
+
/**
* APIMethod: addControls
- * Add all of the passed over controls to the map.
+ * Add all of the passed over controls to the map.
* You can pass over an optional second array
* with pixel-objects to position the controls.
* The indices of the two arrays should match and
- * you can add null as pixel for those controls
- * you want to be autopositioned.
- *
+ * you can add null as pixel for those controls
+ * you want to be autopositioned.
+ *
* Parameters:
* controls - {Array()}
* pixels - {Array()}
- */
+ */
addControls: function (controls, pixels) {
var pxs = (arguments.length === 1) ? [] : pixels;
for (var i=0, len=controls.length; i}
* px - {}
- */
+ */
addControlToMap: function (control, px) {
// If a control doesn't have a div at this point, it belongs in the
// viewport.
control.outsideViewport = (control.div != null);
-
- // If the map has a displayProjection, and the control doesn't, set
+
+ // If the map has a displayProjection, and the control doesn't, set
// the display projection.
if (this.displayProjection && !control.displayProjection) {
control.displayProjection = this.displayProjection;
- }
-
+ }
+
control.setMap(this);
var div = control.draw(px);
if (div) {
@@ -8654,18 +8654,18 @@ OpenLayers.Map = OpenLayers.Class({
control.activate();
}
},
-
+
/**
* APIMethod: getControl
- *
+ *
* Parameters:
* id - {String} ID of the control to return.
- *
+ *
* Returns:
- * {} The control from the map's list of controls
- * which has a matching 'id'. If none found,
+ * {} The control from the map's list of controls
+ * which has a matching 'id'. If none found,
* returns null.
- */
+ */
getControl: function (id) {
var returnControl = null;
for(var i=0, len=this.controls.length; i} The control to remove.
- */
+ */
removeControl: function (control) {
//make sure control is non-null and actually part of our map
if ( (control) && (control == this.getControl(control.id)) ) {
@@ -8704,11 +8704,11 @@ OpenLayers.Map = OpenLayers.Class({
/* The following functions deal with adding and */
/* removing Popups to and from the Map */
/* */
- /********************************************************/
+ /********************************************************/
- /**
+ /**
* APIMethod: addPopup
- *
+ *
* Parameters:
* popup - {}
* exclusive - {Boolean} If true, closes all other popups first
@@ -8731,10 +8731,10 @@ OpenLayers.Map = OpenLayers.Class({
this.layerContainerDiv.appendChild(popupDiv);
}
},
-
- /**
+
+ /**
* APIMethod: removePopup
- *
+ *
* Parameters:
* popup - {}
*/
@@ -8755,15 +8755,15 @@ OpenLayers.Map = OpenLayers.Class({
/* The following functions deal with the access to */
/* and maintenance of the size of the container div */
/* */
- /********************************************************/
+ /********************************************************/
/**
* APIMethod: getSize
- *
+ *
* Returns:
- * {} An object that represents the
- * size, in pixels, of the div into which OpenLayers
- * has been loaded.
+ * {} An object that represents the
+ * size, in pixels, of the div into which OpenLayers
+ * has been loaded.
* Note - A clone() of this locally cached variable is
* returned, so as not to allow users to modify it.
*/
@@ -8778,7 +8778,7 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: updateSize
* This function should be called by any external code which dynamically
- * changes the size of the map div (because mozilla wont let us catch
+ * changes the size of the map div (because mozilla wont let us catch
* the "onresize" for an element)
*/
updateSize: function() {
@@ -8791,38 +8791,38 @@ OpenLayers.Map = OpenLayers.Class({
this.size = oldSize = newSize;
}
if (!newSize.equals(oldSize)) {
-
+
// store the new size
this.size = newSize;
-
+
//notify layers of mapresize
for(var i=0, len=this.layers.length; i} A new object with the dimensions
+ * {} A new object with the dimensions
* of the map div
*/
getCurrentSize: function() {
- var size = new OpenLayers.Size(this.div.clientWidth,
+ var size = new OpenLayers.Size(this.div.clientWidth,
this.div.clientHeight);
if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) {
@@ -8836,32 +8836,32 @@ OpenLayers.Map = OpenLayers.Class({
return size;
},
- /**
+ /**
* Method: calculateBounds
- *
+ *
* Parameters:
* center - {} Default is this.getCenter()
- * resolution - {float} Default is this.getResolution()
- *
+ * resolution - {float} Default is this.getResolution()
+ *
* Returns:
- * {} A bounds based on resolution, center, and
+ * {} A bounds based on resolution, center, and
* current mapsize.
*/
calculateBounds: function(center, resolution) {
var extent = null;
-
+
if (center == null) {
center = this.getCachedCenter();
- }
+ }
if (resolution == null) {
resolution = this.getResolution();
}
-
+
if ((center != null) && (resolution != null)) {
var halfWDeg = (this.size.w * resolution) / 2;
var halfHDeg = (this.size.h * resolution) / 2;
-
+
extent = new OpenLayers.Bounds(center.lon - halfWDeg,
center.lat - halfHDeg,
center.lon + halfWDeg,
@@ -8883,7 +8883,7 @@ OpenLayers.Map = OpenLayers.Class({
/********************************************************/
/**
* APIMethod: getCenter
- *
+ *
* Returns:
* {}
*/
@@ -8914,18 +8914,18 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getZoom
- *
+ *
* Returns:
* {Integer}
*/
getZoom: function () {
return this.zoom;
},
-
- /**
+
+ /**
* APIMethod: pan
* Allows user to pan by a value of screen pixels
- *
+ *
* Parameters:
* dx - {Integer}
* dy - {Integer}
@@ -8960,17 +8960,17 @@ OpenLayers.Map = OpenLayers.Class({
this.dragging = false;
this.events.triggerEvent("moveend");
}
- }
+ }
}
- }
+ }
},
-
- /**
+
+ /**
* APIMethod: panTo
* Allows user to pan to a new lonlat
* If the new lonlat is in the current extent the map will slide smoothly
- *
+ *
* Parameters:
* lonlat - {}
*/
@@ -9012,15 +9012,15 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: setCenter
* Set the map center (and optionally, the zoom level).
- *
+ *
* Parameters:
* lonlat - {|Array} The new center location.
* If provided as array, the first value is the x coordinate,
* and the 2nd value is the y coordinate.
* zoom - {Integer} Optional zoom level.
- * dragging - {Boolean} Specifies whether or not to trigger
+ * dragging - {Boolean} Specifies whether or not to trigger
* movestart/end events
- * forceZoomChange - {Boolean} Specifies whether or not to trigger zoom
+ * forceZoomChange - {Boolean} Specifies whether or not to trigger zoom
* change events (needed on baseLayer change)
*
* TBD: reconsider forceZoomChange in 3.0
@@ -9031,14 +9031,14 @@ OpenLayers.Map = OpenLayers.Class({
}
if (this.zoomTween) {
this.zoomTween.stop();
- }
+ }
this.moveTo(lonlat, zoom, {
'dragging': dragging,
'forceZoomChange': forceZoomChange
});
},
-
- /**
+
+ /**
* Method: moveByPx
* Drag the map by pixels.
*
@@ -9094,7 +9094,7 @@ OpenLayers.Map = OpenLayers.Class({
this.events.triggerEvent("move");
}
},
-
+
/**
* Method: adjustZoom
*
@@ -9119,12 +9119,12 @@ OpenLayers.Map = OpenLayers.Class({
break;
}
}
- }
+ }
}
}
return zoom;
},
-
+
/**
* APIMethod: getMinZoom
* Returns the minimum zoom level for the current map view. If the base
@@ -9155,7 +9155,7 @@ OpenLayers.Map = OpenLayers.Class({
if (lonlat != null && !(lonlat instanceof OpenLayers.LonLat)) {
lonlat = new OpenLayers.LonLat(lonlat);
}
- if (!options) {
+ if (!options) {
options = {};
}
if (zoom != null) {
@@ -9182,43 +9182,43 @@ OpenLayers.Map = OpenLayers.Class({
if(this.restrictedExtent != null) {
// In 3.0, decide if we want to change interpretation of maxExtent.
- if(lonlat == null) {
- lonlat = this.center;
+ if(lonlat == null) {
+ lonlat = this.center;
}
- if(zoom == null) {
- zoom = this.getZoom();
+ if(zoom == null) {
+ zoom = this.getZoom();
}
var resolution = this.getResolutionForZoom(zoom);
- var extent = this.calculateBounds(lonlat, resolution);
+ var extent = this.calculateBounds(lonlat, resolution);
if(!this.restrictedExtent.containsBounds(extent)) {
- var maxCenter = this.restrictedExtent.getCenterLonLat();
- if(extent.getWidth() > this.restrictedExtent.getWidth()) {
- lonlat = new OpenLayers.LonLat(maxCenter.lon, lonlat.lat);
+ var maxCenter = this.restrictedExtent.getCenterLonLat();
+ if(extent.getWidth() > this.restrictedExtent.getWidth()) {
+ lonlat = new OpenLayers.LonLat(maxCenter.lon, lonlat.lat);
} else if(extent.left < this.restrictedExtent.left) {
lonlat = lonlat.add(this.restrictedExtent.left -
- extent.left, 0);
- } else if(extent.right > this.restrictedExtent.right) {
+ extent.left, 0);
+ } else if(extent.right > this.restrictedExtent.right) {
lonlat = lonlat.add(this.restrictedExtent.right -
- extent.right, 0);
- }
- if(extent.getHeight() > this.restrictedExtent.getHeight()) {
- lonlat = new OpenLayers.LonLat(lonlat.lon, maxCenter.lat);
- } else if(extent.bottom < this.restrictedExtent.bottom) {
+ extent.right, 0);
+ }
+ if(extent.getHeight() > this.restrictedExtent.getHeight()) {
+ lonlat = new OpenLayers.LonLat(lonlat.lon, maxCenter.lat);
+ } else if(extent.bottom < this.restrictedExtent.bottom) {
lonlat = lonlat.add(0, this.restrictedExtent.bottom -
- extent.bottom);
- }
- else if(extent.top > this.restrictedExtent.top) {
+ extent.bottom);
+ }
+ else if(extent.top > this.restrictedExtent.top) {
lonlat = lonlat.add(0, this.restrictedExtent.top -
- extent.top);
- }
+ extent.top);
+ }
}
}
-
+
var zoomChanged = forceZoomChange || (
- (this.isValidZoomLevel(zoom)) &&
+ (this.isValidZoomLevel(zoom)) &&
(zoom != this.getZoom()) );
- var centerChanged = (this.isValidLonLat(lonlat)) &&
+ var centerChanged = (this.isValidLonLat(lonlat)) &&
(!lonlat.equals(this.center));
// if neither center nor zoom will change, no need to do anything
@@ -9228,7 +9228,7 @@ OpenLayers.Map = OpenLayers.Class({
});
if (centerChanged) {
- if (!zoomChanged && this.center) {
+ if (!zoomChanged && this.center) {
// if zoom hasnt changed, just slide layerContainer
// (must be done before setting this.center to new value)
this.centerLayerContainer(lonlat);
@@ -9263,11 +9263,11 @@ OpenLayers.Map = OpenLayers.Class({
if (zoomChanged) {
this.zoom = zoom;
this.resolution = res;
- }
-
+ }
+
var bounds = this.getExtent();
-
- //send the move call to the baselayer and all the overlays
+
+ //send the move call to the baselayer and all the overlays
if(this.baseLayer.visibility) {
this.baseLayer.moveTo(bounds, zoomChanged, options.dragging);
@@ -9275,9 +9275,9 @@ OpenLayers.Map = OpenLayers.Class({
"moveend", {zoomChanged: zoomChanged}
);
}
-
+
bounds = this.baseLayer.getExtent();
-
+
for (var i=this.layers.length-1; i>=0; --i) {
var layer = this.layers[i];
if (layer !== this.baseLayer && !layer.isBaseLayer) {
@@ -9301,9 +9301,9 @@ OpenLayers.Map = OpenLayers.Class({
"moveend", {zoomChanged: zoomChanged}
);
}
- }
+ }
}
-
+
this.events.triggerEvent("move");
dragging || this.events.triggerEvent("moveend");
@@ -9317,10 +9317,10 @@ OpenLayers.Map = OpenLayers.Class({
}
},
- /**
+ /**
* Method: centerLayerContainer
* This function takes care to recenter the layerContainerDiv.
- *
+ *
* Parameters:
* lonlat - {}
*/
@@ -9342,31 +9342,31 @@ OpenLayers.Map = OpenLayers.Class({
this.maxPx.x -= dx;
this.minPx.y -= dy;
this.maxPx.y -= dy;
- }
+ }
},
/**
* Method: isValidZoomLevel
- *
+ *
* Parameters:
* zoomLevel - {Integer}
- *
+ *
* Returns:
- * {Boolean} Whether or not the zoom level passed in is non-null and
+ * {Boolean} Whether or not the zoom level passed in is non-null and
* within the min/max range of zoom levels.
*/
isValidZoomLevel: function(zoomLevel) {
return ( (zoomLevel != null) &&
- (zoomLevel >= 0) &&
+ (zoomLevel >= 0) &&
(zoomLevel < this.getNumZoomLevels()) );
},
-
+
/**
* Method: isValidLonLat
- *
+ *
* Parameters:
* lonlat - {}
- *
+ *
* Returns:
* {Boolean} Whether or not the lonlat passed in is non-null and within
* the maxExtent bounds
@@ -9388,25 +9388,25 @@ OpenLayers.Map = OpenLayers.Class({
/* Accessor functions to Layer Options parameters */
/* */
/********************************************************/
-
+
/**
* APIMethod: getProjection
- * This method returns a string representing the projection. In
+ * This method returns a string representing the projection. In
* the case of projection support, this will be the srsCode which
* is loaded -- otherwise it will simply be the string value that
* was passed to the projection at startup.
*
* FIXME: In 3.0, we will remove getProjectionObject, and instead
- * return a Projection object from this function.
- *
+ * return a Projection object from this function.
+ *
* Returns:
- * {String} The Projection string from the base layer or null.
+ * {String} The Projection string from the base layer or null.
*/
getProjection: function() {
var projection = this.getProjectionObject();
return projection ? projection.getCode() : null;
},
-
+
/**
* APIMethod: getProjectionObject
* Returns the projection obect from the baselayer.
@@ -9421,10 +9421,10 @@ OpenLayers.Map = OpenLayers.Class({
}
return projection;
},
-
+
/**
* APIMethod: getMaxResolution
- *
+ *
* Returns:
* {String} The Map's Maximum Resolution
*/
@@ -9435,19 +9435,19 @@ OpenLayers.Map = OpenLayers.Class({
}
return maxResolution;
},
-
+
/**
* APIMethod: getMaxExtent
*
* Parameters:
- * options - {Object}
- *
+ * options - {Object}
+ *
* Allowed Options:
- * restricted - {Boolean} If true, returns restricted extent (if it is
+ * restricted - {Boolean} If true, returns restricted extent (if it is
* available.)
*
* Returns:
- * {} The maxExtent property as set on the current
+ * {} The maxExtent property as set on the current
* baselayer, unless the 'restricted' option is set, in which case
* the 'restrictedExtent' option from the map is returned (if it
* is set).
@@ -9458,15 +9458,15 @@ OpenLayers.Map = OpenLayers.Class({
maxExtent = this.restrictedExtent;
} else if (this.baseLayer != null) {
maxExtent = this.baseLayer.maxExtent;
- }
+ }
return maxExtent;
},
-
+
/**
* APIMethod: getNumZoomLevels
- *
+ *
* Returns:
- * {Integer} The total number of zoom levels that can be displayed by the
+ * {Integer} The total number of zoom levels that can be displayed by the
* current baseLayer.
*/
getNumZoomLevels: function() {
@@ -9490,10 +9490,10 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getExtent
- *
+ *
* Returns:
- * {} A Bounds object which represents the lon/lat
- * bounds of the current viewPort.
+ * {} A Bounds object which represents the lon/lat
+ * bounds of the current viewPort.
* If no baselayer is set, returns null.
*/
getExtent: function () {
@@ -9506,9 +9506,9 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getResolution
- *
+ *
* Returns:
- * {Float} The current resolution of the map.
+ * {Float} The current resolution of the map.
* If no baselayer is set, returns null.
*/
getResolution: function () {
@@ -9526,9 +9526,9 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getUnits
- *
+ *
* Returns:
- * {Float} The current units of the map.
+ * {Float} The current units of the map.
* If no baselayer is set, returns null.
*/
getUnits: function () {
@@ -9541,9 +9541,9 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getScale
- *
+ *
* Returns:
- * {Float} The current scale denominator of the map.
+ * {Float} The current scale denominator of the map.
* If no baselayer is set, returns null.
*/
getScale: function () {
@@ -9559,14 +9559,14 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getZoomForExtent
- *
- * Parameters:
+ *
+ * Parameters:
* bounds - {}
- * closest - {Boolean} Find the zoom level that most closely fits the
- * specified bounds. Note that this may result in a zoom that does
+ * closest - {Boolean} Find the zoom level that most closely fits the
+ * specified bounds. Note that this may result in a zoom that does
* not exactly contain the entire extent.
* Default is false.
- *
+ *
* Returns:
* {Integer} A suitable zoom level for the specified bounds.
* If no baselayer is set, returns null.
@@ -9581,10 +9581,10 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getResolutionForZoom
- *
+ *
* Parameters:
* zoom - {Float}
- *
+ *
* Returns:
* {Float} A suitable resolution for the specified zoom. If no baselayer
* is set, returns null.
@@ -9599,17 +9599,17 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getZoomForResolution
- *
+ *
* Parameters:
* resolution - {Float}
- * closest - {Boolean} Find the zoom level that corresponds to the absolute
+ * closest - {Boolean} Find the zoom level that corresponds to the absolute
* closest resolution, which may result in a zoom whose corresponding
* resolution is actually smaller than we would have desired (if this
* is being called from a getZoomForExtent() call, then this means that
- * the returned zoom index might not actually contain the entire
+ * the returned zoom index might not actually contain the entire
* extent specified... but it'll be close).
* Default is false.
- *
+ *
* Returns:
* {Integer} A suitable zoom level for the specified resolution.
* If no baselayer is set, returns null.
@@ -9631,20 +9631,20 @@ OpenLayers.Map = OpenLayers.Class({
/* the setCenter() function */
/* */
/********************************************************/
-
- /**
+
+ /**
* APIMethod: zoomTo
* Zoom to a specific zoom level. Zooming will be animated unless the map
* is configured with {zoomMethod: null}. To zoom without animation, use
* without a lonlat argument.
- *
+ *
* Parameters:
* zoom - {Integer}
*/
zoomTo: function(zoom, xy) {
// non-API arguments:
// xy - {} optional zoom origin
-
+
var map = this;
if (map.isValidZoomLevel(zoom)) {
if (map.baseLayer.wrapDateLine) {
@@ -9692,18 +9692,18 @@ OpenLayers.Map = OpenLayers.Class({
}
}
},
-
+
/**
* APIMethod: zoomIn
- *
+ *
*/
zoomIn: function() {
this.zoomTo(this.getZoom() + 1);
},
-
+
/**
* APIMethod: zoomOut
- *
+ *
*/
zoomOut: function() {
this.zoomTo(this.getZoom() - 1);
@@ -9712,15 +9712,15 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: zoomToExtent
* Zoom to the passed in bounds, recenter
- *
+ *
* Parameters:
* bounds - {|Array} If provided as an array, the array
* should consist of four values (left, bottom, right, top).
- * closest - {Boolean} Find the zoom level that most closely fits the
- * specified bounds. Note that this may result in a zoom that does
+ * closest - {Boolean} Find the zoom level that most closely fits the
+ * specified bounds. Note that this may result in a zoom that does
* not exactly contain the entire extent.
* Default is false.
- *
+ *
*/
zoomToExtent: function(bounds, closest) {
if (!(bounds instanceof OpenLayers.Bounds)) {
@@ -9730,17 +9730,17 @@ OpenLayers.Map = OpenLayers.Class({
if (this.baseLayer.wrapDateLine) {
var maxExtent = this.getMaxExtent();
- //fix straddling bounds (in the case of a bbox that straddles the
- // dateline, it's left and right boundaries will appear backwards.
+ //fix straddling bounds (in the case of a bbox that straddles the
+ // dateline, it's left and right boundaries will appear backwards.
// we fix this by allowing a right value that is greater than the
- // max value at the dateline -- this allows us to pass a valid
+ // max value at the dateline -- this allows us to pass a valid
// bounds to calculate zoom)
//
bounds = bounds.clone();
while (bounds.right < bounds.left) {
bounds.right += maxExtent.getWidth();
}
- //if the bounds was straddling (see above), then the center point
+ //if the bounds was straddling (see above), then the center point
// we got from it was wrong. So we take our new bounds and ask it
// for the center.
//
@@ -9749,15 +9749,15 @@ OpenLayers.Map = OpenLayers.Class({
this.setCenter(center, this.getZoomForExtent(bounds, closest));
},
- /**
+ /**
* APIMethod: zoomToMaxExtent
* Zoom to the full extent and recenter.
*
* Parameters:
* options - {Object}
- *
+ *
* Allowed Options:
- * restricted - {Boolean} True to zoom to restricted extent if it is
+ * restricted - {Boolean} True to zoom to restricted extent if it is
* set. Defaults to true.
*/
zoomToMaxExtent: function(options) {
@@ -9765,25 +9765,25 @@ OpenLayers.Map = OpenLayers.Class({
var restricted = (options) ? options.restricted : true;
var maxExtent = this.getMaxExtent({
- 'restricted': restricted
+ 'restricted': restricted
});
this.zoomToExtent(maxExtent);
},
- /**
+ /**
* APIMethod: zoomToScale
- * Zoom to a specified scale
- *
+ * Zoom to a specified scale
+ *
* Parameters:
* scale - {float}
- * closest - {Boolean} Find the zoom level that most closely fits the
- * specified scale. Note that this may result in a zoom that does
+ * closest - {Boolean} Find the zoom level that most closely fits the
+ * specified scale. Note that this may result in a zoom that does
* not exactly contain the entire extent.
* Default is false.
- *
+ *
*/
zoomToScale: function(scale, closest) {
- var res = OpenLayers.Util.getResolutionFromScale(scale,
+ var res = OpenLayers.Util.getResolutionFromScale(scale,
this.baseLayer.units);
var halfWDeg = (this.size.w * res) / 2;
@@ -9796,7 +9796,7 @@ OpenLayers.Map = OpenLayers.Class({
center.lat + halfHDeg);
this.zoomToExtent(extent, closest);
},
-
+
/********************************************************/
/* */
/* Translation Functions */
@@ -9805,26 +9805,26 @@ OpenLayers.Map = OpenLayers.Class({
/* LonLat, LayerPx, and ViewPortPx */
/* */
/********************************************************/
-
+
//
// TRANSLATION: LonLat <-> ViewPortPx
//
/**
* Method: getLonLatFromViewPortPx
- *
+ *
* Parameters:
* viewPortPx - {|Object} An OpenLayers.Pixel or
* an object with a 'x'
* and 'y' properties.
- *
+ *
* Returns:
- * {} An OpenLayers.LonLat which is the passed-in view
+ * {} An OpenLayers.LonLat which is the passed-in view
* port , translated into lon/lat
* by the current base layer.
*/
getLonLatFromViewPortPx: function (viewPortPx) {
- var lonlat = null;
+ var lonlat = null;
if (this.baseLayer != null) {
lonlat = this.baseLayer.getLonLatFromViewPortPx(viewPortPx);
}
@@ -9833,17 +9833,17 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getViewPortPxFromLonLat
- *
+ *
* Parameters:
* lonlat - {}
- *
+ *
* Returns:
- * {} An OpenLayers.Pixel which is the passed-in
- * , translated into view port
+ * {} An OpenLayers.Pixel which is the passed-in
+ * , translated into view port
* pixels by the current base layer.
*/
getViewPortPxFromLonLat: function (lonlat) {
- var px = null;
+ var px = null;
if (this.baseLayer != null) {
px = this.baseLayer.getViewPortPxFromLonLat(lonlat);
}
@@ -9875,21 +9875,21 @@ OpenLayers.Map = OpenLayers.Class({
}
return lonlat;
},
-
+
//
// CONVENIENCE TRANSLATION FUNCTIONS FOR API
//
/**
* APIMethod: getLonLatFromPixel
- *
+ *
* Parameters:
* px - {|Object} An OpenLayers.Pixel or an object with
* a 'x' and 'y' properties.
*
* Returns:
* {} An OpenLayers.LonLat corresponding to the given
- * OpenLayers.Pixel, translated into lon/lat by the
+ * OpenLayers.Pixel, translated into lon/lat by the
* current base layer
*/
getLonLatFromPixel: function (px) {
@@ -9901,12 +9901,12 @@ OpenLayers.Map = OpenLayers.Class({
* Returns a pixel location given a map location. The map location is
* translated to an integer pixel location (in viewport pixel
* coordinates) by the current base layer.
- *
+ *
* Parameters:
* lonlat - {} A map location.
- *
- * Returns:
- * {} An OpenLayers.Pixel corresponding to the
+ *
+ * Returns:
+ * {} An OpenLayers.Pixel corresponding to the
* translated into view port pixels by the current
* base layer.
*/
@@ -9916,14 +9916,14 @@ OpenLayers.Map = OpenLayers.Class({
px.y = Math.round(px.y);
return px;
},
-
+
/**
* Method: getGeodesicPixelSize
- *
+ *
* Parameters:
* px - {} The pixel to get the geodesic length for. If
* not provided, the center pixel of the map viewport will be used.
- *
+ *
* Returns:
* {} The geodesic size of the pixel in kilometers.
*/
@@ -9943,7 +9943,7 @@ OpenLayers.Map = OpenLayers.Class({
bottom.transform(source, dest);
top.transform(source, dest);
}
-
+
return new OpenLayers.Size(
OpenLayers.Util.distVincenty(left, right),
OpenLayers.Util.distVincenty(bottom, top)
@@ -9958,12 +9958,12 @@ OpenLayers.Map = OpenLayers.Class({
/**
* APIMethod: getViewPortPxFromLayerPx
- *
+ *
* Parameters:
* layerPx - {}
- *
+ *
* Returns:
- * {} Layer Pixel translated into ViewPort Pixel
+ * {} Layer Pixel translated into ViewPort Pixel
* coordinates
*/
getViewPortPxFromLayerPx:function(layerPx) {
@@ -9971,19 +9971,19 @@ OpenLayers.Map = OpenLayers.Class({
if (layerPx != null) {
var dX = this.layerContainerOriginPx.x;
var dY = this.layerContainerOriginPx.y;
- viewPortPx = layerPx.add(dX, dY);
+ viewPortPx = layerPx.add(dX, dY);
}
return viewPortPx;
},
-
+
/**
* APIMethod: getLayerPxFromViewPortPx
- *
+ *
* Parameters:
* viewPortPx - {}
- *
+ *
* Returns:
- * {} ViewPort Pixel translated into Layer Pixel
+ * {} ViewPort Pixel translated into Layer Pixel
* coordinates
*/
getLayerPxFromViewPortPx:function(viewPortPx) {
@@ -9998,14 +9998,14 @@ OpenLayers.Map = OpenLayers.Class({
}
return layerPx;
},
-
+
//
// TRANSLATION: LonLat <-> LayerPx
//
/**
* Method: getLonLatFromLayerPx
- *
+ *
* Parameters:
* px - {}
*
@@ -10015,24 +10015,24 @@ OpenLayers.Map = OpenLayers.Class({
getLonLatFromLayerPx: function (px) {
//adjust for displacement of layerContainerDiv
px = this.getViewPortPxFromLayerPx(px);
- return this.getLonLatFromViewPortPx(px);
+ return this.getLonLatFromViewPortPx(px);
},
-
+
/**
* APIMethod: getLayerPxFromLonLat
- *
+ *
* Parameters:
* lonlat - {} lonlat
*
* Returns:
- * {} An OpenLayers.Pixel which is the passed-in
- * , translated into layer pixels
+ * {} An OpenLayers.Pixel which is the passed-in
+ * , translated into layer pixels
* by the current base layer
*/
getLayerPxFromLonLat: function (lonlat) {
//adjust for displacement of layerContainerDiv
var px = this.getPixelFromLonLat(lonlat);
- return this.getLayerPxFromViewPortPx(px);
+ return this.getLayerPxFromViewPortPx(px);
},
/**
@@ -10054,11 +10054,11 @@ OpenLayers.Map = OpenLayers.Class({
needTransform = scale !== 1;
x = x || origin.x;
y = y || origin.y;
-
+
var style = this.layerContainerDiv.style,
transform = this.applyTransform.transform,
template = this.applyTransform.template;
-
+
if (transform === undefined) {
transform = OpenLayers.Util.vendorPrefix.style('transform');
this.applyTransform.transform = transform;
@@ -10079,7 +10079,7 @@ OpenLayers.Map = OpenLayers.Class({
this.applyTransform.template = template;
}
}
-
+
// If we do 3d transforms, we always want to use them. If we do 2d
// transforms, we only use them when we need to.
if (transform !== null && (template[0] === 'translate3d(' || needTransform === true)) {
@@ -10104,7 +10104,7 @@ OpenLayers.Map = OpenLayers.Class({
}
}
},
-
+
CLASS_NAME: "OpenLayers.Map"
});
@@ -10147,7 +10147,7 @@ OpenLayers.Map.TILE_HEIGHT = 256;
* correspond to these abstract events - so instead of listening for
* individual browser events, they only listen for the abstract events
* defined by the handler.
- *
+ *
* Handlers are created by controls, which ultimately have the responsibility
* of making changes to the the state of the application. Handlers
* themselves may make temporary changes, but in general are expected to
@@ -10160,7 +10160,7 @@ OpenLayers.Handler = OpenLayers.Class({
* {String}
*/
id: null,
-
+
/**
* APIProperty: control
* {}. The control that initialized this handler. The
@@ -10199,7 +10199,7 @@ OpenLayers.Handler = OpenLayers.Class({
* {Boolean}
*/
active: false,
-
+
/**
* Property: evt
* {Event} This property references the last event handled by the handler.
@@ -10209,11 +10209,11 @@ OpenLayers.Handler = OpenLayers.Class({
* the OpenLayers code.
*/
evt: null,
-
+
/**
* Property: touch
- * {Boolean} Indicates the support of touch events. When touch events are
- * started touch will be true and all mouse related listeners will do
+ * {Boolean} Indicates the support of touch events. When touch events are
+ * started touch will be true and all mouse related listeners will do
* nothing.
*/
touch: false,
@@ -10241,12 +10241,12 @@ OpenLayers.Handler = OpenLayers.Class({
var map = this.map || control.map;
if (map) {
- this.setMap(map);
+ this.setMap(map);
}
-
+
this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
},
-
+
/**
* Method: setMap
*/
@@ -10273,7 +10273,7 @@ OpenLayers.Handler = OpenLayers.Class({
(evt.ctrlKey ? OpenLayers.Handler.MOD_CTRL : 0) |
(evt.altKey ? OpenLayers.Handler.MOD_ALT : 0) |
(evt.metaKey ? OpenLayers.Handler.MOD_META : 0);
-
+
/* if it differs from the handler object's key mask,
bail out of the event handler */
return (keyModifiers == this.keyMask);
@@ -10282,8 +10282,8 @@ OpenLayers.Handler = OpenLayers.Class({
/**
* APIMethod: activate
* Turn on the handler. Returns false if the handler was already active.
- *
- * Returns:
+ *
+ * Returns:
* {Boolean} The handler was activated.
*/
activate: function() {
@@ -10294,17 +10294,17 @@ OpenLayers.Handler = OpenLayers.Class({
var events = OpenLayers.Events.prototype.BROWSER_EVENTS;
for (var i=0, len=events.length; i will be
* true and all mouse related listeners will do nothing.
*/
@@ -10339,9 +10339,9 @@ OpenLayers.Handler = OpenLayers.Class({
];
for (var i=0, len=events.length; i, controls can also ignore clicks
* that include a drag. Create a new instance with the
* constructor.
- *
+ *
* Inherits from:
- * -
+ * -
*/
OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
/**
@@ -10481,20 +10481,20 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
* considered a double-click.
*/
delay: 300,
-
+
/**
* APIProperty: single
* {Boolean} Handle single clicks. Default is true. If false, clicks
* will not be reported. If true, single-clicks will be reported.
*/
single: true,
-
+
/**
* APIProperty: double
* {Boolean} Handle double-clicks. Default is false.
*/
'double': false,
-
+
/**
* APIProperty: pixelTolerance
* {Number} Maximum number of pixels between mouseup and mousedown for an
@@ -10504,30 +10504,30 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
* constructed.
*/
pixelTolerance: 0,
-
+
/**
* APIProperty: dblclickTolerance
- * {Number} Maximum distance in pixels between clicks for a sequence of
+ * {Number} Maximum distance in pixels between clicks for a sequence of
* events to be considered a double click. Default is 13. If the
* distance between two clicks is greater than this value, a double-
* click will not be fired.
*/
dblclickTolerance: 13,
-
+
/**
* APIProperty: stopSingle
* {Boolean} Stop other listeners from being notified of clicks. Default
- * is false. If true, any listeners registered before this one for
+ * is false. If true, any listeners registered before this one for
* click or rightclick events will not be notified.
*/
stopSingle: false,
-
+
/**
* APIProperty: stopDouble
* {Boolean} Stop other listeners from being notified of double-clicks.
* Default is false. If true, any click listeners registered before
* this one will not be notified of *any* double-click events.
- *
+ *
* The one caveat with stopDouble is that given a map with two click
* handlers, one with stopDouble true and the other with stopSingle
* true, the stopSingle handler should be activated last to get
@@ -10543,7 +10543,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
* {Number} The id of the timeout waiting to clear the .
*/
timerId: null,
-
+
/**
* Property: down
* {Object} Object that store relevant information about the last
@@ -10562,24 +10562,24 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
*/
last: null,
- /**
+ /**
* Property: first
- * {Object} When waiting for double clicks, this object will store
+ * {Object} When waiting for double clicks, this object will store
* information about the first click in a two click sequence.
*/
first: null,
/**
* Property: rightclickTimerId
- * {Number} The id of the right mouse timeout waiting to clear the
+ * {Number} The id of the right mouse timeout waiting to clear the
* .
*/
rightclickTimerId: null,
-
+
/**
* Constructor: OpenLayers.Handler.Click
* Create a new click handler.
- *
+ *
* Parameters:
* control - {} The control that is making use of
* this handler. If a handler is being used without a control, the
@@ -10592,7 +10592,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
* options - {Object} Optional object whose properties will be set on the
* handler.
*/
-
+
/**
* Method: touchstart
* Handle touchstart.
@@ -10606,7 +10606,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
this.last = this.getEventInfo(evt);
return true;
},
-
+
/**
* Method: touchmove
* Store position of last move, because touchend event can have
@@ -10655,7 +10655,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
/**
* Method: mouseup
* Handle mouseup. Installed to support collection of right mouse events.
- *
+ *
* Returns:
* {Boolean} Continue propagating this event.
*/
@@ -10672,47 +10672,47 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
return propagate;
},
-
+
/**
* Method: rightclick
- * Handle rightclick. For a dblrightclick, we get two clicks so we need
- * to always register for dblrightclick to properly handle single
+ * Handle rightclick. For a dblrightclick, we get two clicks so we need
+ * to always register for dblrightclick to properly handle single
* clicks.
- *
+ *
* Returns:
* {Boolean} Continue propagating this event.
*/
rightclick: function(evt) {
if(this.passesTolerance(evt)) {
if(this.rightclickTimerId != null) {
- //Second click received before timeout this must be
+ //Second click received before timeout this must be
// a double click
this.clearTimer();
this.callback('dblrightclick', [evt]);
return !this.stopDouble;
- } else {
- //Set the rightclickTimerId, send evt only if double is
+ } else {
+ //Set the rightclickTimerId, send evt only if double is
// true else trigger single
var clickEvent = this['double'] ?
- OpenLayers.Util.extend({}, evt) :
+ OpenLayers.Util.extend({}, evt) :
this.callback('rightclick', [evt]);
var delayedRightCall = OpenLayers.Function.bind(
- this.delayedRightCall,
- this,
+ this.delayedRightCall,
+ this,
clickEvent
);
this.rightclickTimerId = window.setTimeout(
delayedRightCall, this.delay
);
- }
+ }
}
return !this.stopSingle;
},
-
+
/**
* Method: delayedRightCall
- * Sets to null. And optionally triggers the
+ * Sets to null. And optionally triggers the
* rightclick callback if evt is set.
*/
delayedRightCall: function(evt) {
@@ -10721,7 +10721,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
this.callback('rightclick', [evt]);
}
},
-
+
/**
* Method: click
* Handle click events from the browser. This is registered as a listener
@@ -10746,7 +10746,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
* dblclick to properly handle single clicks. This method is registered
* as a listener for the dblclick browser event. It should *not* be
* called by other methods in this handler.
- *
+ *
* Returns:
* {Boolean} Continue propagating this event.
*/
@@ -10754,8 +10754,8 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
this.handleDouble(evt);
return !this.stopDouble;
},
-
- /**
+
+ /**
* Method: handleDouble
* Handle double-click sequence.
*/
@@ -10768,8 +10768,8 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
this.clearTimer();
}
},
-
- /**
+
+ /**
* Method: handleSingle
* Handle single click sequence.
*/
@@ -10794,7 +10794,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
// remember the first click info so we can compare to the second
this.first = this.getEventInfo(evt);
// set the timer, send evt only if single is true
- //use a clone of the event object because it will no longer
+ //use a clone of the event object because it will no longer
//be a valid event object in IE in the timer callback
var clickEvent = this.single ?
OpenLayers.Util.extend({}, evt) : null;
@@ -10802,8 +10802,8 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
}
}
},
-
- /**
+
+ /**
* Method: queuePotentialClick
* This method is separated out largely to make testing easier (so we
* don't have to override window.setTimeout)
@@ -10832,13 +10832,13 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
passes = this.pixelTolerance >= this.down.xy.distanceTo(evt.xy);
// for touch environments, we also enforce that all touches
// start and end within the given tolerance to be considered a click
- if (passes && this.touch &&
+ if (passes && this.touch &&
this.down.touches.length === this.last.touches.length) {
// the touchend event doesn't come with touches, so we check
// down and last
for (var i=0, ii=this.down.touches.length; i this.pixelTolerance) {
passes = false;
@@ -10849,8 +10849,8 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
}
return passes;
},
-
- /**
+
+ /**
* Method: getTouchDistance
*
* Returns:
@@ -10862,10 +10862,10 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
Math.pow(from.clientY - to.clientY, 2)
);
},
-
+
/**
* Method: passesDblclickTolerance
- * Determine whether the event is within the optional double-cick pixel
+ * Determine whether the event is within the optional double-cick pixel
* tolerance.
*
* Returns:
@@ -10893,7 +10893,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
this.rightclickTimerId = null;
}
},
-
+
/**
* Method: delayedCall
* Sets to null. And optionally triggers the click callback if
@@ -10909,7 +10909,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
/**
* Method: getEventInfo
* This method allows us to store event information without storing the
- * actual event. In touch devices (at least), the same event is
+ * actual event. In touch devices (at least), the same event is
* modified between touchstart, touchmove, and touchend.
*
* Returns:
@@ -10991,8 +10991,8 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
* -
*/
OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
-
- /**
+
+ /**
* Property: started
* {Boolean} When a mousedown or touchstart event is received, we want to
* record it, but not set 'dragging' until the mouse moves after starting.
@@ -11006,19 +11006,19 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
*/
stopDown: true,
- /**
- * Property: dragging
- * {Boolean}
+ /**
+ * Property: dragging
+ * {Boolean}
*/
dragging: false,
- /**
+ /**
* Property: last
* {} The last pixel location of the drag.
*/
last: null,
- /**
+ /**
* Property: start
* {} The first pixel location of the drag.
*/
@@ -11037,31 +11037,31 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
* {Function}
*/
oldOnselectstart: null,
-
+
/**
* Property: interval
- * {Integer} In order to increase performance, an interval (in
- * milliseconds) can be set to reduce the number of drag events
- * called. If set, a new drag event will not be set until the
- * interval has passed.
- * Defaults to 0, meaning no interval.
+ * {Integer} In order to increase performance, an interval (in
+ * milliseconds) can be set to reduce the number of drag events
+ * called. If set, a new drag event will not be set until the
+ * interval has passed.
+ * Defaults to 0, meaning no interval.
*/
interval: 0,
-
+
/**
* Property: timeoutId
* {String} The id of the timeout used for the mousedown interval.
* This is "private", and should be left alone.
*/
timeoutId: null,
-
+
/**
* APIProperty: documentDrag
* {Boolean} If set to true, the handler will also handle mouse moves when
* the cursor has moved out of the map viewport. Default is false.
*/
documentDrag: false,
-
+
/**
* Property: documentEvents
* {Boolean} Are we currently observing document events?
@@ -11071,7 +11071,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
/**
* Constructor: OpenLayers.Handler.Drag
* Returns OpenLayers.Handler.Drag
- *
+ *
* Parameters:
* control - {} The control that is making use of
* this handler. If a handler is being used without a control, the
@@ -11082,11 +11082,11 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
* expect to recieve a single argument, the pixel location of the event.
* Callbacks for 'move' and 'done' are supported. You can also speficy
* callbacks for 'down', 'up', and 'out' to respond to those events.
- * options - {Object}
+ * options - {Object}
*/
initialize: function(control, callbacks, options) {
OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-
+
if (this.documentDrag === true) {
var me = this;
this._docMove = function(evt) {
@@ -11101,7 +11101,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
}
},
-
+
/**
* Method: dragstart
* This private method is factorized from mousedown and touchstart methods
@@ -11393,7 +11393,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
this.addDocumentEvents();
} else {
var dragged = (this.start != this.last);
- this.started = false;
+ this.started = false;
this.dragging = false;
OpenLayers.Element.removeClass(
this.map.viewPortDiv, "olDragDown"
@@ -11414,12 +11414,12 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
/**
* Method: click
* The drag handler captures the click event. If something else registers
- * for clicks on the same element, its listener will not be called
+ * for clicks on the same element, its listener will not be called
* after a drag.
- *
- * Parameters:
- * evt - {Event}
- *
+ *
+ * Parameters:
+ * evt - {Event}
+ *
* Returns:
* {Boolean} Let the event propagate.
*/
@@ -11431,7 +11431,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
/**
* Method: activate
* Activate the handler.
- *
+ *
* Returns:
* {Boolean} The handler was successfully activated.
*/
@@ -11445,9 +11445,9 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
},
/**
- * Method: deactivate
+ * Method: deactivate
* Deactivate the handler.
- *
+ *
* Returns:
* {Boolean} The handler was successfully deactivated.
*/
@@ -11465,13 +11465,13 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
}
return deactivated;
},
-
+
/**
* Method: adjustXY
* Converts event coordinates that are relative to the document body to
* ones that are relative to the map viewport. The latter is the default in
* OpenLayers.
- *
+ *
* Parameters:
* evt - {Object}
*/
@@ -11480,7 +11480,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
evt.xy.x -= pos[0];
evt.xy.y -= pos[1];
},
-
+
/**
* Method: addDocumentEvents
* Start observing document events when documentDrag is true and the mouse
@@ -11492,7 +11492,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
OpenLayers.Event.observe(document, "mousemove", this._docMove);
OpenLayers.Event.observe(document, "mouseup", this._docUp);
},
-
+
/**
* Method: removeDocumentEvents
* Stops observing document events when documentDrag is true and the mouse
@@ -11516,7 +11516,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
-/**
+/**
* @requires OpenLayers/Control.js
* @requires OpenLayers/BaseTypes.js
* @requires OpenLayers/Events/buttonclick.js
@@ -11527,8 +11527,8 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
/**
* Class: OpenLayers.Control.OverviewMap
- * The OverMap control creates a small overview map, useful to display the
- * extent of a zoomed map and your main map and provide additional
+ * The OverMap control creates a small overview map, useful to display the
+ * extent of a zoomed map and your main map and provide additional
* navigation options to the User. By default the overview map is drawn in
* the lower right corner of the main map. Create a new overview map with the
* constructor.
@@ -11543,7 +11543,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
* {DOMElement} The DOM element that contains the overview map
*/
element: null,
-
+
/**
* APIProperty: ovmap
* {} A reference to the overview map itself.
@@ -11565,7 +11565,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
* If none are sent at construction, the base layer for the main map is used.
*/
layers: null,
-
+
/**
* APIProperty: minRectSize
* {Integer} The minimum width or height (in pixels) of the extent
@@ -11574,7 +11574,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
* property. Default is 15 pixels.
*/
minRectSize: 15,
-
+
/**
* APIProperty: minRectDisplayClass
* {String} Replacement style class name for the extent rectangle when
@@ -11607,7 +11607,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
* resolution at which to zoom farther in on the overview map.
*/
maxRatio: 32,
-
+
/**
* APIProperty: mapOptions
* {Object} An object containing any non-default properties to be sent to
@@ -11624,7 +11624,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
* to the center.
*/
autoPan: false,
-
+
/**
* Property: handlers
* {Object}
@@ -11645,16 +11645,16 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
/**
* APIProperty: maximizeTitle
- * {String} This property is used for showing a tooltip over the
+ * {String} This property is used for showing a tooltip over the
* maximize div. Defaults to "" (no title).
- */
+ */
maximizeTitle: "",
/**
* APIProperty: minimizeTitle
- * {String} This property is used for showing a tooltip over the
+ * {String} This property is used for showing a tooltip over the
* minimize div. Defaults to "" (no title).
- */
+ */
minimizeTitle: "",
/**
@@ -11671,7 +11671,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
this.handlers = {};
OpenLayers.Control.prototype.initialize.apply(this, [options]);
},
-
+
/**
* APIMethod: destroy
* Deconstruct the control
@@ -11699,7 +11699,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
this.ovmap.destroy();
this.ovmap = null;
}
-
+
this.element.removeChild(this.mapDiv);
this.mapDiv = null;
@@ -11710,7 +11710,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
this.div.removeChild(this.maximizeDiv);
this.maximizeDiv = null;
}
-
+
if (this.minimizeDiv) {
this.div.removeChild(this.minimizeDiv);
this.minimizeDiv = null;
@@ -11723,13 +11723,13 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
scope: this
});
- OpenLayers.Control.prototype.destroy.apply(this, arguments);
+ OpenLayers.Control.prototype.destroy.apply(this, arguments);
},
/**
* Method: draw
* Render the control in the browser.
- */
+ */
draw: function() {
OpenLayers.Control.prototype.draw.apply(this, arguments);
if (this.layers.length === 0) {
@@ -11753,13 +11753,13 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
this.mapDiv.style.position = 'relative';
this.mapDiv.style.overflow = 'hidden';
this.mapDiv.id = OpenLayers.Util.createUniqueID('overviewMap');
-
+
this.extentRectangle = document.createElement('div');
this.extentRectangle.style.position = 'absolute';
this.extentRectangle.style.zIndex = 1000; //HACK
this.extentRectangle.className = this.displayClass+'ExtentRectangle';
- this.element.appendChild(this.mapDiv);
+ this.element.appendChild(this.mapDiv);
this.div.appendChild(this.element);
@@ -11770,10 +11770,10 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
// maximize button div
var img = OpenLayers.Util.getImageLocation('layer-switcher-maximize.png');
this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(
- this.displayClass + 'MaximizeButton',
- null,
- null,
- img,
+ this.displayClass + 'MaximizeButton',
+ null,
+ null,
+ img,
'absolute');
this.maximizeDiv.style.display = 'none';
this.maximizeDiv.className = this.displayClass + 'MaximizeButton olButton';
@@ -11781,21 +11781,21 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
this.maximizeDiv.title = this.maximizeTitle;
}
this.div.appendChild(this.maximizeDiv);
-
+
// minimize button div
var img = OpenLayers.Util.getImageLocation('layer-switcher-minimize.png');
this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv(
- 'OpenLayers_Control_minimizeDiv',
- null,
- null,
- img,
+ 'OpenLayers_Control_minimizeDiv',
+ null,
+ null,
+ img,
'absolute');
this.minimizeDiv.style.display = 'none';
this.minimizeDiv.className = this.displayClass + 'MinimizeButton olButton';
if (this.minimizeTitle) {
this.minimizeDiv.title = this.minimizeTitle;
}
- this.div.appendChild(this.minimizeDiv);
+ this.div.appendChild(this.minimizeDiv);
this.minimizeControl();
} else {
// show the overview map
@@ -11804,19 +11804,19 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
if(this.map.getExtent()) {
this.update();
}
-
+
this.map.events.on({
buttonclick: this.onButtonClick,
moveend: this.update,
scope: this
});
-
+
if (this.maximized) {
this.maximizeControl();
}
return this.div;
},
-
+
/**
* Method: baseLayerDraw
* Draw the base layer - called if unable to complete in the initial draw
@@ -11854,7 +11854,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
newTop));
}
},
-
+
/**
* Method: mapDivClick
* Handle browser events
@@ -11880,7 +11880,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
newTop));
this.updateMapToRect();
},
-
+
/**
* Method: onButtonClick
*
@@ -11906,15 +11906,15 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
this.element.style.display = '';
this.showToggle(false);
if (e != null) {
- OpenLayers.Event.stop(e);
+ OpenLayers.Event.stop(e);
}
},
/**
* Method: minimizeControl
- * Hide all the contents of the control, shrink the size,
+ * Hide all the contents of the control, shrink the size,
* add the maximize icon
- *
+ *
* Parameters:
* e - {}
*/
@@ -11922,7 +11922,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
this.element.style.display = 'none';
this.showToggle(true);
if (e != null) {
- OpenLayers.Event.stop(e);
+ OpenLayers.Event.stop(e);
}
},
@@ -11931,7 +11931,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
* Hide/Show the toggle depending on whether the control is minimized
*
* Parameters:
- * minimize - {Boolean}
+ * minimize - {Boolean}
*/
showToggle: function(minimize) {
if (this.maximizeDiv) {
@@ -11950,15 +11950,15 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
if(this.ovmap == null) {
this.createMap();
}
-
+
if(this.autoPan || !this.isSuitableOverview()) {
this.updateOverview();
}
-
+
// update extent rectangle
this.updateRectToMap();
},
-
+
/**
* Method: isSuitableOverview
* Determines if the overview map is suitable given the extent and
@@ -11971,7 +11971,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
Math.max(mapExtent.left, maxExtent.left),
Math.max(mapExtent.bottom, maxExtent.bottom),
Math.min(mapExtent.right, maxExtent.right),
- Math.min(mapExtent.top, maxExtent.top));
+ Math.min(mapExtent.top, maxExtent.top));
if (this.ovmap.getProjection() != this.map.getProjection()) {
testExtent = testExtent.transform(
@@ -11984,7 +11984,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
(resRatio <= this.maxRatio) &&
(this.ovmap.getExtent().containsBounds(testExtent)));
},
-
+
/**
* Method updateOverview
* Called by if returns true
@@ -11995,7 +11995,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
var resRatio = targetRes / mapRes;
if(resRatio > this.maxRatio) {
// zoom in overview map
- targetRes = this.minRatio * mapRes;
+ targetRes = this.minRatio * mapRes;
} else if(resRatio <= this.minRatio) {
// zoom out overview map
targetRes = this.maxRatio * mapRes;
@@ -12012,7 +12012,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
targetRes * this.resolutionFactor));
this.updateRectToMap();
},
-
+
/**
* Method: createMap
* Construct the map that this control contains
@@ -12020,15 +12020,15 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
createMap: function() {
// create the overview map
var options = OpenLayers.Util.extend(
- {controls: [], maxResolution: 'auto',
+ {controls: [], maxResolution: 'auto',
fallThrough: false}, this.mapOptions);
this.ovmap = new OpenLayers.Map(this.mapDiv, options);
this.ovmap.viewPortDiv.appendChild(this.extentRectangle);
-
+
// prevent ovmap from being destroyed when the page unloads, because
// the OverviewMap control has to do this (and does it).
OpenLayers.Event.stopObserving(window, 'unload', this.ovmap.unloadDestroy);
-
+
this.ovmap.addLayers(this.layers);
this.ovmap.zoomToMaxExtent();
// check extent rectangle border width
@@ -12058,7 +12058,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
}
);
this.handlers.click.activate();
-
+
this.rectEvents = new OpenLayers.Events(this, this.extentRectangle,
null, true);
this.rectEvents.register("mouseover", this, function(e) {
@@ -12082,7 +12082,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
OpenLayers.INCHES_PER_UNIT[targetUnits] : 1;
}
},
-
+
/**
* Method: updateRectToMap
* Updates the extent rectangle position and size to match the map extent
@@ -12092,7 +12092,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
var bounds;
if (this.ovmap.getProjection() != this.map.getProjection()) {
bounds = this.map.getExtent().transform(
- this.map.getProjectionObject(),
+ this.map.getProjectionObject(),
this.ovmap.getProjectionObject() );
} else {
bounds = this.map.getExtent();
@@ -12102,7 +12102,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
this.setRectPxBounds(pxBounds);
}
},
-
+
/**
* Method: updateMapToRect
* Updates the map extent to match the extent rectangle position and size
@@ -12226,7 +12226,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
var size = this.ovmap.size;
var res = this.ovmap.getResolution();
var center = this.ovmap.getExtent().getCenterLonLat();
-
+
var deltaX = overviewMapPx.x - (size.w / 2);
var deltaY = overviewMapPx.y - (size.h / 2);
@@ -12245,7 +12245,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
* object with a 'lon' and 'lat' properties.
*
* Returns:
- * {Object} Location which is the passed-in OpenLayers.LonLat,
+ * {Object} Location which is the passed-in OpenLayers.LonLat,
* translated into overview map pixels
*/
getOverviewPxFromLonLat: function(lonlat) {
@@ -12256,7 +12256,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
x: Math.round(1/res * (lonlat.lon - extent.left)),
y: Math.round(1/res * (extent.top - lonlat.lat))
};
- }
+ }
},
CLASS_NAME: 'OpenLayers.Control.OverviewMap'
@@ -12288,13 +12288,13 @@ OpenLayers.Layer = OpenLayers.Class({
*/
id: null,
- /**
+ /**
* APIProperty: name
* {String}
*/
name: null,
- /**
+ /**
* APIProperty: div
* {DOMElement}
*/
@@ -12309,20 +12309,20 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* APIProperty: alwaysInRange
- * {Boolean} If a layer's display should not be scale-based, this should
- * be set to true. This will cause the layer, as an overlay, to always
- * be 'active', by always returning true from the calculateInRange()
- * function.
- *
- * If not explicitly specified for a layer, its value will be
- * determined on startup in initResolutions() based on whether or not
- * any scale-specific properties have been set as options on the
- * layer. If no scale-specific options have been set on the layer, we
+ * {Boolean} If a layer's display should not be scale-based, this should
+ * be set to true. This will cause the layer, as an overlay, to always
+ * be 'active', by always returning true from the calculateInRange()
+ * function.
+ *
+ * If not explicitly specified for a layer, its value will be
+ * determined on startup in initResolutions() based on whether or not
+ * any scale-specific properties have been set as options on the
+ * layer. If no scale-specific options have been set on the layer, we
* assume that it should always be in range.
- *
+ *
* See #987 for more info.
*/
- alwaysInRange: null,
+ alwaysInRange: null,
/**
* Constant: RESOLUTION_PROPERTIES
@@ -12353,12 +12353,12 @@ OpenLayers.Layer = OpenLayers.Class({
* element - {DOMElement} A reference to layer.events.element.
*
* Supported map event types:
- * loadstart - Triggered when layer loading starts. When using a Vector
- * layer with a Fixed or BBOX strategy, the event object includes
- * a *filter* property holding the OpenLayers.Filter used when
+ * loadstart - Triggered when layer loading starts. When using a Vector
+ * layer with a Fixed or BBOX strategy, the event object includes
+ * a *filter* property holding the OpenLayers.Filter used when
* calling read on the protocol.
* loadend - Triggered when layer loading ends. When using a Vector layer
- * with a Fixed or BBOX strategy, the event object includes a
+ * with a Fixed or BBOX strategy, the event object includes a
* *response* property holding an OpenLayers.Protocol.Response object.
* visibilitychanged - Triggered when the layer's visibility property is
* changed, e.g. by turning the layer on or off in the layer switcher.
@@ -12381,25 +12381,25 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* APIProperty: map
- * {} This variable is set when the layer is added to
+ * {} This variable is set when the layer is added to
* the map, via the accessor function setMap().
*/
map: null,
-
+
/**
* APIProperty: isBaseLayer
- * {Boolean} Whether or not the layer is a base layer. This should be set
+ * {Boolean} Whether or not the layer is a base layer. This should be set
* individually by all subclasses. Default is false
*/
isBaseLayer: false,
-
+
/**
* Property: alpha
* {Boolean} The layer's images have an alpha channel. Default is false.
*/
alpha: false,
- /**
+ /**
* APIProperty: displayInLayerSwitcher
* {Boolean} Display the layer's name in the layer switcher. Default is
* true.
@@ -12414,29 +12414,29 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* APIProperty: attribution
- * {String} Attribution string, displayed when an
+ * {String} Attribution string, displayed when an
* has been added to the map.
*/
- attribution: null,
+ attribution: null,
- /**
+ /**
* Property: inRange
- * {Boolean} The current map resolution is within the layer's min/max
- * range. This is set in whenever the zoom
+ * {Boolean} The current map resolution is within the layer's min/max
+ * range. This is set in whenever the zoom
* changes.
*/
inRange: false,
-
+
/**
* Propery: imageSize
- * {} For layers with a gutter, the image is larger than
+ * {} For layers with a gutter, the image is larger than
* the tile by twice the gutter in each dimension.
*/
imageSize: null,
-
+
// OPTIONS
- /**
+ /**
* Property: options
* {Object} An optional object whose properties will be set on the layer.
* Any of the layer properties can be set as a property of the options
@@ -12462,8 +12462,8 @@ OpenLayers.Layer = OpenLayers.Class({
* at tile edges to be ignored. Set a gutter value that is equal to
* half the size of the widest symbol that needs to be displayed.
* Defaults to zero. Non-tiled layers always have zero gutter.
- */
- gutter: 0,
+ */
+ gutter: 0,
/**
* APIProperty: projection
@@ -12478,14 +12478,14 @@ OpenLayers.Layer = OpenLayers.Class({
* maxResolution or resolutions as appropriate.
* When using vector layers with strategies, layer projection should be set
* to the projection of the source data if that is different from the map default.
- *
+ *
* Can be either a string or an object;
* if a string is passed, will be converted to an object when
* the layer is added to the map.
- *
+ *
*/
- projection: null,
-
+ projection: null,
+
/**
* APIProperty: units
* {String} The layer map units. Defaults to null. Possible values
@@ -12515,20 +12515,20 @@ OpenLayers.Layer = OpenLayers.Class({
* maxResolution, maxScale, etc.).
*/
resolutions: null,
-
+
/**
* APIProperty: maxExtent
* {|Array} If provided as an array, the array
* should consist of four values (left, bottom, right, top).
* The maximum extent for the layer. Defaults to null.
- *
+ *
* The center of these bounds will not stray outside
* of the viewport extent during panning. In addition, if
* is set to false, data will not be
* requested that falls completely outside of these bounds.
*/
maxExtent: null,
-
+
/**
* APIProperty: minExtent
* {|Array} If provided as an array, the array
@@ -12536,11 +12536,11 @@ OpenLayers.Layer = OpenLayers.Class({
* The minimum extent for the layer. Defaults to null.
*/
minExtent: null,
-
+
/**
* APIProperty: maxResolution
* {Float} Default max is 360 deg / 256 px, which corresponds to
- * zoom level 0 on gmaps. Specify a different value in the layer
+ * zoom level 0 on gmaps. Specify a different value in the layer
* options if you are not using the default
* and displaying the whole world.
*/
@@ -12557,13 +12557,13 @@ OpenLayers.Layer = OpenLayers.Class({
* {Integer}
*/
numZoomLevels: null,
-
+
/**
* APIProperty: minScale
* {Float}
*/
minScale: null,
-
+
/**
* APIProperty: maxScale
* {Float}
@@ -12572,7 +12572,7 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* APIProperty: displayOutsideMaxExtent
- * {Boolean} Request map tiles that are completely outside of the max
+ * {Boolean} Request map tiles that are completely outside of the max
* extent for this layer. Defaults to false.
*/
displayOutsideMaxExtent: false,
@@ -12582,17 +12582,17 @@ OpenLayers.Layer = OpenLayers.Class({
* {Boolean} Wraps the world at the international dateline, so the map can
* be panned infinitely in longitudinal direction. Only use this on the
* base layer, and only if the layer's maxExtent equals the world bounds.
- * #487 for more info.
+ * #487 for more info.
*/
wrapDateLine: false,
-
+
/**
* Property: metadata
* {Object} This object can be used to store additional information on a
* layer object.
*/
metadata: null,
-
+
/**
* Constructor: OpenLayers.Layer
*
@@ -12603,7 +12603,7 @@ OpenLayers.Layer = OpenLayers.Class({
initialize: function(name, options) {
this.metadata = {};
-
+
options = OpenLayers.Util.extend({}, options);
// make sure we respect alwaysInRange if set on the prototype
if (this.alwaysInRange != null) {
@@ -12612,7 +12612,7 @@ OpenLayers.Layer = OpenLayers.Class({
this.addOptions(options);
this.name = name;
-
+
if (this.id == null) {
this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
@@ -12629,7 +12629,7 @@ OpenLayers.Layer = OpenLayers.Class({
}
},
-
+
/**
* Method: destroy
* Destroy is a destructor: this is to alleviate cyclic references which
@@ -12661,7 +12661,7 @@ OpenLayers.Layer = OpenLayers.Class({
this.eventListeners = null;
this.events = null;
},
-
+
/**
* Method: clone
*
@@ -12672,27 +12672,27 @@ OpenLayers.Layer = OpenLayers.Class({
* {} An exact clone of this
*/
clone: function (obj) {
-
+
if (obj == null) {
obj = new OpenLayers.Layer(this.name, this.getOptions());
}
-
+
// catch any randomly tagged-on properties
OpenLayers.Util.applyDefaults(obj, this);
-
+
// a cloned layer should never have its map property set
- // because it has not been added to a map yet.
+ // because it has not been added to a map yet.
obj.map = null;
-
+
return obj;
},
-
+
/**
* Method: getOptions
* Extracts an object from the layer with the properties that were set as
* options, but updates them with the values currently set on the
* instance.
- *
+ *
* Returns:
* {Object} the of the layer, representing the current state.
*/
@@ -12703,8 +12703,8 @@ OpenLayers.Layer = OpenLayers.Class({
}
return options;
},
-
- /**
+
+ /**
* APIMethod: setName
* Sets the new layer name for this layer. Can trigger a changelayer event
* on the map.
@@ -12722,11 +12722,11 @@ OpenLayers.Layer = OpenLayers.Class({
});
}
}
- },
-
+ },
+
/**
* APIMethod: addOptions
- *
+ *
* Parameters:
* newOptions - {Object}
* reinitialize - {Boolean} If set to true, and if resolution options of the
@@ -12739,7 +12739,7 @@ OpenLayers.Layer = OpenLayers.Class({
if (this.options == null) {
this.options = {};
}
-
+
if (newOptions) {
// make sure this.projection references a projection object
if(typeof newOptions.projection == "string") {
@@ -12765,7 +12765,7 @@ OpenLayers.Layer = OpenLayers.Class({
// add new options to this
OpenLayers.Util.extend(this, newOptions);
-
+
// get the units from the projection, if we have a projection
// and it it has units
if(this.projection && this.projection.getUnits()) {
@@ -12811,7 +12811,7 @@ OpenLayers.Layer = OpenLayers.Class({
* This function can be implemented by subclasses
*/
onMapResize: function() {
- //this function can be implemented by subclasses
+ //this function can be implemented by subclasses
},
/**
@@ -12844,7 +12844,7 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* Method: moveTo
- *
+ *
* Parameters:
* bounds - {}
* zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
@@ -12873,20 +12873,20 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* Method: setMap
* Set the map property for the layer. This is done through an accessor
- * so that subclasses can override this and take special action once
- * they have their map variable set.
- *
- * Here we take care to bring over any of the necessary default
- * properties from the map.
- *
+ * so that subclasses can override this and take special action once
+ * they have their map variable set.
+ *
+ * Here we take care to bring over any of the necessary default
+ * properties from the map.
+ *
* Parameters:
* map - {}
*/
setMap: function(map) {
if (this.map == null) {
-
+
this.map = map;
-
+
// grab some essential layer data from the map if it hasn't already
// been set
this.maxExtent = this.maxExtent || this.map.maxExtent;
@@ -12901,20 +12901,20 @@ OpenLayers.Layer = OpenLayers.Class({
// to properties.
this.units = this.projection.getUnits() ||
this.units || this.map.units;
-
+
this.initResolutions();
-
+
if (!this.isBaseLayer) {
this.inRange = this.calculateInRange();
var show = ((this.visibility) && (this.inRange));
this.div.style.display = show ? "" : "none";
}
-
+
// deal with gutters
this.setTileSize();
}
},
-
+
/**
* Method: afterAdd
* Called at the end of the map.addLayer sequence. At this point, the map
@@ -12922,23 +12922,23 @@ OpenLayers.Layer = OpenLayers.Class({
*/
afterAdd: function() {
},
-
+
/**
* APIMethod: removeMap
- * Just as setMap() allows each layer the possibility to take a
+ * Just as setMap() allows each layer the possibility to take a
* personalized action on being added to the map, removeMap() allows
- * each layer to take a personalized action on being removed from it.
+ * each layer to take a personalized action on being removed from it.
* For now, this will be mostly unused, except for the EventPane layer,
* which needs this hook so that it can remove the special invisible
- * pane.
- *
+ * pane.
+ *
* Parameters:
* map - {}
*/
removeMap: function(map) {
//to be overridden by subclasses
},
-
+
/**
* APIMethod: getImageSize
*
@@ -12946,20 +12946,20 @@ OpenLayers.Layer = OpenLayers.Class({
* bounds - {} optional tile bounds, can be used
* by subclasses that have to deal with different tile sizes at the
* layer extent edges (e.g. Zoomify)
- *
+ *
* Returns:
- * {} The size that the image should be, taking into
+ * {} The size that the image should be, taking into
* account gutters.
- */
- getImageSize: function(bounds) {
- return (this.imageSize || this.tileSize);
- },
-
+ */
+ getImageSize: function(bounds) {
+ return (this.imageSize || this.tileSize);
+ },
+
/**
* APIMethod: setTileSize
* Set the tile size based on the map size. This also sets layer.imageSize
* or use by Tile.Image.
- *
+ *
* Parameters:
* size - {}
*/
@@ -12975,14 +12975,14 @@ OpenLayers.Layer = OpenLayers.Class({
// this.name + ": layers with " +
// "gutters need non-null tile sizes");
//}
- this.imageSize = new OpenLayers.Size(tileSize.w + (2*this.gutter),
- tileSize.h + (2*this.gutter));
+ this.imageSize = new OpenLayers.Size(tileSize.w + (2*this.gutter),
+ tileSize.h + (2*this.gutter));
}
},
/**
* APIMethod: getVisibility
- *
+ *
* Returns:
* {Boolean} The layer should be displayed (if in range).
*/
@@ -12990,18 +12990,18 @@ OpenLayers.Layer = OpenLayers.Class({
return this.visibility;
},
- /**
+ /**
* APIMethod: setVisibility
- * Set the visibility flag for the layer and hide/show & redraw
+ * Set the visibility flag for the layer and hide/show & redraw
* accordingly. Fire event unless otherwise specified
- *
+ *
* Note that visibility is no longer simply whether or not the layer's
- * style.display is set to "block". Now we store a 'visibility' state
- * property on the layer class, this allows us to remember whether or
- * not we *desire* for a layer to be visible. In the case where the
- * map's resolution is out of the layer's range, this desire may be
+ * style.display is set to "block". Now we store a 'visibility' state
+ * property on the layer class, this allows us to remember whether or
+ * not we *desire* for a layer to be visible. In the case where the
+ * map's resolution is out of the layer's range, this desire may be
* subverted.
- *
+ *
* Parameters:
* visibility - {Boolean} Whether or not to display the layer (if in range)
*/
@@ -13020,12 +13020,12 @@ OpenLayers.Layer = OpenLayers.Class({
}
},
- /**
+ /**
* APIMethod: display
- * Hide or show the Layer. This is designed to be used internally, and
+ * Hide or show the Layer. This is designed to be used internally, and
* is not generally the way to enable or disable the layer. For that,
* use the setVisibility function instead..
- *
+ *
* Parameters:
* display - {Boolean}
*/
@@ -13037,10 +13037,10 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* APIMethod: calculateInRange
- *
+ *
* Returns:
* {Boolean} The layer is displayable at the current map's current
- * resolution. Note that if 'alwaysInRange' is true for the layer,
+ * resolution. Note that if 'alwaysInRange' is true for the layer,
* this function will always return true.
*/
calculateInRange: function() {
@@ -13058,9 +13058,9 @@ OpenLayers.Layer = OpenLayers.Class({
return inRange;
},
- /**
+ /**
* APIMethod: setIsBaseLayer
- *
+ *
* Parameters:
* isBaseLayer - {Boolean}
*/
@@ -13080,17 +13080,17 @@ OpenLayers.Layer = OpenLayers.Class({
/* Baselayer Functions */
/* */
/********************************************************/
-
- /**
+
+ /**
* Method: initResolutions
- * This method's responsibility is to set up the 'resolutions' array
+ * This method's responsibility is to set up the 'resolutions' array
* for the layer -- this array is what the layer will use to interface
- * between the zoom levels of the map and the resolution display
+ * between the zoom levels of the map and the resolution display
* of the layer.
- *
+ *
* The user has several options that determine how the array is set up.
- *
- * For a detailed explanation, see the following wiki from the
+ *
+ * For a detailed explanation, see the following wiki from the
* openlayers.org homepage:
* http://trac.openlayers.org/wiki/SettingZoomLevels
*/
@@ -13350,7 +13350,7 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* APIMethod: getResolution
- *
+ *
* Returns:
* {Float} The currently selected resolution of the map, taken from the
* resolutions array, indexed by current zoom level.
@@ -13360,11 +13360,11 @@ OpenLayers.Layer = OpenLayers.Class({
return this.getResolutionForZoom(zoom);
},
- /**
+ /**
* APIMethod: getExtent
- *
+ *
* Returns:
- * {} A Bounds object which represents the lon/lat
+ * {} A Bounds object which represents the lon/lat
* bounds of the current viewPort.
*/
getExtent: function() {
@@ -13376,18 +13376,18 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* APIMethod: getZoomForExtent
- *
+ *
* Parameters:
* extent - {}
- * closest - {Boolean} Find the zoom level that most closely fits the
- * specified bounds. Note that this may result in a zoom that does
+ * closest - {Boolean} Find the zoom level that most closely fits the
+ * specified bounds. Note that this may result in a zoom that does
* not exactly contain the entire extent.
* Default is false.
*
* Returns:
- * {Integer} The index of the zoomLevel (entry in the resolutions array)
- * for the passed-in extent. We do this by calculating the ideal
- * resolution for the given extent (based on the map size) and then
+ * {Integer} The index of the zoomLevel (entry in the resolutions array)
+ * for the passed-in extent. We do this by calculating the ideal
+ * resolution for the given extent (based on the map size) and then
* calling getZoomForResolution(), passing along the 'closest'
* parameter.
*/
@@ -13398,12 +13398,12 @@ OpenLayers.Layer = OpenLayers.Class({
return this.getZoomForResolution(idealResolution, closest);
},
-
- /**
+
+ /**
* Method: getDataExtent
* Calculates the max extent which includes all of the data for the layer.
* This function is to be implemented by subclasses.
- *
+ *
* Returns:
* {}
*/
@@ -13413,10 +13413,10 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* APIMethod: getResolutionForZoom
- *
+ *
* Parameters:
* zoom - {Float}
- *
+ *
* Returns:
* {Float} A suitable resolution for the specified zoom.
*/
@@ -13436,20 +13436,20 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* APIMethod: getZoomForResolution
- *
+ *
* Parameters:
* resolution - {Float}
- * closest - {Boolean} Find the zoom level that corresponds to the absolute
+ * closest - {Boolean} Find the zoom level that corresponds to the absolute
* closest resolution, which may result in a zoom whose corresponding
* resolution is actually smaller than we would have desired (if this
* is being called from a getZoomForExtent() call, then this means that
- * the returned zoom index might not actually contain the entire
+ * the returned zoom index might not actually contain the entire
* extent specified... but it'll be close).
* Default is false.
- *
+ *
* Returns:
- * {Integer} The index of the zoomLevel (entry in the resolutions array)
- * that corresponds to the best fit resolution given the passed in
+ * {Integer} The index of the zoomLevel (entry in the resolutions array)
+ * that corresponds to the best fit resolution given the passed in
* value and the 'closest' specification.
*/
getZoomForResolution: function(resolution, closest) {
@@ -13481,7 +13481,7 @@ OpenLayers.Layer = OpenLayers.Class({
} else {
var diff;
var minDiff = Number.POSITIVE_INFINITY;
- for(i=0, len=this.resolutions.length; i minDiff) {
@@ -13498,17 +13498,17 @@ OpenLayers.Layer = OpenLayers.Class({
}
return zoom;
},
-
+
/**
* APIMethod: getLonLatFromViewPortPx
- *
+ *
* Parameters:
* viewPortPx - {|Object} An OpenLayers.Pixel or
* an object with a 'x'
* and 'y' properties.
*
* Returns:
- * {} An OpenLayers.LonLat which is the passed-in
+ * {} An OpenLayers.LonLat which is the passed-in
* view port