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 , translated into lon/lat by the layer. */ getLonLatFromViewPortPx: function (viewPortPx) { @@ -13532,33 +13532,33 @@ OpenLayers.Layer = OpenLayers.Class({ * APIMethod: getViewPortPxFromLonLat * Returns a pixel location given a map location. This method will return * fractional pixel values. - * + * * Parameters: * lonlat - {|Object} An OpenLayers.LonLat or * an object with a 'lon' * and 'lat' properties. * - * Returns: - * {} An which is the passed-in + * Returns: + * {} An which is the passed-in * lonlat translated into view port pixels. */ getViewPortPxFromLonLat: function (lonlat, resolution) { - var px = null; + var px = null; if (lonlat != null) { resolution = resolution || this.map.getResolution(); var extent = this.map.calculateBounds(null, resolution); px = new OpenLayers.Pixel( (1/resolution * (lonlat.lon - extent.left)), (1/resolution * (extent.top - lonlat.lat)) - ); + ); } return px; }, - + /** * APIMethod: setOpacity * Sets the opacity for the entire layer (all images) - * + * * Parameters: * opacity - {Float} */ @@ -13573,7 +13573,7 @@ OpenLayers.Layer = OpenLayers.Class({ if (lastChild && lastChild.nodeName.toLowerCase() === "iframe") { element = lastChild.parentNode; } - OpenLayers.Util.modifyDOMElement(element, null, null, null, + OpenLayers.Util.modifyDOMElement(element, null, null, null, null, null, null, opacity); } if (this.map != null) { @@ -13587,20 +13587,20 @@ OpenLayers.Layer = OpenLayers.Class({ /** * Method: getZIndex - * - * Returns: + * + * Returns: * {Integer} the z-index of this layer - */ + */ getZIndex: function () { return this.div.style.zIndex; }, /** * Method: setZIndex - * - * Parameters: + * + * Parameters: * zIndex - {Integer} - */ + */ setZIndex: function (zIndex) { this.div.style.zIndex = zIndex; }, @@ -13608,18 +13608,18 @@ OpenLayers.Layer = OpenLayers.Class({ /** * Method: adjustBounds * This function will take a bounds, and if wrapDateLine option is set - * on the layer, it will return a bounds which is wrapped around the - * world. We do not wrap for bounds which *cross* the - * maxExtent.left/right, only bounds which are entirely to the left + * on the layer, it will return a bounds which is wrapped around the + * world. We do not wrap for bounds which *cross* the + * maxExtent.left/right, only bounds which are entirely to the left * or entirely to the right. - * + * * Parameters: * bounds - {} */ adjustBounds: function (bounds) { if (this.gutter) { - // Adjust the extent of a bounds in map units by the + // Adjust the extent of a bounds in map units by the // layer's gutter in pixels. var mapGutter = this.gutter * this.map.getResolution(); bounds = new OpenLayers.Bounds(bounds.left - mapGutter, @@ -13630,12 +13630,12 @@ OpenLayers.Layer = OpenLayers.Class({ if (this.wrapDateLine) { // wrap around the date line, within the limits of rounding error - var wrappingOptions = { + var wrappingOptions = { 'rightTolerance':this.getResolution(), 'leftTolerance':this.getResolution() - }; + }; bounds = bounds.wrapDateLine(this.maxExtent, wrappingOptions); - + } return bounds; }, @@ -13675,12 +13675,12 @@ OpenLayers.Layer = OpenLayers.Class({ * * WKT: * 900913=PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84", - * DATUM["WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]], - * PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], + * DATUM["WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]], + * PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], * AXIS["Longitude", EAST], AXIS["Latitude", NORTH]], - * PROJECTION["Mercator_1SP_Google"], - * PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], - * PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], + * PROJECTION["Mercator_1SP_Google"], + * PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], + * PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], * PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST], * AXIS["y", NORTH], AUTHORITY["EPSG","900913"]] */ @@ -13706,7 +13706,7 @@ OpenLayers.Layer.SphericalMercator = { /** * Method: getLonLatFromViewPortPx * Get a map location from a pixel location - * + * * Parameters: * viewPortPx - {} * @@ -13718,7 +13718,7 @@ OpenLayers.Layer.SphericalMercator = { getLonLatFromViewPortPx: function (viewPortPx) { return OpenLayers.Layer.prototype.getLonLatFromViewPortPx.apply(this, arguments); }, - + /** * Method: getViewPortPxFromLonLat * Get a pixel location from a map location @@ -13735,8 +13735,8 @@ OpenLayers.Layer.SphericalMercator = { return OpenLayers.Layer.prototype.getViewPortPxFromLonLat.apply(this, arguments); }, - /** - * Method: initMercatorParameters + /** + * Method: initMercatorParameters * Set up the mercator parameters on the layer: resolutions, * projection, units. */ @@ -13756,9 +13756,9 @@ OpenLayers.Layer.SphericalMercator = { * Given a lon,lat in EPSG:4326, return a point in Spherical Mercator. * * Parameters: - * lon - {float} + * lon - {float} * lat - {float} - * + * * Returns: * {} The coordinates transformed to Mercator. */ @@ -13778,7 +13778,7 @@ OpenLayers.Layer.SphericalMercator = { * Parameters: * x - {float} A map x in Spherical Mercator. * y - {float} A map y in Spherical Mercator. - * + * * Returns: * {} The coordinates transformed to EPSG:4326. */ @@ -13817,21 +13817,21 @@ OpenLayers.Layer.SphericalMercator = { * * Create a new event pane layer with the * constructor. - * + * * Inherits from: * - */ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { - + /** * APIProperty: smoothDragPan * {Boolean} smoothDragPan determines whether non-public/internal API - * methods are used for better performance while dragging EventPane - * layers. When not in sphericalMercator mode, the smoother dragging - * doesn't actually move north/south directly with the number of - * pixels moved, resulting in a slight offset when you drag your mouse - * north south with this option on. If this visual disparity bothers - * you, you should turn this option off, or use spherical mercator. + * methods are used for better performance while dragging EventPane + * layers. When not in sphericalMercator mode, the smoother dragging + * doesn't actually move north/south directly with the number of + * pixels moved, resulting in a slight offset when you drag your mouse + * north south with this option on. If this visual disparity bothers + * you, you should turn this option off, or use spherical mercator. * Default is on. */ smoothDragPan: true, @@ -13839,13 +13839,13 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { /** * Property: isBaseLayer * {Boolean} EventPaned layers are always base layers, by necessity. - */ + */ isBaseLayer: true, /** * APIProperty: isFixed * {Boolean} EventPaned layers are fixed by default. - */ + */ isFixed: true, /** @@ -13858,9 +13858,9 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { /** * Property: mapObject * {Object} This is the object which will be used to load the 3rd party library - * in the case of the google layer, this will be of type GMap, + * in the case of the google layer, this will be of type GMap, * in the case of the ve layer, this will be of type VEMap - */ + */ mapObject: null, @@ -13878,7 +13878,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { this.pane = OpenLayers.Util.createDiv(this.div.id + "_EventPane"); } }, - + /** * APIMethod: destroy * Deconstruct this layer. @@ -13886,28 +13886,28 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { destroy: function() { this.mapObject = null; this.pane = null; - OpenLayers.Layer.prototype.destroy.apply(this, arguments); + OpenLayers.Layer.prototype.destroy.apply(this, arguments); }, - + /** * 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. + * so that subclasses can override this and take special action once + * they have their map variable set. * * Parameters: * map - {} */ setMap: function(map) { OpenLayers.Layer.prototype.setMap.apply(this, arguments); - + this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1; this.pane.style.display = this.div.style.display; this.pane.style.width="100%"; this.pane.style.height="100%"; if (OpenLayers.BROWSER_NAME == "msie") { - this.pane.style.background = + this.pane.style.background = "url(" + OpenLayers.Util.getImageLocation("blank.gif") + ")"; } @@ -13919,7 +13919,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { // once our layer has been added to the map, we can load it this.loadMapObject(); - + // if map didn't load, display warning if (this.mapObject == null) { this.loadWarningMessage(); @@ -13929,8 +13929,8 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { /** * APIMethod: removeMap * On being removed from the map, we'll like to remove the invisible 'pane' - * div that we added to it on creation. - * + * div that we added to it on creation. + * * Parameters: * map - {} */ @@ -13940,14 +13940,14 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { } OpenLayers.Layer.prototype.removeMap.apply(this, arguments); }, - + /** * Method: loadWarningMessage - * If we can't load the map lib, then display an error message to the + * If we can't load the map lib, then display an error message to the * user and tell them where to go for help. - * + * * This function sets up the layout for the warning message. Each 3rd - * party layer must implement its own getWarningHTML() function to + * party layer must implement its own getWarningHTML() function to * provide the actual warning message. */ loadWarningMessage:function() { @@ -13955,17 +13955,17 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { this.div.style.backgroundColor = "darkblue"; var viewSize = this.map.getSize(); - + var msgW = Math.min(viewSize.w, 300); var msgH = Math.min(viewSize.h, 200); var size = new OpenLayers.Size(msgW, msgH); var centerPx = new OpenLayers.Pixel(viewSize.w/2, viewSize.h/2); - var topLeft = centerPx.add(-size.w/2, -size.h/2); + var topLeft = centerPx.add(-size.w/2, -size.h/2); - var div = OpenLayers.Util.createDiv(this.name + "_warning", - topLeft, + var div = OpenLayers.Util.createDiv(this.name + "_warning", + topLeft, size, null, null, @@ -13978,11 +13978,11 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { div.innerHTML = this.getWarningHTML(); this.div.appendChild(div); }, - - /** + + /** * Method: getWarningHTML * To be implemented by subclasses. - * + * * Returns: * {String} String with information on why layer is broken, how to get * it working. @@ -13991,7 +13991,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { //should be implemented by subclasses return ""; }, - + /** * Method: display * Set the display on the pane @@ -14003,11 +14003,11 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { OpenLayers.Layer.prototype.display.apply(this, arguments); this.pane.style.display = this.div.style.display; }, - + /** * Method: setZIndex * Set the z-index order for the pane. - * + * * Parameters: * zIndex - {int} */ @@ -14015,7 +14015,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { OpenLayers.Layer.prototype.setZIndex.apply(this, arguments); this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1; }, - + /** * Method: moveByPx * Move the layer based on pixel vector. To be implemented by subclasses. @@ -14026,7 +14026,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { */ moveByPx: function(dx, dy) { OpenLayers.Layer.prototype.moveByPx.apply(this, arguments); - + if (this.dragPanMapObject) { this.dragPanMapObject(dx, -dy); } else { @@ -14037,7 +14037,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { /** * Method: moveTo * Handle calls to move the layer. - * + * * Parameters: * bounds - {} * zoomChanged - {Boolean} @@ -14061,7 +14061,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { if (!(newCenter.equals(oldCenter)) || newZoom != oldZoom) { - if (!zoomChanged && oldCenter && this.dragPanMapObject && + if (!zoomChanged && oldCenter && this.dragPanMapObject && this.smoothDragPan) { var oldPx = this.map.getViewPortPxFromLonLat(oldCenter); var newPx = this.map.getViewPortPxFromLonLat(newCenter); @@ -14086,7 +14086,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { /** * Method: getLonLatFromViewPortPx * Get a map location from a pixel location - * + * * Parameters: * viewPortPx - {} * @@ -14097,7 +14097,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { */ getLonLatFromViewPortPx: function (viewPortPx) { var lonlat = null; - if ( (this.mapObject != null) && + if ( (this.mapObject != null) && (this.getMapObjectCenter() != null) ) { var moPixel = this.getMapObjectPixelFromOLPixel(viewPortPx); var moLonLat = this.getMapObjectLonLatFromMapObjectPixel(moPixel); @@ -14106,7 +14106,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { return lonlat; }, - + /** * Method: getViewPortPxFromLonLat * Get a pixel location from a map location @@ -14121,12 +14121,12 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { */ getViewPortPxFromLonLat: function (lonlat) { var viewPortPx = null; - if ( (this.mapObject != null) && + if ( (this.mapObject != null) && (this.getMapObjectCenter() != null) ) { var moLonLat = this.getMapObjectLonLatFromOLLonLat(lonlat); var moPixel = this.getMapObjectPixelFromMapObjectLonLat(moLonLat); - + viewPortPx = this.getOLPixelFromMapObjectPixel(moPixel); } return viewPortPx; @@ -14151,9 +14151,9 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { * * Parameters * moLonLat - {Object} - * + * * Returns: - * {} An OpenLayers.LonLat, translated from the passed in + * {} An OpenLayers.LonLat, translated from the passed in * MapObject LonLat * Returns null if null value is passed in */ @@ -14173,9 +14173,9 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { * * Parameters: * olLonLat - {} - * + * * Returns: - * {Object} A MapObject LonLat, translated from the passed in + * {Object} A MapObject LonLat, translated from the passed in * OpenLayers.LonLat * Returns null if null value is passed in */ @@ -14199,9 +14199,9 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { * * Parameters: * moPixel - {Object} - * + * * Returns: - * {} An OpenLayers.Pixel, translated from the passed in + * {} An OpenLayers.Pixel, translated from the passed in * MapObject Pixel * Returns null if null value is passed in */ @@ -14221,9 +14221,9 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { * * Parameters: * olPixel - {} - * + * * Returns: - * {Object} A MapObject Pixel, translated from the passed in + * {Object} A MapObject Pixel, translated from the passed in * OpenLayers.Pixel * Returns null if null value is passed in */ @@ -14252,47 +14252,47 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, { /** * Class: OpenLayers.Layer.FixedZoomLevels - * Some Layers will already have established zoom levels (like google + * Some Layers will already have established zoom levels (like google * or ve). Instead of trying to determine them and populate a resolutions[] * Array with those values, we will hijack the resolution functionality * here. - * - * When you subclass FixedZoomLevels: - * - * The initResolutions() call gets nullified, meaning no resolutions[] array - * is set up. Which would be a big problem getResolution() in Layer, since + * + * When you subclass FixedZoomLevels: + * + * The initResolutions() call gets nullified, meaning no resolutions[] array + * is set up. Which would be a big problem getResolution() in Layer, since * it merely takes map.zoom and indexes into resolutions[]... but.... - * - * The getResolution() call is also overridden. Instead of using the + * + * The getResolution() call is also overridden. Instead of using the * resolutions[] array, we simply calculate the current resolution based * on the current extent and the current map size. But how will we be able * to calculate the current extent without knowing the resolution...? - * + * * The getExtent() function is also overridden. Instead of calculating extent - * based on the center point and the current resolution, we instead - * calculate the extent by getting the lonlats at the top-left and + * based on the center point and the current resolution, we instead + * calculate the extent by getting the lonlats at the top-left and * bottom-right by using the getLonLatFromViewPortPx() translation function, - * taken from the pixel locations (0,0) and the size of the map. But how + * taken from the pixel locations (0,0) and the size of the map. But how * will we be able to do lonlat-px translation without resolution....? - * + * * The getZoomForResolution() method is overridden. Instead of indexing into * the resolutions[] array, we call OpenLayers.Layer.getExent(), passing in - * the desired resolution. With this extent, we then call getZoomForExtent() - * - * - * Whenever you implement a layer using OpenLayers.Layer.FixedZoomLevels, + * the desired resolution. With this extent, we then call getZoomForExtent() + * + * + * Whenever you implement a layer using OpenLayers.Layer.FixedZoomLevels, * it is your responsibility to provide the following three functions: - * + * * - getLonLatFromViewPortPx * - getViewPortPxFromLonLat * - getZoomForExtent - * - * ...those three functions should generally be provided by any reasonable + * + * ...those three functions should generally be provided by any reasonable * API that you might be working from. * */ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({ - + /********************************************************/ /* */ /* Baselayer Functions */ @@ -14301,19 +14301,19 @@ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({ /* by all base layers */ /* */ /********************************************************/ - + /** * Constructor: OpenLayers.Layer.FixedZoomLevels * Create a new fixed zoom levels layer. */ initialize: function() { - //this class is only just to add the following functions... + //this class is only just to add the following functions... // nothing to actually do here... but it is probably a good - // idea to have layers that use these functions call this - // inititalize() anyways, in case at some point we decide we - // do want to put some functionality or state in here. + // idea to have layers that use these functions call this + // inititalize() anyways, in case at some point we decide we + // do want to put some functionality or state in here. }, - + /** * Method: initResolutions * Populate the resolutions array @@ -14321,64 +14321,64 @@ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({ initResolutions: function() { var props = ['minZoomLevel', 'maxZoomLevel', 'numZoomLevels']; - + for(var i=0, len=props.length; i lonlat translation functions on tl and br + * Calculates using px-> lonlat translation functions on tl and br * corners of viewport - * + * * Returns: - * {} A Bounds object which represents the lon/lat + * {} A Bounds object which represents the lon/lat * bounds of the current viewPort. */ getExtent: function () { @@ -14463,7 +14463,7 @@ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({ var br = this.getLonLatFromViewPortPx({ x: size.w, y: size.h }); - + if ((tl != null) && (br != null)) { return new OpenLayers.Bounds(tl.lon, br.lat, br.lon, tl.lat); } else { @@ -14483,7 +14483,7 @@ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({ * If no baselayer is set, returns null. */ getZoomForResolution: function(resolution) { - + if (this.resolutions != null) { return OpenLayers.Layer.prototype.getZoomForResolution.apply(this, arguments); } else { @@ -14494,28 +14494,28 @@ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({ - + /********************************************************/ /* */ /* Translation Functions */ /* */ - /* The following functions translate GMaps and OL */ + /* The following functions translate GMaps and OL */ /* formats for Pixel, LonLat, Bounds, and Zoom */ /* */ /********************************************************/ - - + + // // TRANSLATION: MapObject Zoom <-> OpenLayers Zoom // - + /** * Method: getOLZoomFromMapObjectZoom * Get the OL zoom index from the map object zoom level * * Parameters: * moZoom - {Integer} - * + * * Returns: * {Integer} An OpenLayers Zoom level, translated from the passed in zoom * Returns null if null value is passed in @@ -14532,20 +14532,20 @@ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({ } return zoom; }, - + /** * Method: getMapObjectZoomFromOLZoom * Get the map object zoom level from the OL zoom level * * Parameters: * olZoom - {Integer} - * + * * Returns: * {Integer} A MapObject level, translated from the passed in olZoom * Returns null if null value is passed in */ getMapObjectZoomFromOLZoom: function(olZoom) { - var zoom = null; + var zoom = null; if (olZoom != null) { zoom = olZoom + this.minZoomLevel; if (this.map.baseLayer !== this) { @@ -14579,58 +14579,58 @@ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({ /** * Class: OpenLayers.Layer.Google - * + * * Provides a wrapper for Google's Maps API * Normally the Terms of Use for this API do not allow wrapping, but Google - * have provided written consent to OpenLayers for this - see email in + * have provided written consent to OpenLayers for this - see email in * http://osgeo-org.1560.n6.nabble.com/Google-Maps-API-Terms-of-Use-changes-tp4910013p4911981.html - * + * * Inherits from: * - * - * - */ OpenLayers.Layer.Google = OpenLayers.Class( - OpenLayers.Layer.EventPane, + OpenLayers.Layer.EventPane, OpenLayers.Layer.FixedZoomLevels, { - - /** + + /** * Constant: MIN_ZOOM_LEVEL - * {Integer} 0 + * {Integer} 0 */ MIN_ZOOM_LEVEL: 0, - - /** + + /** * Constant: MAX_ZOOM_LEVEL * {Integer} 21 */ MAX_ZOOM_LEVEL: 21, - /** + /** * Constant: RESOLUTIONS * {Array(Float)} Hardcode these resolutions so that they are more closely * tied with the standard wms projection */ RESOLUTIONS: [ - 1.40625, - 0.703125, - 0.3515625, - 0.17578125, - 0.087890625, + 1.40625, + 0.703125, + 0.3515625, + 0.17578125, + 0.087890625, 0.0439453125, - 0.02197265625, - 0.010986328125, - 0.0054931640625, + 0.02197265625, + 0.010986328125, + 0.0054931640625, 0.00274658203125, - 0.001373291015625, - 0.0006866455078125, + 0.001373291015625, + 0.0006866455078125, 0.00034332275390625, - 0.000171661376953125, - 0.0000858306884765625, + 0.000171661376953125, + 0.0000858306884765625, 0.00004291534423828125, - 0.00002145767211914062, + 0.00002145767211914062, 0.00001072883605957031, - 0.00000536441802978515, + 0.00000536441802978515, 0.00000268220901489257, 0.0000013411045074462891, 0.00000067055225372314453 @@ -14644,30 +14644,30 @@ OpenLayers.Layer.Google = OpenLayers.Class( /** * APIProperty: wrapDateLine - * {Boolean} Allow user to pan forever east/west. Default is true. - * Setting this to false only restricts panning if - * is true. + * {Boolean} Allow user to pan forever east/west. Default is true. + * Setting this to false only restricts panning if + * is true. */ wrapDateLine: true, /** * APIProperty: sphericalMercator * {Boolean} Should the map act as a mercator-projected map? This will - * cause all interactions with the map to be in the actual map - * projection, which allows support for vector drawing, overlaying - * other maps, etc. + * cause all interactions with the map to be in the actual map + * projection, which allows support for vector drawing, overlaying + * other maps, etc. */ - sphericalMercator: false, - + sphericalMercator: false, + /** * Property: version * {Number} The version of the Google Maps API */ version: null, - /** + /** * Constructor: OpenLayers.Layer.Google - * + * * Parameters: * name - {String} A name for the layer. * options - {Object} An optional object whose properties will be set @@ -14693,13 +14693,13 @@ OpenLayers.Layer.Google = OpenLayers.Class( OpenLayers.Layer.EventPane.prototype.initialize.apply(this, [name, options]); - OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this, + OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this, [name, options]); if (this.sphericalMercator) { OpenLayers.Util.extend(this, OpenLayers.Layer.SphericalMercator); this.initMercatorParameters(); - } + } }, /** @@ -14723,16 +14723,16 @@ OpenLayers.Layer.Google = OpenLayers.Class( /** * 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: * visible - {Boolean} Display the layer (if in range) */ @@ -14742,11 +14742,11 @@ OpenLayers.Layer.Google = OpenLayers.Class( OpenLayers.Layer.EventPane.prototype.setVisibility.apply(this, arguments); this.setOpacity(opacity); }, - - /** + + /** * APIMethod: display * Hide or show the Layer - * + * * Parameters: * visible - {Boolean} */ @@ -14756,10 +14756,10 @@ OpenLayers.Layer.Google = OpenLayers.Class( } OpenLayers.Layer.EventPane.prototype.display.apply(this, arguments); }, - + /** * Method: moveTo - * + * * Parameters: * bounds - {} * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to @@ -14771,11 +14771,11 @@ OpenLayers.Layer.Google = OpenLayers.Class( OpenLayers.Layer.EventPane.prototype.moveTo.apply(this, arguments); delete this._dragging; }, - + /** * APIMethod: setOpacity * Sets the opacity for the entire layer (all images) - * + * * Parameters: * opacity - {Float} */ @@ -14814,11 +14814,11 @@ OpenLayers.Layer.Google = OpenLayers.Class( var cache = OpenLayers.Layer.Google.cache[this.map.id]; if (cache && cache.count <= 1) { this.removeGMapElements(); - } + } } OpenLayers.Layer.EventPane.prototype.destroy.apply(this, arguments); }, - + /** * Method: removeGMapElements * Remove all elements added to the dom. This should only be called if @@ -14828,7 +14828,7 @@ OpenLayers.Layer.Google = OpenLayers.Class( var cache = OpenLayers.Layer.Google.cache[this.map.id]; if (cache) { // remove shared elements from dom - var container = this.mapObject && this.getMapContainer(); + var container = this.mapObject && this.getMapContainer(); if (container && container.parentNode) { container.parentNode.removeChild(container); } @@ -14850,7 +14850,7 @@ OpenLayers.Layer.Google = OpenLayers.Class( /** * APIMethod: removeMap * On being removed from the map, also remove termsOfUse and poweredBy divs - * + * * Parameters: * map - {} */ @@ -14877,19 +14877,19 @@ OpenLayers.Layer.Google = OpenLayers.Class( delete this.dragObject; OpenLayers.Layer.EventPane.prototype.removeMap.apply(this, arguments); }, - + // // TRANSLATION: MapObject Bounds <-> OpenLayers.Bounds // /** * APIMethod: getOLBoundsFromMapObjectBounds - * + * * Parameters: * moBounds - {Object} - * + * * Returns: - * {} An , translated from the + * {} An , translated from the * passed-in MapObject Bounds. * Returns null if null value is passed in. */ @@ -14902,21 +14902,21 @@ OpenLayers.Layer.Google = OpenLayers.Class( sw = this.forwardMercator(sw.lng(), sw.lat()); ne = this.forwardMercator(ne.lng(), ne.lat()); } else { - sw = new OpenLayers.LonLat(sw.lng(), sw.lat()); - ne = new OpenLayers.LonLat(ne.lng(), ne.lat()); - } - olBounds = new OpenLayers.Bounds(sw.lon, - sw.lat, - ne.lon, + sw = new OpenLayers.LonLat(sw.lng(), sw.lat()); + ne = new OpenLayers.LonLat(ne.lng(), ne.lat()); + } + olBounds = new OpenLayers.Bounds(sw.lon, + sw.lat, + ne.lon, ne.lat ); } return olBounds; }, - /** + /** * APIMethod: getWarningHTML - * - * Returns: + * + * Returns: * {String} String with information on why layer is broken, how to get * it working. */ @@ -14936,17 +14936,17 @@ OpenLayers.Layer.Google = OpenLayers.Class( /** * APIMethod: getMapObjectCenter - * - * Returns: + * + * Returns: * {Object} The mapObject's current center in Map Object format */ getMapObjectCenter: function() { return this.mapObject.getCenter(); }, - /** + /** * APIMethod: getMapObjectZoom - * + * * Returns: * {Integer} The mapObject's current zoom, in Map Object format */ @@ -14954,7 +14954,7 @@ OpenLayers.Layer.Google = OpenLayers.Class( return this.mapObject.getZoom(); }, - + /************************************ * * * MapObject Primitives * @@ -14963,46 +14963,46 @@ OpenLayers.Layer.Google = OpenLayers.Class( // LonLat - + /** * APIMethod: getLongitudeFromMapObjectLonLat - * + * * Parameters: * moLonLat - {Object} MapObject LonLat format - * + * * Returns: * {Float} Longitude of the given MapObject LonLat */ getLongitudeFromMapObjectLonLat: function(moLonLat) { - return this.sphericalMercator ? + return this.sphericalMercator ? this.forwardMercator(moLonLat.lng(), moLonLat.lat()).lon : - moLonLat.lng(); + moLonLat.lng(); }, /** * APIMethod: getLatitudeFromMapObjectLonLat - * + * * Parameters: * moLonLat - {Object} MapObject LonLat format - * + * * Returns: * {Float} Latitude of the given MapObject LonLat */ getLatitudeFromMapObjectLonLat: function(moLonLat) { - var lat = this.sphericalMercator ? + var lat = this.sphericalMercator ? this.forwardMercator(moLonLat.lng(), moLonLat.lat()).lat : - moLonLat.lat(); - return lat; + moLonLat.lat(); + return lat; }, - + // Pixel - + /** * APIMethod: getXFromMapObjectPixel - * + * * Parameters: * moPixel - {Object} MapObject Pixel format - * + * * Returns: * {Integer} X value of the MapObject Pixel */ @@ -15012,17 +15012,17 @@ OpenLayers.Layer.Google = OpenLayers.Class( /** * APIMethod: getYFromMapObjectPixel - * + * * Parameters: * moPixel - {Object} MapObject Pixel format - * + * * Returns: * {Integer} Y value of the MapObject Pixel */ getYFromMapObjectPixel: function(moPixel) { return moPixel.y; }, - + CLASS_NAME: "OpenLayers.Layer.Google" }); @@ -15035,37 +15035,37 @@ OpenLayers.Layer.Google.cache = {}; /** * Constant: OpenLayers.Layer.Google.v2 - * + * * Mixin providing functionality specific to the Google Maps API v2. - * + * * This API has been deprecated by Google. * Developers are encouraged to migrate to v3 of the API; support for this * is provided by */ OpenLayers.Layer.Google.v2 = { - + /** * Property: termsOfUse * {DOMElement} Div for Google's copyright and terms of use link */ - termsOfUse: null, + termsOfUse: null, /** * Property: poweredBy * {DOMElement} Div for Google's powered by logo and link */ - poweredBy: null, + poweredBy: null, /** * Property: dragObject * {GDraggableObject} Since 2.93, Google has exposed the ability to get * the maps GDraggableObject. We can now use this for smooth panning */ - dragObject: null, - - /** + dragObject: null, + + /** * Method: loadMapObject - * Load the GMap and register appropriate event listeners. If we can't + * Load the GMap and register appropriate event listeners. If we can't * load GMap2, then display a warning message. */ loadMapObject:function() { @@ -15095,7 +15095,7 @@ OpenLayers.Layer.Google.v2 = { // create GMap and shuffle elements try { mapObject = new GMap2(div); - + // move the ToS and branding stuff up to the container div termsOfUse = div.lastChild; container.appendChild(termsOfUse); @@ -15110,7 +15110,7 @@ OpenLayers.Layer.Google.v2 = { poweredBy.style.right = ""; poweredBy.style.bottom = ""; poweredBy.className = "olLayerGooglePoweredBy gmnoprint"; - + } catch (e) { throw(e); } @@ -15127,7 +15127,7 @@ OpenLayers.Layer.Google.v2 = { this.mapObject = mapObject; this.termsOfUse = termsOfUse; this.poweredBy = poweredBy; - + // ensure this layer type is one of the mapObject types if (OpenLayers.Util.indexOf(this.mapObject.getMapTypes(), this.type) === -1) { @@ -15140,7 +15140,7 @@ OpenLayers.Layer.Google.v2 = { } else { this.dragPanMapObject = null; } - + if(this.isBaseLayer === false) { this.setGMapVisibility(this.div.style.display !== "none"); } @@ -15175,7 +15175,7 @@ OpenLayers.Layer.Google.v2 = { /** * Method: setGMapVisibility * Display the GMap container and associated elements. - * + * * Parameters: * visible - {Boolean} Display the GMap elements. */ @@ -15188,7 +15188,7 @@ OpenLayers.Layer.Google.v2 = { container.style.display = ""; this.termsOfUse.style.left = ""; this.termsOfUse.style.display = ""; - this.poweredBy.style.display = ""; + this.poweredBy.style.display = ""; cache.displayed = this.id; } else { if (cache.displayed === this.id) { @@ -15201,17 +15201,17 @@ OpenLayers.Layer.Google.v2 = { // to "none", because at the end of the GMap2 load // sequence, display: none will be unset and ToU would be // visible after loading a map with a google layer that is - // initially hidden. + // initially hidden. this.termsOfUse.style.left = "-9999px"; this.poweredBy.style.display = "none"; } } } }, - + /** * Method: getMapContainer - * + * * Returns: * {DOMElement} the GMap container's div */ @@ -15225,10 +15225,10 @@ OpenLayers.Layer.Google.v2 = { /** * APIMethod: getMapObjectBoundsFromOLBounds - * + * * Parameters: * olBounds - {} - * + * * Returns: * {Object} A MapObject Bounds, translated from olBounds * Returns null if null value is passed in @@ -15236,11 +15236,11 @@ OpenLayers.Layer.Google.v2 = { getMapObjectBoundsFromOLBounds: function(olBounds) { var moBounds = null; if (olBounds != null) { - var sw = this.sphericalMercator ? - this.inverseMercator(olBounds.bottom, olBounds.left) : + var sw = this.sphericalMercator ? + this.inverseMercator(olBounds.bottom, olBounds.left) : new OpenLayers.LonLat(olBounds.bottom, olBounds.left); - var ne = this.sphericalMercator ? - this.inverseMercator(olBounds.top, olBounds.right) : + var ne = this.sphericalMercator ? + this.inverseMercator(olBounds.top, olBounds.right) : new OpenLayers.LonLat(olBounds.top, olBounds.right); moBounds = new GLatLngBounds(new GLatLng(sw.lat, sw.lon), new GLatLng(ne.lat, ne.lon)); @@ -15258,21 +15258,21 @@ OpenLayers.Layer.Google.v2 = { // Get&Set Center, Zoom - /** + /** * APIMethod: setMapObjectCenter * Set the mapObject to the specified center and zoom - * + * * Parameters: * center - {Object} MapObject LonLat format * zoom - {int} MapObject zoom format */ setMapObjectCenter: function(center, zoom) { - this.mapObject.setCenter(center, zoom); + this.mapObject.setCenter(center, zoom); }, - + /** * APIMethod: dragPanMapObject - * + * * Parameters: * dX - {Integer} * dY - {Integer} @@ -15283,13 +15283,13 @@ OpenLayers.Layer.Google.v2 = { // LonLat - Pixel Translation - + /** * APIMethod: getMapObjectLonLatFromMapObjectPixel - * + * * Parameters: * moPixel - {Object} MapObject Pixel format - * + * * Returns: * {Object} MapObject LonLat translated from MapObject Pixel */ @@ -15299,10 +15299,10 @@ OpenLayers.Layer.Google.v2 = { /** * APIMethod: getMapObjectPixelFromMapObjectLonLat - * + * * Parameters: * moLonLat - {Object} MapObject LonLat format - * + * * Returns: * {Object} MapObject Pixel transtlated from MapObject LonLat */ @@ -15310,15 +15310,15 @@ OpenLayers.Layer.Google.v2 = { return this.mapObject.fromLatLngToContainerPixel(moLonLat); }, - + // Bounds - - /** + + /** * APIMethod: getMapObjectZoomFromMapObjectBounds - * + * * Parameters: * moBounds - {Object} MapObject Bounds format - * + * * Returns: * {Object} MapObject Zoom for specified MapObject Bounds */ @@ -15334,14 +15334,14 @@ OpenLayers.Layer.Google.v2 = { // LonLat - + /** * APIMethod: getMapObjectLonLatFromLonLat - * + * * Parameters: * lon - {Float} * lat - {Float} - * + * * Returns: * {Object} MapObject LonLat built from lon and lat params */ @@ -15357,21 +15357,21 @@ OpenLayers.Layer.Google.v2 = { }, // Pixel - + /** * APIMethod: getMapObjectPixelFromXY - * + * * Parameters: * x - {Integer} * y - {Integer} - * + * * Returns: * {Object} MapObject Pixel from x and y parameters */ getMapObjectPixelFromXY: function(x, y) { return new GPoint(x, y); } - + }; /* ====================================================================== OpenLayers/Format/XML.js @@ -15398,7 +15398,7 @@ OpenLayers.Layer.Google.v2 = { * - */ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { - + /** * Property: namespaces * {Object} Mapping of namespace aliases to namespace URIs. Properties @@ -15407,20 +15407,20 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { * to add or set a namespace alias after construction. */ namespaces: null, - + /** * Property: namespaceAlias * {Object} Mapping of namespace URI to namespace alias. This object * is read-only. Use to add or set a namespace alias. */ namespaceAlias: null, - + /** * Property: defaultPrefix * {String} The default namespace alias for creating element nodes. */ defaultPrefix: null, - + /** * Property: readers * Contains public functions, grouped by namespace prefix, that will @@ -15430,7 +15430,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { * from the parent. */ readers: {}, - + /** * Property: writers * As a compliment to the property, this structure contains public @@ -15471,7 +15471,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { this.namespaceAlias[this.namespaces[alias]] = alias; } }, - + /** * APIMethod: destroy * Clean up. @@ -15480,7 +15480,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { this.xmldom = null; OpenLayers.Format.prototype.destroy.apply(this, arguments); }, - + /** * Method: setNamespace * Set a namespace alias and URI for the format. @@ -15500,7 +15500,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { * * Parameters: * text - {String} A XML string - + * Returns: * {DOMElement} A DOM node */ @@ -15521,7 +15521,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { xmldom = new ActiveXObject("Microsoft.XMLDOM"); } else { xmldom = this.xmldom; - + } xmldom.loadXML(text); return xmldom; @@ -15552,7 +15552,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { /** * APIMethod: write * Serialize a DOM node into a XML string. - * + * * Parameters: * node - {DOMElement} A DOM node. * @@ -15591,7 +15591,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { * Parameters: * uri - {String} Namespace URI for the element. * name - {String} The qualified name of the element (prefix:localname). - * + * * Returns: * {Element} A DOM element with namespace. */ @@ -15612,7 +15612,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { /** * APIMethod: createDocumentFragment * Create a document fragment node that can be appended to another node - * created by createElementNS. This will call + * created by createElementNS. This will call * document.createDocumentFragment outside of IE. In IE, the ActiveX * object's createDocumentFragment method is used. * @@ -15634,11 +15634,11 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { * Create a text node. This node can be appended to another node with * the standard node.appendChild method. For cross-browser support, * this method must be used instead of document.createTextNode. - * + * * Parameters: * text - {String} The text of the node. - * - * Returns: + * + * Returns: * {DOMElement} A DOM text node. */ createTextNode: function(text) { @@ -15660,12 +15660,12 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { * To return all nodes in a given namespace, use '*' for the name * argument. To return all nodes of a given (local) name, regardless * of namespace, use '*' for the uri argument. - * + * * Parameters: * node - {Element} Node on which to search for other nodes. * uri - {String} Namespace URI. * name - {String} Local name of the tag (without the prefix). - * + * * Returns: * {NodeList} A node list or array of elements. */ @@ -15694,12 +15694,12 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { /** * APIMethod: getAttributeNodeNS * Get an attribute node given the namespace URI and local name. - * + * * Parameters: * node - {Element} Node on which to search for attribute nodes. * uri - {String} Namespace URI. * name - {String} Local name of the attribute (without the prefix). - * + * * Returns: * {DOMElement} An attribute node or null if none found. */ @@ -15728,12 +15728,12 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { /** * APIMethod: getAttributeNS * Get an attribute value given the namespace URI and local name. - * + * * Parameters: * node - {Element} Node on which to search for an attribute. * uri - {String} Namespace URI. * name - {String} Local name of the attribute (without the prefix). - * + * * Returns: * {String} An attribute value or and empty string if none found. */ @@ -15749,7 +15749,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { } return attributeValue; }, - + /** * APIMethod: getChildValue * Get the textual value of the node if it exists, or return an @@ -15787,7 +15787,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { * node - {DOMElement} An element node. * * Returns: - * {Boolean} The node has no child element nodes (nodes of type 1). + * {Boolean} The node has no child element nodes (nodes of type 1). */ isSimpleContent: function(node) { var simple = true; @@ -15799,7 +15799,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { } return simple; }, - + /** * APIMethod: contentType * Determine the content type for a given node. @@ -15814,7 +15814,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { contentType: function(node) { var simple = false, complex = false; - + var type = OpenLayers.Format.XML.CONTENT_TYPE.EMPTY; for(var child=node.firstChild; child; child=child.nextSibling) { @@ -15831,7 +15831,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { break; } } - + if(complex && simple) { type = OpenLayers.Format.XML.CONTENT_TYPE.MIXED; } else if(complex) { @@ -15846,12 +15846,12 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { * APIMethod: hasAttributeNS * Determine whether a node has a particular attribute matching the given * name and namespace. - * + * * Parameters: * node - {Element} Node on which to search for an attribute. * uri - {String} Namespace URI. * name - {String} Local name of the attribute (without the prefix). - * + * * Returns: * {Boolean} The node has an attribute matching the name and namespace. */ @@ -15864,7 +15864,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { } return found; }, - + /** * APIMethod: setAttributeNS * Adds a new attribute or changes the value of an attribute with the given @@ -15941,7 +15941,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { } return node; }, - + /** * Method: setAttributes * Set multiple attributes given key value pairs from an object. @@ -16080,7 +16080,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { getChildEl: function(node, name, uri) { return node && this.getThisOrNextEl(node.firstChild, name, uri); }, - + /** * APIMethod: getNextEl * Get the next sibling element. Optionally get the first sibling only @@ -16099,7 +16099,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { getNextEl: function(node, name, uri) { return node && this.getThisOrNextEl(node.nextSibling, name, uri); }, - + /** * Method: getThisOrNextEl * Return this node or the next element node. Optionally get the first @@ -16141,7 +16141,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { } return sibling || null; }, - + /** * APIMethod: lookupNamespaceURI * Takes a prefix and returns the namespace URI associated with it on the given @@ -16154,11 +16154,11 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { * * For browsers that don't support the attribute.ownerElement property, this * method cannot be called on attribute nodes. - * + * * Parameters: * node - {DOMElement} The node from which to start looking. * prefix - {String} The prefix to lookup or null to lookup the default namespace. - * + * * Returns: * {String} The namespace URI for the given prefix. Returns null if the prefix * cannot be found or the node is the wrong type. @@ -16202,7 +16202,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { case 10: // DOCUMENT_TYPE_NODE case 11: // DOCUMENT_FRAGMENT_NODE break outer; - default: + default: // TEXT_NODE (3), CDATA_SECTION_NODE (4), ENTITY_REFERENCE_NODE (5), // PROCESSING_INSTRUCTION_NODE (7), COMMENT_NODE (8) uri = this.lookupNamespaceURI(node.parentNode, prefix); @@ -16212,7 +16212,7 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { } return uri; }, - + /** * Method: getXMLDoc * Get an XML document for nodes that are not supported in HTML (e.g. @@ -16236,9 +16236,9 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, { return OpenLayers.Format.XML.document || this.xmldom; }, - CLASS_NAME: "OpenLayers.Format.XML" + CLASS_NAME: "OpenLayers.Format.XML" -}); +}); OpenLayers.Format.XML.CONTENT_TYPE = {EMPTY: 0, SIMPLE: 1, COMPLEX: 2, MIXED: 3}; @@ -16254,11 +16254,11 @@ OpenLayers.Format.XML.CONTENT_TYPE = {EMPTY: 0, SIMPLE: 1, COMPLEX: 2, MIXED: 3} * * For browsers that don't support the attribute.ownerElement property, this * method cannot be called on attribute nodes. - * + * * Parameters: * node - {DOMElement} The node from which to start looking. * prefix - {String} The prefix to lookup or null to lookup the default namespace. - * + * * Returns: * {String} The namespace URI for the given prefix. Returns null if the prefix * cannot be found or the node is the wrong type. @@ -16334,33 +16334,33 @@ OpenLayers.Format.WFST.DEFAULTS = { */ OpenLayers.Feature = OpenLayers.Class({ - /** - * Property: layer - * {} + /** + * Property: layer + * {} */ layer: null, - /** - * Property: id - * {String} + /** + * Property: id + * {String} */ id: null, - - /** - * Property: lonlat - * {} + + /** + * Property: lonlat + * {} */ lonlat: null, - /** - * Property: data - * {Object} + /** + * Property: data + * {Object} */ data: null, - /** - * Property: marker - * {} + /** + * Property: marker + * {} */ marker: null, @@ -16371,21 +16371,21 @@ OpenLayers.Feature = OpenLayers.Class({ */ popupClass: null, - /** - * Property: popup - * {} + /** + * Property: popup + * {} */ popup: null, - /** + /** * Constructor: OpenLayers.Feature * Constructor for features. * * Parameters: - * layer - {} - * lonlat - {} - * data - {Object} - * + * layer - {} + * lonlat - {} + * data - {Object} + * * Returns: * {} */ @@ -16393,10 +16393,10 @@ OpenLayers.Feature = OpenLayers.Class({ this.layer = layer; this.lonlat = lonlat; this.data = (data != null) ? data : {}; - this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); + this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); }, - /** + /** * Method: destroy * nullify references to prevent circular references and memory leaks */ @@ -16426,36 +16426,36 @@ OpenLayers.Feature = OpenLayers.Class({ this.popup = null; } }, - + /** * Method: onScreen - * + * * Returns: * {Boolean} Whether or not the feature is currently visible on screen * (based on its 'lonlat' property) */ onScreen:function() { - + var onScreen = false; if ((this.layer != null) && (this.layer.map != null)) { var screenBounds = this.layer.map.getExtent(); onScreen = screenBounds.containsLonLat(this.lonlat); - } + } return onScreen; }, - + /** * Method: createMarker * Based on the data associated with the Feature, create and return a marker object. * - * Returns: + * Returns: * {} A Marker Object created from the 'lonlat' and 'icon' properties * set in this.data. If no 'lonlat' is set, returns null. If no * 'icon' is set, OpenLayers.Marker() will load the default image. - * + * * Note - this.marker is set to return value - * + * */ createMarker: function() { @@ -16472,63 +16472,63 @@ OpenLayers.Feature = OpenLayers.Class({ * to also specify an alternative function for destroying it */ destroyMarker: function() { - this.marker.destroy(); + this.marker.destroy(); }, /** * Method: createPopup * Creates a popup object created from the 'lonlat', 'popupSize', * and 'popupContentHTML' properties set in this.data. It uses - * this.marker.icon as default anchor. - * - * If no 'lonlat' is set, returns null. + * this.marker.icon as default anchor. + * + * If no 'lonlat' is set, returns null. * If no this.marker has been created, no anchor is sent. * * Note - the returned popup object is 'owned' by the feature, so you * cannot use the popup's destroy method to discard the popup. * Instead, you must use the feature's destroyPopup - * + * * Note - this.popup is set to return value - * - * Parameters: + * + * Parameters: * closeBox - {Boolean} create popup with closebox or not - * + * * Returns: * {} Returns the created popup, which is also set * as 'popup' property of this feature. Will be of whatever type * specified by this feature's 'popupClass' property, but must be * of type . - * + * */ createPopup: function(closeBox) { if (this.lonlat != null) { if (!this.popup) { var anchor = (this.marker) ? this.marker.icon : null; - var popupClass = this.popupClass ? + var popupClass = this.popupClass ? this.popupClass : OpenLayers.Popup.Anchored; - this.popup = new popupClass(this.id + "_popup", + this.popup = new popupClass(this.id + "_popup", this.lonlat, this.data.popupSize, this.data.popupContentHTML, - anchor, - closeBox); - } + anchor, + closeBox); + } if (this.data.overflow != null) { this.popup.contentDiv.style.overflow = this.data.overflow; - } - + } + this.popup.feature = this; - } + } return this.popup; }, - + /** * Method: destroyPopup * Destroys the popup created via createPopup. * - * As with the marker, if user overrides the createPopup() function, s/he + * As with the marker, if user overrides the createPopup() function, s/he * should also be able to override the destruction */ destroyPopup: function() { @@ -16536,7 +16536,7 @@ OpenLayers.Feature = OpenLayers.Class({ this.popup.feature = null; this.popup.destroy(); this.popup = null; - } + } }, CLASS_NAME: "OpenLayers.Feature" @@ -16568,28 +16568,28 @@ OpenLayers.State = { * Class: OpenLayers.Feature.Vector * Vector features use the OpenLayers.Geometry classes as geometry description. * They have an 'attributes' property, which is the data object, and a 'style' - * property, the default values of which are defined in the + * property, the default values of which are defined in the * objects. - * + * * Inherits from: * - */ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { - /** - * Property: fid - * {String} + /** + * Property: fid + * {String} */ fid: null, - - /** - * APIProperty: geometry - * {} + + /** + * APIProperty: geometry + * {} */ geometry: null, - /** - * APIProperty: attributes + /** + * APIProperty: attributes * {Object} This object holds arbitrary, serializable properties that * describe the feature. */ @@ -16600,19 +16600,19 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * {} The box bounding that feature's geometry, that * property can be set by an object when * deserializing the feature, so in most cases it represents an - * information set by the server. + * information set by the server. */ bounds: null, - /** - * Property: state - * {String} + /** + * Property: state + * {String} */ state: null, - - /** - * APIProperty: style - * {Object} + + /** + * APIProperty: style + * {Object} */ style: null, @@ -16622,13 +16622,13 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * {} when upadting or deleting the feature. */ url: null, - + /** * Property: renderIntent * {String} rendering intent currently being used */ renderIntent: "default", - + /** * APIProperty: modified * {Object} An object with the originals of the geometry and attributes of @@ -16665,15 +16665,15 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { */ modified: null, - /** + /** * Constructor: OpenLayers.Feature.Vector - * Create a vector feature. - * + * Create a vector feature. + * * Parameters: * geometry - {} The geometry that this feature * represents. * attributes - {Object} An optional object that will be mapped to the - * property. + * property. * style - {Object} An optional style object. */ initialize: function(geometry, attributes, style) { @@ -16687,10 +16687,10 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { this.attributes = OpenLayers.Util.extend(this.attributes, attributes); } - this.style = style ? style : null; + this.style = style ? style : null; }, - - /** + + /** * Method: destroy * nullify references to prevent circular references and memory leaks */ @@ -16699,12 +16699,12 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { this.layer.removeFeatures(this); this.layer = null; } - + this.geometry = null; this.modified = null; OpenLayers.Feature.prototype.destroy.apply(this, arguments); }, - + /** * Method: clone * Create a clone of this vector feature. Does not set any non-standard @@ -16732,7 +16732,7 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * boundsOnly - {Boolean} Only test whether a feature's bounds intersects * the viewport bounds. Default is false. If false, the feature's * geometry must intersect the viewport for onScreen to return true. - * + * * Returns: * {Boolean} The feature is currently visible on screen (optionally * based on its bounds if boundsOnly is true). @@ -16748,7 +16748,7 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { var screenPoly = screenBounds.toGeometry(); onScreen = screenPoly.intersects(this.geometry); } - } + } return onScreen; }, @@ -16761,7 +16761,7 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * - the styleMap creates a symbolizer with display property set to 'none' * for it, * - the layer which it belongs to is not visible. - * + * * Returns: * {Boolean} The feature is currently displayed. */ @@ -16772,12 +16772,12 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { this.layer.styleMap.createSymbolizer(this, this.renderIntent).display == 'none' || this.layer && !this.layer.getVisibility()); }, - + /** * Method: createMarker * HACK - we need to decide if all vector features should be able to * create markers - * + * * Returns: * {} For now just returns null */ @@ -16789,7 +16789,7 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * Method: destroyMarker * HACK - we need to decide if all vector features should be able to * delete markers - * + * * If user overrides the createMarker() function, s/he should be able * to also specify an alternative function for destroying it */ @@ -16801,7 +16801,7 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * Method: createPopup * HACK - we need to decide if all vector features should be able to * create popups - * + * * Returns: * {} For now just returns null */ @@ -16812,20 +16812,20 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { /** * Method: atPoint * Determins whether the feature intersects with the specified location. - * - * Parameters: + * + * Parameters: * lonlat - {|Object} OpenLayers.LonLat or an * object with a 'lon' and 'lat' properties. * toleranceLon - {float} Optional tolerance in Geometric Coords * toleranceLat - {float} Optional tolerance in Geographic Coords - * + * * Returns: * {Boolean} Whether or not the feature is at the specified location */ atPoint: function(lonlat, toleranceLon, toleranceLat) { var atPoint = false; if(this.geometry) { - atPoint = this.geometry.atPoint(lonlat, toleranceLon, + atPoint = this.geometry.atPoint(lonlat, toleranceLon, toleranceLat); } return atPoint; @@ -16861,7 +16861,7 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { } else { pixel = location; } - + var lastPixel = this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat()); var res = this.layer.map.getResolution(); this.geometry.move(res * (pixel.x - lastPixel.x), @@ -16869,13 +16869,13 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { this.layer.drawFeature(this); return lastPixel; }, - + /** * Method: toState * Sets the new state * * Parameters: - * state - {String} + * state - {String} */ toState: function(state) { if (state == OpenLayers.State.UPDATE) { @@ -16912,24 +16912,24 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { this.state = state; } }, - + CLASS_NAME: "OpenLayers.Feature.Vector" }); /** * Constant: OpenLayers.Feature.Vector.style - * OpenLayers features can have a number of style attributes. The 'default' + * OpenLayers features can have a number of style attributes. The 'default' * style will typically be used if no other style is specified. These * styles correspond for the most part, to the styling properties defined - * by the SVG standard. + * by the SVG standard. * Information on fill properties: http://www.w3.org/TR/SVG/painting.html#FillProperties * Information on stroke properties: http://www.w3.org/TR/SVG/painting.html#StrokeProperties * * Symbolizer properties: * fill - {Boolean} Set to false if no fill is desired. * fillColor - {String} Hex fill color. Default is "#ee9900". - * fillOpacity - {Number} Fill opacity (0-1). Default is 0.4 + * fillOpacity - {Number} Fill opacity (0-1). Default is 0.4 * stroke - {Boolean} Set to false if no stroke is desired. * strokeColor - {String} Hex stroke color. Default is "#ee9900". * strokeOpacity - {Number} Stroke opacity (0-1). Default is 1. @@ -16978,11 +16978,11 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * fontStyle - {String} The font style for the label, to be provided like in CSS. * fontWeight - {String} The font weight for the label, to be provided like in CSS. * display - {String} Symbolizers will have no effect if display is set to "none". All other values have no effect. - */ + */ OpenLayers.Feature.Vector.style = { 'default': { fillColor: "#ee9900", - fillOpacity: 0.4, + fillOpacity: 0.4, hoverFillColor: "white", hoverFillOpacity: 0.8, strokeColor: "#ee9900", @@ -17005,7 +17005,7 @@ OpenLayers.Feature.Vector.style = { }, 'select': { fillColor: "blue", - fillOpacity: 0.4, + fillOpacity: 0.4, hoverFillColor: "white", hoverFillOpacity: 0.8, strokeColor: "blue", @@ -17029,7 +17029,7 @@ OpenLayers.Feature.Vector.style = { }, 'temporary': { fillColor: "#66cccc", - fillOpacity: 0.2, + fillOpacity: 0.2, hoverFillColor: "white", hoverFillOpacity: 0.8, strokeColor: "#66cccc", @@ -17054,7 +17054,7 @@ OpenLayers.Feature.Vector.style = { 'delete': { display: "none" } -}; +}; /* ====================================================================== OpenLayers/Style.js ====================================================================== */ @@ -17083,19 +17083,19 @@ OpenLayers.Style = OpenLayers.Class({ * {String} A unique id for this session. */ id: null, - + /** * APIProperty: name * {String} */ name: null, - + /** * Property: title * {String} Title of this style (set if included in SLD) */ title: null, - + /** * Property: description * {String} Description of this style (set if abstract is included in SLD) @@ -17108,19 +17108,19 @@ OpenLayers.Style = OpenLayers.Class({ * according to the NamedLayer attribute of an SLD document. */ layerName: null, - + /** * APIProperty: isDefault * {Boolean} */ isDefault: false, - - /** - * Property: rules + + /** + * Property: rules * {Array()} */ rules: null, - + /** * APIProperty: context * {Object} An optional object with properties that symbolizers' property @@ -17138,7 +17138,7 @@ OpenLayers.Style = OpenLayers.Class({ * rules defined. */ defaultStyle: null, - + /** * Property: defaultsPerSymbolizer * {Boolean} If set to true, the will extend the symbolizer @@ -17147,16 +17147,16 @@ OpenLayers.Style = OpenLayers.Class({ * graphic set to true. Default is false. */ defaultsPerSymbolizer: false, - + /** * Property: propertyStyles * {Hash of Boolean} cache of style properties that need to be parsed for * propertyNames. Property names are keys, values won't be used. */ propertyStyles: null, - - /** + + /** * Constructor: OpenLayers.Style * Creates a UserStyle. * @@ -17171,7 +17171,7 @@ OpenLayers.Style = OpenLayers.Class({ * Valid options: * rules - {Array()} List of rules to be added to the * style. - * + * * Returns: * {} */ @@ -17191,7 +17191,7 @@ OpenLayers.Style = OpenLayers.Class({ this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); }, - /** + /** * APIMethod: destroy * nullify references to prevent circular references and memory leaks */ @@ -17203,22 +17203,22 @@ OpenLayers.Style = OpenLayers.Class({ this.rules = null; this.defaultStyle = null; }, - + /** * Method: createSymbolizer * creates a style by applying all feature-dependent rules to the base * style. - * + * * Parameters: * feature - {} feature to evaluate rules for - * + * * Returns: * {Object} symbolizer hash */ createSymbolizer: function(feature) { var style = this.defaultsPerSymbolizer ? {} : this.createLiterals( OpenLayers.Util.extend({}, this.defaultStyle), feature); - + var rules = this.rules; var rule, context; @@ -17228,7 +17228,7 @@ OpenLayers.Style = OpenLayers.Class({ rule = rules[i]; // does the rule apply? var applies = rule.evaluate(feature); - + if(applies) { if(rule instanceof OpenLayers.Rule && rule.elseFilter) { elseRules.push(rule); @@ -17238,7 +17238,7 @@ OpenLayers.Style = OpenLayers.Class({ } } } - + // if no other rules apply, apply the rules with else filters if(appliedRules == false && elseRules.length > 0) { appliedRules = true; @@ -17251,14 +17251,14 @@ OpenLayers.Style = OpenLayers.Class({ if(rules.length > 0 && appliedRules == false) { style.display = "none"; } - + if (style.label != null && typeof style.label !== "string") { style.label = String(style.label); } - + return style; }, - + /** * Method: applySymbolizer * @@ -17276,7 +17276,7 @@ OpenLayers.Style = OpenLayers.Class({ OpenLayers.Style.SYMBOLIZER_PREFIXES[0]; var symbolizer = rule.symbolizer[symbolizerPrefix] || rule.symbolizer; - + if(this.defaultsPerSymbolizer === true) { var defaults = this.defaultStyle; OpenLayers.Util.applyDefaults(symbolizer, { @@ -17315,36 +17315,36 @@ OpenLayers.Style = OpenLayers.Class({ return this.createLiterals( OpenLayers.Util.extend(style, symbolizer), feature); }, - + /** * Method: createLiterals * creates literals for all style properties that have an entry in * . - * + * * Parameters: * style - {Object} style to create literals for. Will be modified * inline. * feature - {Object} - * + * * Returns: * {Object} the modified style */ createLiterals: function(style, feature) { var context = OpenLayers.Util.extend({}, feature.attributes || feature.data); OpenLayers.Util.extend(context, this.context); - + for (var i in this.propertyStyles) { style[i] = OpenLayers.Style.createLiteral(style[i], context, feature, i); } return style; }, - + /** * Method: findPropertyStyles * Looks into all rules for this style and the defaultStyle to collect * all the style hash property names containing ${...} strings that have * to be replaced using the createLiteral method before returning them. - * + * * Returns: * {Object} hash of property names that need createLiteral parsing. The * name of the property is the key, and the value is true; @@ -17375,15 +17375,15 @@ OpenLayers.Style = OpenLayers.Class({ } return propertyStyles; }, - + /** * Method: addPropertyStyles - * + * * Parameters: * propertyStyles - {Object} hash to add new property styles to. Will be * modified inline * symbolizer - {Object} search this symbolizer for property styles - * + * * Returns: * {Object} propertyStyles hash */ @@ -17398,11 +17398,11 @@ OpenLayers.Style = OpenLayers.Class({ } return propertyStyles; }, - + /** * APIMethod: addRules * Adds rules to this style. - * + * * Parameters: * rules - {Array()} */ @@ -17410,27 +17410,27 @@ OpenLayers.Style = OpenLayers.Class({ Array.prototype.push.apply(this.rules, rules); this.propertyStyles = this.findPropertyStyles(); }, - + /** * APIMethod: setDefaultStyle * Sets the default style for this style object. - * + * * Parameters: * style - {Object} Hash of style properties */ setDefaultStyle: function(style) { - this.defaultStyle = style; + this.defaultStyle = style; this.propertyStyles = this.findPropertyStyles(); }, - + /** * Method: getSymbolizerPrefix * Returns the correct symbolizer prefix according to the * geometry type of the passed geometry - * + * * Parameters: * geometry - {} - * + * * Returns: * {String} key of the according symbolizer */ @@ -17442,11 +17442,11 @@ OpenLayers.Style = OpenLayers.Class({ } } }, - + /** * APIMethod: clone * Clones this style. - * + * * Returns: * {} Clone of this style. */ @@ -17465,7 +17465,7 @@ OpenLayers.Style = OpenLayers.Class({ var defaultStyle = OpenLayers.Util.extend({}, this.defaultStyle); return new OpenLayers.Style(defaultStyle, options); }, - + CLASS_NAME: "OpenLayers.Style" }); @@ -17474,7 +17474,7 @@ OpenLayers.Style = OpenLayers.Class({ * Function: createLiteral * converts a style value holding a combination of PropertyName and Literal * into a Literal, taking the property values from the passed features. - * + * * Parameters: * value - {String} value to parse. If this string contains a construct like * "foo ${bar}", then "foo " will be taken as literal, and "${bar}" @@ -17486,7 +17486,7 @@ OpenLayers.Style = OpenLayers.Class({ * context. * property - {String} optional, name of the property for which the literal is * being created for evaluating functions in the context. - * + * * Returns: * {String} the parsed value. In the example of the value parameter above, the * result would be "foo valueOfBar", assuming that the passed feature has an @@ -17499,7 +17499,7 @@ OpenLayers.Style.createLiteral = function(value, context, feature, property) { } return value; }; - + /** * Constant: OpenLayers.Style.SYMBOLIZER_PREFIXES * {Array} prefixes of the sld symbolizers. These are the @@ -17528,15 +17528,15 @@ OpenLayers.Style.SYMBOLIZER_PREFIXES = ['Point', 'Line', 'Polygon', 'Text', * This class represents an OGC Filter. */ OpenLayers.Filter = OpenLayers.Class({ - - /** + + /** * Constructor: OpenLayers.Filter * This class represents a generic filter. * * Parameters: * options - {Object} Optional object whose properties will be set on the * instance. - * + * * Returns: * {} */ @@ -17544,7 +17544,7 @@ OpenLayers.Filter = OpenLayers.Class({ OpenLayers.Util.extend(this, options); }, - /** + /** * APIMethod: destroy * Remove reference to anything added. */ @@ -17555,29 +17555,29 @@ OpenLayers.Filter = OpenLayers.Class({ * APIMethod: evaluate * Evaluates this filter in a specific context. Instances or subclasses * are supposed to override this method. - * + * * Parameters: * context - {Object} Context to use in evaluating the filter. If a vector * feature is provided, the feature.attributes will be used as context. - * + * * Returns: * {Boolean} The filter applies. */ evaluate: function(context) { return true; }, - + /** * APIMethod: clone * Clones this filter. Should be implemented by subclasses. - * + * * Returns: * {} Clone of this filter. */ clone: function() { return null; }, - + /** * APIMethod: toString * @@ -17595,7 +17595,7 @@ OpenLayers.Filter = OpenLayers.Class({ } return string; }, - + CLASS_NAME: "OpenLayers.Filter" }); /* ====================================================================== @@ -17615,7 +17615,7 @@ OpenLayers.Filter = OpenLayers.Class({ * Class: OpenLayers.Filter.Spatial * This class represents a spatial filter. * Currently implemented: BBOX, DWithin and Intersects - * + * * Inherits from: * - */ @@ -17633,13 +17633,13 @@ OpenLayers.Filter.Spatial = OpenLayers.Class(OpenLayers.Filter, { * - OpenLayers.Filter.Spatial.CONTAINS */ type: null, - + /** * APIProperty: property * {String} Name of the context property to compare. */ property: null, - + /** * APIProperty: value * { || } The bounds or geometry @@ -17659,15 +17659,15 @@ OpenLayers.Filter.Spatial = OpenLayers.Class(OpenLayers.Filter, { * {String} The units to use for the distance, e.g. 'm'. */ distanceUnits: null, - - /** + + /** * Constructor: OpenLayers.Filter.Spatial * Creates a spatial filter. * * Parameters: * options - {Object} An optional object with properties to set on the * filter. - * + * * Returns: * {} */ @@ -17675,10 +17675,10 @@ OpenLayers.Filter.Spatial = OpenLayers.Class(OpenLayers.Filter, { /** * Method: evaluate * Evaluates this filter for a specific feature. - * + * * Parameters: * feature - {} feature to apply the filter to. - * + * * Returns: * {Boolean} The feature meets filter criteria. */ @@ -17706,7 +17706,7 @@ OpenLayers.Filter.Spatial = OpenLayers.Class(OpenLayers.Filter, { /** * APIMethod: clone * Clones this filter. - * + * * Returns: * {} Clone of this filter. */ @@ -17742,33 +17742,33 @@ OpenLayers.Filter.Spatial.CONTAINS = "CONTAINS"; * Class: OpenLayers.Filter.FeatureId * This class represents a ogc:FeatureId Filter, as being used for rule-based SLD * styling - * + * * Inherits from: * - */ OpenLayers.Filter.FeatureId = OpenLayers.Class(OpenLayers.Filter, { - /** + /** * APIProperty: fids - * {Array(String)} Feature Ids to evaluate this rule against. + * {Array(String)} Feature Ids to evaluate this rule against. * To be passed inside the params object. */ fids: null, - - /** + + /** * Property: type * {String} Type to identify this filter. */ type: "FID", - - /** + + /** * Constructor: OpenLayers.Filter.FeatureId * Creates an ogc:FeatureId rule. * * Parameters: * options - {Object} An optional object with properties to set on the * rule - * + * * Returns: * {} */ @@ -17780,12 +17780,12 @@ OpenLayers.Filter.FeatureId = OpenLayers.Class(OpenLayers.Filter, { /** * APIMethod: evaluate * evaluates this rule for a specific feature - * + * * Parameters: * feature - {} feature to apply the rule to. * For vector features, the check is run against the fid, * for plain features against the id. - * + * * Returns: * {Boolean} true if the rule applies, false if it does not */ @@ -17798,11 +17798,11 @@ OpenLayers.Filter.FeatureId = OpenLayers.Class(OpenLayers.Filter, { } return false; }, - + /** * APIMethod: clone * Clones this filter. - * + * * Returns: * {} Clone of this filter. */ @@ -17812,7 +17812,7 @@ OpenLayers.Filter.FeatureId = OpenLayers.Class(OpenLayers.Filter, { filter.fids = this.fids.slice(); return filter; }, - + CLASS_NAME: "OpenLayers.Filter.FeatureId" }); /* ====================================================================== @@ -17839,7 +17839,7 @@ OpenLayers.Filter.FeatureId = OpenLayers.Class(OpenLayers.Filter, { * - */ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { - + /** * Property: namespaces * {Object} Mapping of namespace aliases to namespace URIs. @@ -17852,7 +17852,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { ogc: "http://www.opengis.net/ogc", ows: "http://www.opengis.net/ows" }, - + /** * Property: defaultPrefix */ @@ -17869,7 +17869,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { * {String} Schema location for a particular minor version. */ schemaLocations: null, - + /** * APIProperty: srsName * {String} URI for spatial reference system. @@ -17881,12 +17881,12 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { * {Boolean} Extract attributes from GML. Default is true. */ extractAttributes: true, - + /** * APIProperty: xy * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) * Changing is not recommended, a new Format should be instantiated. - */ + */ xy: true, /** @@ -17894,7 +17894,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { * {Object} Maps feature states to node names. */ stateName: null, - + /** * Constructor: OpenLayers.Format.WFST.v1 * Instances of this class are not created directly. Use the @@ -17913,7 +17913,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { this.stateName[OpenLayers.State.DELETE] = "wfs:Delete"; OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); }, - + /** * Method: getSrsName */ @@ -17954,8 +17954,8 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { OpenLayers.Util.applyDefaults(options, { output: "features" }); - - if(typeof data == "string") { + + if(typeof data == "string") { data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); } if(data && data.nodeType == 9) { @@ -17970,7 +17970,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { } return obj; }, - + /** * Property: readers * Contains public functions, grouped by namespace prefix, that will @@ -17987,7 +17987,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { } } }, - + /** * Method: write * Given an array of features, write a WFS transaction. This assumes @@ -18010,7 +18010,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { * included. If *modified.attributes* is not set, all attributes will * be included. * - *modified.attributes* is set: Only the attributes set (i.e. to null or - * a value) in *modified.attributes* will be included. + * a value) in *modified.attributes* will be included. * If *modified.geometry* is not set, the geometry will not be included. * * Valid options include: @@ -18033,7 +18033,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { } return OpenLayers.Format.XML.prototype.write.apply(this, [node]); }, - + /** * Property: writers * As a compliment to the readers property, this structure contains public @@ -18056,10 +18056,10 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, { if (typeof this.featureType == "string") { this.writeNode("Query", options, node); } else { - for (var i=0,len = this.featureType.length; i */ OpenLayers.Format.XML.VersionedOGC = OpenLayers.Class(OpenLayers.Format.XML, { - + /** * APIProperty: defaultVersion * {String} Version number to assume if none found. */ defaultVersion: null, - + /** * APIProperty: version * {String} Specify a version string if one is known. @@ -18498,7 +18498,7 @@ OpenLayers.Format.XML.VersionedOGC = OpenLayers.Class(OpenLayers.Format.XML, { } } } else { // write - version = (options && options.version) || + version = (options && options.version) || this.version || this.defaultVersion; } return version; @@ -18610,7 +18610,7 @@ OpenLayers.Format.XML.VersionedOGC = OpenLayers.Class(OpenLayers.Format.XML, { /** * Class: OpenLayers.Filter.Logical * This class represents ogc:And, ogc:Or and ogc:Not rules. - * + * * Inherits from: * - */ @@ -18620,8 +18620,8 @@ OpenLayers.Filter.Logical = OpenLayers.Class(OpenLayers.Filter, { * APIProperty: filters * {Array()} Child filters for this filter. */ - filters: null, - + filters: null, + /** * APIProperty: type * {String} type of logical operator. Available types are: @@ -18631,14 +18631,14 @@ OpenLayers.Filter.Logical = OpenLayers.Class(OpenLayers.Filter, { */ type: null, - /** + /** * Constructor: OpenLayers.Filter.Logical * Creates a logical filter (And, Or, Not). * * Parameters: * options - {Object} An optional object with properties to set on the * filter. - * + * * Returns: * {} */ @@ -18646,8 +18646,8 @@ OpenLayers.Filter.Logical = OpenLayers.Class(OpenLayers.Filter, { this.filters = []; OpenLayers.Filter.prototype.initialize.apply(this, [options]); }, - - /** + + /** * APIMethod: destroy * Remove reference to child filters. */ @@ -18659,12 +18659,12 @@ OpenLayers.Filter.Logical = OpenLayers.Class(OpenLayers.Filter, { /** * APIMethod: evaluate * Evaluates this filter in a specific context. - * + * * Parameters: * context - {Object} Context to use in evaluating the filter. A vector - * feature may also be provided to evaluate feature attributes in + * feature may also be provided to evaluate feature attributes in * comparison filters or geometries in spatial filters. - * + * * Returns: * {Boolean} The filter applies. */ @@ -18678,7 +18678,7 @@ OpenLayers.Filter.Logical = OpenLayers.Class(OpenLayers.Filter, { } } return true; - + case OpenLayers.Filter.Logical.OR: for (i=0, len=this.filters.length; i} Clone of this filter. */ clone: function() { - var filters = []; + var filters = []; for(var i=0, len=this.filters.length; i */ @@ -18754,14 +18754,14 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { * - OpenLayers.Filter.Comparison.IS_NULL = "NULL"; */ type: null, - + /** * APIProperty: property * {String} * name of the context property to compare */ property: null, - + /** * APIProperty: value * {Number} or {String} @@ -18770,7 +18770,7 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { * "literal ${propertyName}" */ value: null, - + /** * Property: matchCase * {Boolean} Force case sensitive searches for EQUAL_TO and NOT_EQUAL_TO @@ -18779,10 +18779,10 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { * elements. This property will be serialized with those elements only * if using the v1.1.0 filter format. However, when evaluating filters * here, the matchCase property will always be respected (for EQUAL_TO - * and NOT_EQUAL_TO). Default is true. + * and NOT_EQUAL_TO). Default is true. */ matchCase: true, - + /** * APIProperty: lowerBoundary * {Number} or {String} @@ -18791,7 +18791,7 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { * "literal ${propertyName}" */ lowerBoundary: null, - + /** * APIProperty: upperBoundary * {Number} or {String} @@ -18801,14 +18801,14 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { */ upperBoundary: null, - /** + /** * Constructor: OpenLayers.Filter.Comparison * Creates a comparison rule. * * Parameters: * options - {Object} An optional object with properties to set on the * rule - * + * * Returns: * {} */ @@ -18816,7 +18816,7 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { OpenLayers.Filter.prototype.initialize.apply(this, [options]); // since matchCase on PropertyIsLike is not schema compliant, we only // want to use this if explicitly asked for - if (this.type === OpenLayers.Filter.Comparison.LIKE + if (this.type === OpenLayers.Filter.Comparison.LIKE && options.matchCase === undefined) { this.matchCase = null; } @@ -18825,11 +18825,11 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { /** * APIMethod: evaluate * Evaluates this filter in a specific context. - * + * * Parameters: * context - {Object} Context to use in evaluating the filter. If a vector * feature is provided, the feature.attributes will be used as context. - * + * * Returns: * {Boolean} The filter applies. */ @@ -18885,14 +18885,14 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { } return result; }, - + /** * APIMethod: value2regex * Converts the value of this rule into a regular expression string, * according to the wildcard characters specified. This method has to * be called after instantiation of this class, if the value is not a * regular expression already. - * + * * Parameters: * wildCard - {Char} wildcard character in the above value, default * is "*" @@ -18900,7 +18900,7 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { * default is "." * escapeChar - {Char} escape character in the above value, default is * "!" - * + * * Returns: * {String} regular expression string */ @@ -18909,13 +18909,13 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { throw new Error("'.' is an unsupported wildCard character for " + "OpenLayers.Filter.Comparison"); } - + // set UMN MapServer defaults for unspecified parameters wildCard = wildCard ? wildCard : "*"; singleChar = singleChar ? singleChar : "."; escapeChar = escapeChar ? escapeChar : "!"; - + this.value = this.value.replace( new RegExp("\\"+escapeChar+"(.|$)", "g"), "\\$1"); this.value = this.value.replace( @@ -18926,23 +18926,23 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { new RegExp("\\\\.\\*", "g"), "\\"+wildCard); this.value = this.value.replace( new RegExp("\\\\\\.", "g"), "\\"+singleChar); - + return this.value; }, - + /** * Method: regex2value * Convert the value of this rule from a regular expression string into an * ogc literal string using a wildCard of *, a singleChar of ., and an * escape of !. Leaves the property unmodified. - * + * * Returns: * {String} A string value. */ regex2value: function() { - + var value = this.value; - + // replace ! with !! value = value.replace(/!/g, "!!"); @@ -18950,32 +18950,32 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { value = value.replace(/(\\)?\\\./g, function($0, $1) { return $1 ? $0 : "!."; }); - + // replace \* with #* (watching out for \\*) value = value.replace(/(\\)?\\\*/g, function($0, $1) { return $1 ? $0 : "!*"; }); - + // replace \\ with \ value = value.replace(/\\\\/g, "\\"); // convert .* to * (the sequence #.* is not allowed) value = value.replace(/\.\*/g, "*"); - + return value; }, - + /** * APIMethod: clone * Clones this filter. - * + * * Returns: * {} Clone of this filter. */ clone: function() { return OpenLayers.Util.extend(new OpenLayers.Filter.Comparison(), this); }, - + CLASS_NAME: "OpenLayers.Filter.Comparison" }); @@ -19009,18 +19009,18 @@ OpenLayers.Filter.Comparison.IS_NULL = "NULL"; * Class: OpenLayers.Format.Filter * Read/Write ogc:Filter. Create a new instance with the * constructor. - * + * * Inherits from: * - */ OpenLayers.Format.Filter = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { - + /** * APIProperty: defaultVersion * {String} Version number to assume if none found. Default is "1.0.0". */ defaultVersion: "1.0.0", - + /** * APIMethod: write * Write an ogc:Filter given a filter object. @@ -19032,7 +19032,7 @@ OpenLayers.Format.Filter = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, * Returns: * {Elment} An ogc:Filter element node. */ - + /** * APIMethod: read * Read and Filter doc and return an object representing the Filter. @@ -19044,7 +19044,7 @@ OpenLayers.Format.Filter = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, * {} A filter object. */ - CLASS_NAME: "OpenLayers.Format.Filter" + CLASS_NAME: "OpenLayers.Format.Filter" }); /* ====================================================================== OpenLayers/Filter/Function.js @@ -19062,10 +19062,10 @@ OpenLayers.Format.Filter = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, /** * Class: OpenLayers.Filter.Function * This class represents a filter function. - * We are using this class for creation of complex + * We are using this class for creation of complex * filters that can contain filter functions as values. * Nesting function as other functions parameter is supported. - * + * * Inherits from: * - */ @@ -19076,22 +19076,22 @@ OpenLayers.Filter.Function = OpenLayers.Class(OpenLayers.Filter, { * {String} Name of the function. */ name: null, - + /** * APIProperty: params * {Array( || String || Number)} Function parameters * For now support only other Functions, String or Number */ - params: null, - - /** + params: null, + + /** * Constructor: OpenLayers.Filter.Function * Creates a filter function. * * Parameters: * options - {Object} An optional object with properties to set on the * function. - * + * * Returns: * {} */ @@ -19120,7 +19120,7 @@ OpenLayers.Filter.Function = OpenLayers.Class(OpenLayers.Filter, { */ OpenLayers.Date = { - /** + /** * APIProperty: dateRegEx * The regex to be used for validating dates. You can provide your own * regex for instance for adding support for years before BC. Default @@ -19249,7 +19249,7 @@ OpenLayers.Date = { * - */ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { - + /** * Property: namespaces * {Object} Mapping of namespace aliases to namespace URIs. @@ -19271,7 +19271,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { * {String} Schema location for a particular minor version. */ schemaLocation: null, - + /** * Constructor: OpenLayers.Format.Filter.v1 * Instances of this class are not created directly. Use the @@ -19284,7 +19284,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { initialize: function(options) { OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); }, - + /** * Method: read * @@ -19299,7 +19299,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { this.readers.ogc["Filter"].apply(this, [data, obj]); return obj.filter; }, - + /** * Property: readers * Contains public functions, grouped by namespace prefix, that will @@ -19455,12 +19455,12 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { } } }, - + /** * Method: readSpatial * * Read a {} filter. - * + * * Parameters: * node - {DOMElement} A DOM element that contains an ogc:expression. * obj - {Object} The target object. @@ -19481,8 +19481,8 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { /** * APIMethod: encodeLiteral - * Generates the string representation of a value for use in - * elements. The default encoder writes Date values as ISO 8601 + * Generates the string representation of a value for use in + * elements. The default encoder writes Date values as ISO 8601 * strings. * * Parameters: @@ -19505,7 +19505,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { * * Parameters: * value - ( || String || Number) - * node - {DOMElement} A parent DOM element + * node - {DOMElement} A parent DOM element * * Returns: * {DOMElement} Updated node element. @@ -19517,8 +19517,8 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { this.writeNode("Literal", value, node); } return node; - }, - + }, + /** * Method: write * @@ -19531,7 +19531,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { write: function(filter) { return this.writers.ogc["Filter"].apply(this, [filter]); }, - + /** * Property: writers * As a compliment to the readers property, this structure contains public @@ -19704,7 +19704,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { } return filterType; }, - + /** * Property: filterMap * {Object} Contains a member for each filter type. Values are node names @@ -19731,7 +19731,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { "FID": "_featureIds" }, - CLASS_NAME: "OpenLayers.Format.Filter.v1" + CLASS_NAME: "OpenLayers.Format.Filter.v1" }); /* ====================================================================== @@ -19742,7 +19742,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, { * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ - + /** * @requires OpenLayers/BaseTypes/Class.js */ @@ -19772,19 +19772,19 @@ OpenLayers.Geometry = OpenLayers.Class({ parent: null, /** - * Property: bounds + * Property: bounds * {} The bounds of this geometry */ bounds: null, /** * Constructor: OpenLayers.Geometry - * Creates a geometry object. + * Creates a geometry object. */ initialize: function() { this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME+ "_"); }, - + /** * Method: destroy * Destroy this geometry. @@ -19793,32 +19793,32 @@ OpenLayers.Geometry = OpenLayers.Class({ this.id = null; this.bounds = null; }, - + /** * APIMethod: clone * Create a clone of this geometry. Does not set any non-standard * properties of the cloned geometry. - * + * * Returns: * {} An exact clone of this geometry. */ clone: function() { return new OpenLayers.Geometry(); }, - + /** * Method: setBounds * Set the bounds for this Geometry. - * + * * Parameters: - * bounds - {} + * bounds - {} */ setBounds: function(bounds) { if (bounds) { this.bounds = bounds.clone(); } }, - + /** * Method: clearBounds * Nullify this components bounds and that of its parent as well. @@ -19827,16 +19827,16 @@ OpenLayers.Geometry = OpenLayers.Class({ this.bounds = null; if (this.parent) { this.parent.clearBounds(); - } + } }, - + /** * Method: extendBounds - * Extend the existing bounds to include the new bounds. + * Extend the existing bounds to include the new bounds. * If geometry's bounds is not yet set, then set a new Bounds. - * + * * Parameters: - * newBounds - {} + * newBounds - {} */ extendBounds: function(newBounds){ var bounds = this.getBounds(); @@ -19846,12 +19846,12 @@ OpenLayers.Geometry = OpenLayers.Class({ this.bounds.extend(newBounds); } }, - + /** * APIMethod: getBounds - * Get the bounds for this Geometry. If bounds is not set, it + * Get the bounds for this Geometry. If bounds is not set, it * is calculated again, this makes queries faster. - * + * * Returns: * {} */ @@ -19861,17 +19861,17 @@ OpenLayers.Geometry = OpenLayers.Class({ } return this.bounds; }, - - /** + + /** * APIMethod: calculateBounds - * Recalculate the bounds for the geometry. + * Recalculate the bounds for the geometry. */ calculateBounds: function() { // // This should be overridden by subclasses. // }, - + /** * APIMethod: distanceTo * Calculate the closest distance between two geometries (on the x-y plane). @@ -19882,7 +19882,7 @@ OpenLayers.Geometry = OpenLayers.Class({ * calculation. * * Valid options depend on the specific geometry type. - * + * * Returns: * {Number | Object} The distance between this geometry and the target. * If details is true, the return will be an object with distance, @@ -19893,7 +19893,7 @@ OpenLayers.Geometry = OpenLayers.Class({ */ distanceTo: function(geometry, options) { }, - + /** * APIMethod: getVertices * Return a list of all points in this geometry. @@ -19912,15 +19912,15 @@ OpenLayers.Geometry = OpenLayers.Class({ /** * Method: atPoint - * Note - This is only an approximation based on the bounds of the + * Note - This is only an approximation based on the bounds of the * geometry. - * + * * Parameters: * lonlat - {|Object} OpenLayers.LonLat or an * object with a 'lon' and 'lat' properties. * toleranceLon - {float} Optional tolerance in Geometric Coords * toleranceLat - {float} Optional tolerance in Geographic Coords - * + * * Returns: * {Boolean} Whether or not the geometry is at the specified location */ @@ -19931,8 +19931,8 @@ OpenLayers.Geometry = OpenLayers.Class({ var dX = (toleranceLon != null) ? toleranceLon : 0; var dY = (toleranceLat != null) ? toleranceLat : 0; - - var toleranceBounds = + + var toleranceBounds = new OpenLayers.Bounds(this.bounds.left - dX, this.bounds.bottom - dY, this.bounds.right + dX, @@ -19942,12 +19942,12 @@ OpenLayers.Geometry = OpenLayers.Class({ } return atPoint; }, - + /** * Method: getLength * Calculate the length of this geometry. This method is defined in * subclasses. - * + * * Returns: * {Float} The length of the collection by summing its parts */ @@ -19960,7 +19960,7 @@ OpenLayers.Geometry = OpenLayers.Class({ /** * Method: getArea * Calculate the area of this geometry. This method is defined in subclasses. - * + * * Returns: * {Float} The area of the collection by summing its parts */ @@ -19969,7 +19969,7 @@ OpenLayers.Geometry = OpenLayers.Class({ // return 0.0; }, - + /** * APIMethod: getCentroid * Calculate the centroid of this geometry. This method is defined in subclasses. @@ -19984,7 +19984,7 @@ OpenLayers.Geometry = OpenLayers.Class({ /** * Method: toString * Returns a text representation of the geometry. If the WKT format is - * included in a build, this will be the Well-Known Text + * included in a build, this will be the Well-Known Text * representation. * * Returns: @@ -20008,7 +20008,7 @@ OpenLayers.Geometry = OpenLayers.Class({ /** * Function: OpenLayers.Geometry.fromWKT * Generate a geometry given a Well-Known Text string. For this method to - * work, you must include the OpenLayers.Format.WKT in your build + * work, you must include the OpenLayers.Format.WKT in your build * explicitly. * * Parameters: @@ -20039,7 +20039,7 @@ OpenLayers.Geometry.fromWKT = function(wkt) { } return geom; }; - + /** * Method: OpenLayers.Geometry.segmentsIntersect * Determine whether two line segments intersect. Optionally calculates @@ -20138,7 +20138,7 @@ OpenLayers.Geometry.segmentsIntersect = function(seg1, seg2, options) { } } } - + } } else { // no calculated intersection, but segments could be within @@ -20253,22 +20253,22 @@ OpenLayers.Geometry.distanceSquaredToSegment = function(point, segment) { /** * Class: OpenLayers.Geometry.Point - * Point geometry class. - * + * Point geometry class. + * * Inherits from: - * - + * - */ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { - /** - * APIProperty: x - * {float} + /** + * APIProperty: x + * {float} */ x: null, - /** - * APIProperty: y - * {float} + /** + * APIProperty: y + * {float} */ y: null, @@ -20277,20 +20277,20 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { * Construct a point geometry. * * Parameters: - * x - {float} + * x - {float} * y - {float} - * + * */ initialize: function(x, y) { OpenLayers.Geometry.prototype.initialize.apply(this, arguments); - + this.x = parseFloat(x); this.y = parseFloat(y); }, /** * APIMethod: clone - * + * * Returns: * {} An exact clone of this OpenLayers.Geometry.Point */ @@ -20305,7 +20305,7 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { return obj; }, - /** + /** * Method: calculateBounds * Create a new Bounds based on the lon/lat */ @@ -20366,14 +20366,14 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { } return result; }, - - /** + + /** * APIMethod: equals * Determine whether another geometry is equivalent to this one. Geometries * are considered equivalent if all components have the same coordinates. - * + * * Parameters: - * geom - {} The geometry to test. + * geom - {} The geometry to test. * * Returns: * {Boolean} The supplied geometry is equivalent to this geometry. @@ -20386,18 +20386,18 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { } return equals; }, - + /** * Method: toShortString * * Returns: - * {String} Shortened String representation of Point object. + * {String} Shortened String representation of Point object. * (ex. "5, 42") */ toShortString: function() { return (this.x + ", " + this.y); }, - + /** * APIMethod: move * Moves a geometry by the given displacement along positive x and y axes. @@ -20405,7 +20405,7 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { * bounds. * * Parameters: - * x - {Float} Distance to move geometry in positive x direction. + * x - {Float} Distance to move geometry in positive x direction. * y - {Float} Distance to move geometry in positive y direction. */ move: function(x, y) { @@ -20431,7 +20431,7 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { this.y = origin.y + (radius * Math.sin(theta)); this.clearBounds(); }, - + /** * APIMethod: getCentroid * @@ -20454,9 +20454,9 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { * distance between the point and origin. * origin - {} Point of origin for resizing * ratio - {Float} Optional x:y ratio for resizing. Default ratio is 1. - * + * * Returns: - * {} - The current geometry. + * {} - The current geometry. */ resize: function(scale, origin, ratio) { ratio = (ratio == undefined) ? 1 : ratio; @@ -20465,7 +20465,7 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { this.clearBounds(); return this; }, - + /** * APIMethod: intersects * Determine if the input geometry intersects this one. @@ -20485,24 +20485,24 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { } return intersect; }, - + /** * APIMethod: transform * Translate the x,y properties of the point from source to dest. - * + * * Parameters: - * source - {} + * source - {} * dest - {} - * + * * Returns: - * {} + * {} */ transform: function(source, dest) { if ((source && dest)) { OpenLayers.Projection.transform( - this, source, dest); + this, source, dest); this.bounds = null; - } + } return this; }, @@ -20540,21 +20540,21 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, { /** * Class: OpenLayers.Geometry.Collection - * A Collection is exactly what it sounds like: A collection of different + * A Collection is exactly what it sounds like: A collection of different * Geometries. These are stored in the local parameter (which - * can be passed as a parameter to the constructor). - * - * As new geometries are added to the collection, they are NOT cloned. - * When removing geometries, they need to be specified by reference (ie you + * can be passed as a parameter to the constructor). + * + * As new geometries are added to the collection, they are NOT cloned. + * When removing geometries, they need to be specified by reference (ie you * have to pass in the *exact* geometry to be removed). - * + * * The and functions here merely iterate through * the components, summing their respective areas and lengths. * * Create a new instance with the constructor. * * Inherits from: - * - + * - */ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { @@ -20563,7 +20563,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { * {Array()} The component parts of this geometry */ components: null, - + /** * Property: componentTypes * {Array(String)} An array of class names representing the types of @@ -20576,7 +20576,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { * Constructor: OpenLayers.Geometry.Collection * Creates a Geometry Collection -- a list of geoms. * - * Parameters: + * Parameters: * components - {Array()} Optional array of geometries * */ @@ -20610,31 +20610,31 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { for(var i=0, len=this.components.length; i} A geometry to add * index - {int} Optional index into the array to insert the component * * Returns: * {Boolean} The component geometry was successfully added - */ + */ addComponent: function(component, index) { var added = false; if(component) { @@ -20693,7 +20693,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { if(index != null && (index < this.components.length)) { var components1 = this.components.slice(0, index); - var components2 = this.components.slice(index, + var components2 = this.components.slice(index, this.components.length); components1.push(component); this.components = components1.concat(components2); @@ -20707,7 +20707,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { } return added; }, - + /** * APIMethod: removeComponents * Remove components from this geometry. @@ -20715,7 +20715,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { * Parameters: * components - {Array()} The components to be removed * - * Returns: + * Returns: * {Boolean} A component was removed. */ removeComponents: function(components) { @@ -20729,21 +20729,21 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { } return removed; }, - + /** * Method: removeComponent * Remove a component from this geometry. * * Parameters: - * component - {} + * component - {} * - * Returns: + * Returns: * {Boolean} The component was removed. */ removeComponent: function(component) { - + OpenLayers.Util.removeItem(this.components, component); - + // clearBounds() so that it gets recalculated on the next call // to this.getBounds(); this.clearBounds(); @@ -20764,7 +20764,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { } return length; }, - + /** * APIMethod: getArea * Calculate the area of this geometry. Note how this function is overridden @@ -20781,7 +20781,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { return area; }, - /** + /** * APIMethod: getGeodesicArea * Calculate the approximate area of the polygon were it projected onto * the earth. @@ -20790,7 +20790,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { * projection - {} The spatial reference system * for the geometry coordinates. If not provided, Geographic/WGS84 is * assumed. - * + * * Reference: * Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for * Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion @@ -20806,7 +20806,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { } return area; }, - + /** * APIMethod: getCentroid * @@ -20827,7 +20827,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { if (!len) { return false; } - + var areas = []; var centroids = []; var areaSum = 0; @@ -20861,7 +20861,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { } areaSum /= minArea; } - + var xSum = 0, ySum = 0, centroid, area; for (var i=0; i} The spatial reference system * for the geometry coordinates. If not provided, Geographic/WGS84 is * assumed. - * + * * Returns: * {Float} The appoximate geodesic length of the geometry in meters. */ @@ -20900,7 +20900,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { * bounds. * * Parameters: - * x - {Float} Distance to move geometry in positive x direction. + * x - {Float} Distance to move geometry in positive x direction. * y - {Float} Distance to move geometry in positive y direction. */ move: function(x, y) { @@ -20936,9 +20936,9 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { * will have four times the area). * origin - {} Point of origin for resizing * ratio - {Float} Optional x:y ratio for resizing. Default ratio is 1. - * + * * Returns: - * {} - The current geometry. + * {} - The current geometry. */ resize: function(scale, origin, ratio) { for(var i=0; i} The geometry to test. + * geometry - {} The geometry to test. * * Returns: * {Boolean} The supplied geometry is equivalent to this geometry. @@ -21026,17 +21026,17 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { /** * APIMethod: transform * Reproject the components geometry from source to dest. - * + * * Parameters: - * source - {} + * source - {} * dest - {} - * + * * Returns: - * {} + * {} */ transform: function(source, dest) { if (source && dest) { - for (var i=0, len=this.components.length; i)} + * components - {Array()} * * Returns: * {} @@ -21148,7 +21148,7 @@ OpenLayers.Geometry.MultiPoint = OpenLayers.Class( addPoint: function(point, index) { this.addComponent(point, index); }, - + /** * APIMethod: removePoint * Wrapper for @@ -21177,33 +21177,33 @@ OpenLayers.Geometry.MultiPoint = OpenLayers.Class( /** * Class: OpenLayers.Geometry.Curve - * A Curve is a MultiPoint, whose points are assumed to be connected. To - * this end, we provide a "getLength()" function, which iterates through - * the points, summing the distances between them. - * - * Inherits: + * A Curve is a MultiPoint, whose points are assumed to be connected. To + * this end, we provide a "getLength()" function, which iterates through + * the points, summing the distances between them. + * + * Inherits: * - */ OpenLayers.Geometry.Curve = OpenLayers.Class(OpenLayers.Geometry.MultiPoint, { /** * Property: componentTypes - * {Array(String)} An array of class names representing the types of - * components that the collection can include. A null + * {Array(String)} An array of class names representing the types of + * components that the collection can include. A null * value means the component types are not restricted. */ componentTypes: ["OpenLayers.Geometry.Point"], /** * Constructor: OpenLayers.Geometry.Curve - * + * * Parameters: * point - {Array()} */ - + /** * APIMethod: getLength - * + * * Returns: * {Float} The length of the curve */ @@ -21225,7 +21225,7 @@ OpenLayers.Geometry.Curve = OpenLayers.Class(OpenLayers.Geometry.MultiPoint, { * projection - {} The spatial reference system * for the geometry coordinates. If not provided, Geographic/WGS84 is * assumed. - * + * * Returns: * {Float} The appoximate geodesic length of the geometry in meters. */ @@ -21270,9 +21270,9 @@ OpenLayers.Geometry.Curve = OpenLayers.Class(OpenLayers.Geometry.MultiPoint, { /** * Class: OpenLayers.Geometry.LineString - * A LineString is a Curve which, once two points have been added to it, can + * A LineString is a Curve which, once two points have been added to it, can * never be less than two points long. - * + * * Inherits from: * - */ @@ -21290,24 +21290,24 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { /** * APIMethod: removeComponent - * Only allows removal of a point if there are three or more points in + * Only allows removal of a point if there are three or more points in * the linestring. (otherwise the result would be just a single point) * - * Parameters: + * Parameters: * point - {} The point to be removed * - * Returns: + * Returns: * {Boolean} The component was removed. */ removeComponent: function(point) { var removed = this.components && (this.components.length > 2); if (removed) { - OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, + OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, arguments); } return removed; }, - + /** * APIMethod: intersects * Test for instersection between two geometries. This is a cheapo @@ -21379,7 +21379,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { } return intersect; }, - + /** * Method: getSortedSegments * @@ -21417,7 +21417,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { } return segments.sort(byX1); }, - + /** * Method: splitWithSegment * Split this geometry with the given segment. @@ -21514,7 +21514,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { /** * Method: split * Use this geometry (the source) to attempt to split a target geometry. - * + * * Parameters: * target - {} The target geometry. * options - {Object} Properties of this object will be used to determine @@ -21529,7 +21529,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { * tolerance - {Number} If a non-null value is provided, intersections * within the tolerance distance of an existing vertex on the source * will be assumed to occur at the vertex. - * + * * Returns: * {Array} A list of geometries (of this same type as the target) that * result from splitting the target with the source geometry. The @@ -21633,7 +21633,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { * tolerance - {Number} If a non-null value is provided, intersections * within the tolerance distance of an existing vertex on the source * will be assumed to occur at the vertex. - * + * * Returns: * {Array} A list of geometries (of this same type as the target) that * result from splitting the target with the source geometry. The @@ -21739,7 +21739,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { } else { best = best.distance; } - } else if(geometry instanceof OpenLayers.Geometry.LineString) { + } else if(geometry instanceof OpenLayers.Geometry.LineString) { var segs0 = this.getSortedSegments(); var segs1 = geometry.getSortedSegments(); var seg0, seg1, intersection, x0, y0; @@ -21810,7 +21810,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { } return best; }, - + /** * APIMethod: simplify * This function will return a simplified LineString. @@ -21829,18 +21829,18 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { if (points.length < 3) { return this; } - + var compareNumbers = function(a, b){ return (a-b); }; - + /** * Private function doing the Douglas-Peucker reduction */ var douglasPeuckerReduction = function(points, firstPoint, lastPoint, tolerance){ var maxDistance = 0; var indexFarthest = 0; - + for (var index = firstPoint, distance; index < lastPoint; index++) { distance = perpendicularDistance(points[firstPoint], points[lastPoint], points[index]); if (distance > maxDistance) { @@ -21848,7 +21848,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { indexFarthest = index; } } - + if (maxDistance > tolerance && indexFarthest != firstPoint) { //Add the largest point that exceeds the tolerance pointIndexsToKeep.push(indexFarthest); @@ -21856,7 +21856,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { douglasPeuckerReduction(points, indexFarthest, lastPoint, tolerance); } }; - + /** * Private function calculating the perpendicular distance * TODO: check whether OpenLayers.Geometry.LineString::distanceTo() is faster or slower @@ -21866,29 +21866,29 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { //Base = v((x1-x2)²+(x1-x2)²) *Base of Triangle* //Area = .5*Base*H *Solve for height //Height = Area/.5/Base - + var area = Math.abs(0.5 * (point1.x * point2.y + point2.x * point.y + point.x * point1.y - point2.x * point1.y - point.x * point2.y - point1.x * point.y)); var bottom = Math.sqrt(Math.pow(point1.x - point2.x, 2) + Math.pow(point1.y - point2.y, 2)); var height = area / bottom * 2; - + return height; }; - + var firstPoint = 0; var lastPoint = points.length - 1; var pointIndexsToKeep = []; - + //Add the first and last index to the keepers pointIndexsToKeep.push(firstPoint); pointIndexsToKeep.push(lastPoint); - + //The first and the last point cannot be the same while (points[firstPoint].equals(points[lastPoint])) { lastPoint--; //Addition: the first point not equal to first point in the LineString is kept as well pointIndexsToKeep.push(lastPoint); } - + douglasPeuckerReduction(points, firstPoint, lastPoint, tolerance); var returnPoints = []; pointIndexsToKeep.sort(compareNumbers); @@ -21896,7 +21896,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { returnPoints.push(points[pointIndexsToKeep[index]]); } return new OpenLayers.Geometry.LineString(returnPoints); - + } else { return this; @@ -21923,10 +21923,10 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, { * Class: OpenLayers.Geometry.MultiLineString * A MultiLineString is a geometry with multiple * components. - * + * * Inherits from: * - - * - + * - */ OpenLayers.Geometry.MultiLineString = OpenLayers.Class( OpenLayers.Geometry.Collection, { @@ -21943,15 +21943,15 @@ OpenLayers.Geometry.MultiLineString = OpenLayers.Class( * Constructor: OpenLayers.Geometry.MultiLineString * Constructor for a MultiLineString Geometry. * - * Parameters: - * components - {Array()} + * Parameters: + * components - {Array()} * */ - + /** * Method: split * Use this geometry (the source) to attempt to split a target geometry. - * + * * Parameters: * geometry - {} The target geometry. * options - {Object} Properties of this object will be used to determine @@ -21966,7 +21966,7 @@ OpenLayers.Geometry.MultiLineString = OpenLayers.Class( * tolerance - {Number} If a non-null value is provided, intersections * within the tolerance distance of an existing vertex on the source * will be assumed to occur at the vertex. - * + * * Returns: * {Array} A list of geometries (of this same type as the target) that * result from splitting the target with the source geometry. The @@ -21986,7 +21986,7 @@ OpenLayers.Geometry.MultiLineString = OpenLayers.Class( for(var i=0, len=this.components.length; i */ @@ -22198,8 +22198,8 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( /** * Property: componentTypes - * {Array(String)} An array of class names representing the types of - * components that the collection can include. A null + * {Array(String)} An array of class names representing the types of + * components that the collection can include. A null * value means the component types are not restricted. */ componentTypes: ["OpenLayers.Geometry.Point"], @@ -22211,7 +22211,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( * point does not equal the first point), the constructor will close * the ring. If the ring is already closed (the last point does equal * the first point), it will be left closed. - * + * * Parameters: * points - {Array()} points */ @@ -22220,16 +22220,16 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( * APIMethod: addComponent * Adds a point to geometry components. If the point is to be added to * the end of the components array and it is the same as the last point - * already in that array, the duplicate point is not added. This has - * the effect of closing the ring if it is not already closed, and - * doing the right thing if it is already closed. This behavior can - * be overridden by calling the method with a non-null index as the + * already in that array, the duplicate point is not added. This has + * the effect of closing the ring if it is not already closed, and + * doing the right thing if it is already closed. This behavior can + * be overridden by calling the method with a non-null index as the * second argument. * * Parameters: * point - {} * index - {Integer} Index into the array to insert the component - * + * * Returns: * {Boolean} Was the Point successfully added? */ @@ -22242,18 +22242,18 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( // given an index, add the point // without an index only add non-duplicate points if(index != null || !point.equals(lastPoint)) { - added = OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, + added = OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, arguments); } //append copy of first point var firstPoint = this.components[0]; - OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, + OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, [firstPoint]); - + return added; }, - + /** * APIMethod: removeComponent * Removes a point from geometry components. @@ -22261,7 +22261,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( * Parameters: * point - {} * - * Returns: + * Returns: * {Boolean} The component was removed. */ removeComponent: function(point) { @@ -22269,18 +22269,18 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( if (removed) { //remove last point this.components.pop(); - + //remove our point - OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, + OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, arguments); //append copy of first point var firstPoint = this.components[0]; - OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, + OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, [firstPoint]); } return removed; }, - + /** * APIMethod: move * Moves a geometry by the given displacement along positive x and y axes. @@ -22288,7 +22288,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( * bounds. * * Parameters: - * x - {Float} Distance to move geometry in positive x direction. + * x - {Float} Distance to move geometry in positive x direction. * y - {Float} Distance to move geometry in positive y direction. */ move: function(x, y) { @@ -22324,9 +22324,9 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( * will have four times the area). * origin - {} Point of origin for resizing * ratio - {Float} Optional x:y ratio for resizing. Default ratio is 1. - * + * * Returns: - * {} - The current geometry. + * {} - The current geometry. */ resize: function(scale, origin, ratio) { for(var i=0, len=this.components.length; i} * dest - {} - * + * * Returns: - * {} + * {} */ transform: function(source, dest) { if (source && dest) { @@ -22356,7 +22356,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( } return this; }, - + /** * APIMethod: getCentroid * @@ -22402,7 +22402,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( * APIMethod: getArea * Note - The area is positive if the ring is oriented CW, otherwise * it will be negative. - * + * * Returns: * {Float} The signed area for a ring. */ @@ -22419,7 +22419,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( } return area; }, - + /** * APIMethod: getGeodesicArea * Calculate the approximate area of the polygon were it projected onto @@ -22430,7 +22430,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( * projection - {} The spatial reference system * for the geometry coordinates. If not provided, Geographic/WGS84 is * assumed. - * + * * Reference: * Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for * Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion @@ -22463,7 +22463,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( } return area; }, - + /** * Method: containsPoint * Test if a point is inside a linear ring. For the case where a point @@ -22495,7 +22495,7 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( end = this.components[i + 1]; x2 = approx(end.x, digs); y2 = approx(end.y, digs); - + /** * The following conditions enforce five edge-crossing rules: * 1. points coincident with edges are considered contained; @@ -22619,12 +22619,12 @@ OpenLayers.Geometry.LinearRing = OpenLayers.Class( */ /** - * Class: OpenLayers.Geometry.Polygon - * Polygon is a collection of Geometry.LinearRings. - * + * Class: OpenLayers.Geometry.Polygon + * Polygon is a collection of Geometry.LinearRings. + * * Inherits from: - * - - * - + * - + * - */ OpenLayers.Geometry.Polygon = OpenLayers.Class( OpenLayers.Geometry.Collection, { @@ -22639,20 +22639,20 @@ OpenLayers.Geometry.Polygon = OpenLayers.Class( /** * Constructor: OpenLayers.Geometry.Polygon - * Constructor for a Polygon geometry. - * The first ring (this.component[0])is the outer bounds of the polygon and + * Constructor for a Polygon geometry. + * The first ring (this.component[0])is the outer bounds of the polygon and * all subsequent rings (this.component[1-n]) are internal holes. * * * Parameters: - * components - {Array()} + * components - {Array()} */ - /** + /** * APIMethod: getArea - * Calculated by subtracting the areas of the internal holes from the + * Calculated by subtracting the areas of the internal holes from the * area of the outer hole. - * + * * Returns: * {float} The area of the geometry */ @@ -22667,7 +22667,7 @@ OpenLayers.Geometry.Polygon = OpenLayers.Class( return area; }, - /** + /** * APIMethod: getGeodesicArea * Calculate the approximate area of the polygon were it projected onto * the earth. @@ -22676,7 +22676,7 @@ OpenLayers.Geometry.Polygon = OpenLayers.Class( * projection - {} The spatial reference system * for the geometry coordinates. If not provided, Geographic/WGS84 is * assumed. - * + * * Reference: * Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for * Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion @@ -22727,7 +22727,7 @@ OpenLayers.Geometry.Polygon = OpenLayers.Class( } else { // in hole contained = false; - } + } break; } } @@ -22838,7 +22838,7 @@ OpenLayers.Geometry.Polygon = OpenLayers.Class( /** * APIMethod: createRegularPolygon - * Create a regular polygon around a radius. Useful for creating circles + * Create a regular polygon around a radius. Useful for creating circles * and the like. * * Parameters: @@ -22847,7 +22847,7 @@ OpenLayers.Geometry.Polygon = OpenLayers.Class( * sides - {Integer} Number of sides. 20 approximates a circle. * rotation - {Float} original angle of rotation, in degrees. */ -OpenLayers.Geometry.Polygon.createRegularPolygon = function(origin, radius, sides, rotation) { +OpenLayers.Geometry.Polygon.createRegularPolygon = function(origin, radius, sides, rotation) { var angle = Math.PI * ((1/sides) - (1/2)); if(rotation) { angle += (rotation / 180) * Math.PI; @@ -22882,7 +22882,7 @@ OpenLayers.Geometry.Polygon.createRegularPolygon = function(origin, radius, side * MultiPolygon is a geometry with multiple * components. Create a new instance with the * constructor. - * + * * Inherits from: * - */ @@ -22933,50 +22933,50 @@ OpenLayers.Geometry.MultiPolygon = OpenLayers.Class( * Class: OpenLayers.Format.GML * Read/Write GML. Create a new instance with the * constructor. Supports the GML simple features profile. - * + * * Inherits from: * - */ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { - + /** * APIProperty: featureNS * {String} Namespace used for feature attributes. Default is * "http://mapserver.gis.umn.edu/mapserver". */ featureNS: "http://mapserver.gis.umn.edu/mapserver", - + /** * APIProperty: featurePrefix * {String} Namespace alias (or prefix) for feature nodes. Default is * "feature". */ featurePrefix: "feature", - + /** * APIProperty: featureName * {String} Element name for features. Default is "featureMember". */ - featureName: "featureMember", - + featureName: "featureMember", + /** * APIProperty: layerName * {String} Name of data layer. Default is "features". */ layerName: "features", - + /** * APIProperty: geometryName * {String} Name of geometry element. Defaults to "geometry". */ geometryName: "geometry", - - /** + + /** * APIProperty: collectionName * {String} Name of featureCollection element. */ collectionName: "FeatureCollection", - + /** * APIProperty: gmlns * {String} GML Namespace. @@ -22988,14 +22988,14 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { * {Boolean} Extract attributes from GML. */ extractAttributes: true, - + /** * APIProperty: xy * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) * Changing is not recommended, a new Format should be instantiated. - */ + */ xy: true, - + /** * Constructor: OpenLayers.Format.GML * Create a new parser for GML. @@ -23017,8 +23017,8 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { /** * APIMethod: read - * Read data from a string, and return a list of features. - * + * Read data from a string, and return a list of features. + * * Parameters: * data - {String} or {DOMElement} data to read/parse. * @@ -23026,7 +23026,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { * {Array()} An array of features. */ read: function(data) { - if(typeof data == "string") { + if(typeof data == "string") { data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); } var featureNodes = this.getElementsByTagNameNS(data.documentElement, @@ -23041,15 +23041,15 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } return features; }, - + /** * Method: parseFeature * This function is the core of the GML parsing code in OpenLayers. * It creates the geometries that are then attached to the returned * feature, and calls parseAttributes() to get attribute data out. - * + * * Parameters: - * node - {DOMElement} A GML feature node. + * node - {DOMElement} A GML feature node. */ parseFeature: function(node) { // only accept one geometry per feature - look for highest "order" @@ -23068,9 +23068,9 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { if(parser) { geometry = parser.apply(this, [nodeList[0]]); if (this.internalProjection && this.externalProjection) { - geometry.transform(this.externalProjection, - this.internalProjection); - } + geometry.transform(this.externalProjection, + this.internalProjection); + } } else { throw new TypeError("Unsupported geometry type: " + type); } @@ -23093,7 +23093,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { geometry = box.toGeometry(); } } - + // construct feature (optionally with attributes) var attributes; if(this.extractAttributes) { @@ -23101,13 +23101,13 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } var feature = new OpenLayers.Feature.Vector(geometry, attributes); feature.bounds = bounds; - + feature.gml = { featureType: node.firstChild.nodeName.split(":")[1], featureNS: node.firstChild.namespaceURI, featureNSPrefix: node.firstChild.prefix }; - + // assign fid - this can come from a "fid" or "id" attribute var childNode = node.firstChild; var fid; @@ -23124,14 +23124,14 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { feature.fid = fid; return feature; }, - + /** * Property: parseGeometry * Properties of this object are the functions that parse geometries based * on their type. */ parseGeometry: { - + /** * Method: parseGeometry.point * Given a GML node representing a point geometry, create an OpenLayers @@ -23188,12 +23188,12 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } } } - + // preserve third dimension if(coords.length == 2) { coords[2] = null; } - + if (this.xy) { return new OpenLayers.Geometry.Point(coords[0], coords[1], coords[2]); @@ -23203,7 +23203,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { coords[2]); } }, - + /** * Method: parseGeometry.multipoint * Given a GML node representing a multipoint geometry, create an @@ -23230,7 +23230,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } return new OpenLayers.Geometry.MultiPoint(components); }, - + /** * Method: parseGeometry.linestring * Given a GML node representing a linestring geometry, create an @@ -23312,7 +23312,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } return line; }, - + /** * Method: parseGeometry.multilinestring * Given a GML node representing a multilinestring geometry, create an @@ -23340,7 +23340,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } return new OpenLayers.Geometry.MultiLineString(components); }, - + /** * Method: parseGeometry.polygon * Given a GML node representing a polygon geometry, create an @@ -23369,7 +23369,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } return new OpenLayers.Geometry.Polygon(components); }, - + /** * Method: parseGeometry.multipolygon * Given a GML node representing a multipolygon geometry, create an @@ -23397,22 +23397,22 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } return new OpenLayers.Geometry.MultiPolygon(components); }, - + envelope: function(node) { var components = []; var coordString; var envelope; - + var lpoint = this.getElementsByTagNameNS(node, this.gmlns, "lowerCorner"); if (lpoint.length > 0) { var coords = []; - + if(lpoint.length > 0) { coordString = lpoint[0].firstChild.nodeValue; coordString = coordString.replace(this.regExes.trimSpace, ""); coords = coordString.split(this.regExes.splitSpace); } - + if(coords.length == 2) { coords[2] = null; } @@ -23422,17 +23422,17 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { var lowerPoint = new OpenLayers.Geometry.Point(coords[1], coords[0],coords[2]); } } - + var upoint = this.getElementsByTagNameNS(node, this.gmlns, "upperCorner"); if (upoint.length > 0) { var coords = []; - + if(upoint.length > 0) { coordString = upoint[0].firstChild.nodeValue; coordString = coordString.replace(this.regExes.trimSpace, ""); coords = coordString.split(this.regExes.splitSpace); } - + if(coords.length == 2) { coords[2] = null; } @@ -23442,18 +23442,18 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { var upperPoint = new OpenLayers.Geometry.Point(coords[1], coords[0],coords[2]); } } - + if (lowerPoint && upperPoint) { components.push(new OpenLayers.Geometry.Point(lowerPoint.x, lowerPoint.y)); components.push(new OpenLayers.Geometry.Point(upperPoint.x, lowerPoint.y)); components.push(new OpenLayers.Geometry.Point(upperPoint.x, upperPoint.y)); components.push(new OpenLayers.Geometry.Point(lowerPoint.x, upperPoint.y)); components.push(new OpenLayers.Geometry.Point(lowerPoint.x, lowerPoint.y)); - + var ring = new OpenLayers.Geometry.LinearRing(components); envelope = new OpenLayers.Geometry.Polygon([ring]); } - return envelope; + return envelope; }, /** @@ -23487,9 +23487,9 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { parseFloat(endPoint[1]) ); } } - + }, - + /** * Method: parseAttributes * @@ -23538,11 +23538,11 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } return attributes; }, - + /** * APIMethod: write - * Generate a GML document string given a list of features. - * + * Generate a GML document string given a list of features. + * * Parameters: * features - {Array()} List of features to * serialize into a string. @@ -23562,7 +23562,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { return OpenLayers.Format.XML.prototype.write.apply(this, [gml]); }, - /** + /** * Method: createFeatureXML * Accept an OpenLayers.Feature.Vector, and build a GML node for it. * @@ -23588,27 +23588,27 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { featureContainer.setAttribute("fid", fid); featureContainer.appendChild(geomContainer); for(var attr in feature.attributes) { - var attrText = this.createTextNode(feature.attributes[attr]); + var attrText = this.createTextNode(feature.attributes[attr]); var nodename = attr.substring(attr.lastIndexOf(":") + 1); var attrContainer = this.createElementNS(this.featureNS, this.featurePrefix + ":" + nodename); attrContainer.appendChild(attrText); featureContainer.appendChild(attrContainer); - } + } featureNode.appendChild(featureContainer); return featureNode; }, - + /** * APIMethod: buildGeometryNode */ buildGeometryNode: function(geometry) { if (this.externalProjection && this.internalProjection) { geometry = geometry.clone(); - geometry.transform(this.internalProjection, + geometry.transform(this.internalProjection, this.externalProjection); - } + } var className = geometry.CLASS_NAME; var type = className.substring(className.lastIndexOf(".") + 1); var builder = this.buildGeometry[type.toLowerCase()]; @@ -23641,7 +23641,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { gml.appendChild(this.buildCoordinatesNode(geometry)); return gml; }, - + /** * Method: buildGeometry.multipoint * Given an OpenLayers multipoint geometry, create a GML multipoint. @@ -23656,7 +23656,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { var gml = this.createElementNS(this.gmlns, "gml:MultiPoint"); var points = geometry.components; var pointMember, pointGeom; - for(var i=0; i... * (end) * - * Parameters: - * geometry - {} + * Parameters: + * geometry - {} * * Returns: * {XmlNode} created xmlNode @@ -23824,17 +23824,17 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } else { var points = (geometry.components) ? geometry.components : [geometry]; for(var i=0; i */ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { - + /** * Property: namespaces * {Object} Mapping of namespace aliases to namespace URIs. @@ -23877,7 +23877,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { xsi: "http://www.w3.org/2001/XMLSchema-instance", wfs: "http://www.opengis.net/wfs" // this is a convenience for reading wfs:FeatureCollection }, - + /** * Property: defaultPrefix */ @@ -23888,13 +23888,13 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { * {String} Schema location for a particular minor version. */ schemaLocation: null, - + /** * APIProperty: featureType * {Array(String) or String} The local (without prefix) feature typeName(s). */ featureType: null, - + /** * APIProperty: featureNS * {String} The feature namespace. Must be set in the options at @@ -23914,7 +23914,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { * {Boolean} Extract attributes from GML. Default is true. */ extractAttributes: true, - + /** * APIProperty: srsName * {String} URI for spatial reference system. This is optional for @@ -23928,7 +23928,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { * APIProperty: xy * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) * Changing is not recommended, a new Format should be instantiated. - */ + */ xy: true, /** @@ -23944,7 +23944,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { * of featuretypes. */ singleFeatureType: null, - + /** * Property: autoConfig * {Boolean} Indicates if the format was configured without a , @@ -23980,7 +23980,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { * this instance. * * Valid options properties: - * featureType - {Array(String) or String} Local (without prefix) feature + * featureType - {Array(String) or String} Local (without prefix) feature * typeName(s) (required for write). * featureNS - {String} Feature namespace (required for write). * geometryName - {String} Geometry element name (required for write). @@ -23993,7 +23993,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { } this.singleFeatureType = !options || (typeof options.featureType === "string"); }, - + /** * Method: read * @@ -24005,7 +24005,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { * {Array()} An array of features. */ read: function(data) { - if(typeof data == "string") { + if(typeof data == "string") { data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); } if(data && data.nodeType == 9) { @@ -24035,7 +24035,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { } return features; }, - + /** * Method: readNode * Shorthand for applying one of the named readers given the node @@ -24072,7 +24072,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { } return OpenLayers.Format.XML.prototype.readNode.apply(this, [node, obj]); }, - + /** * Property: readers * Contains public functions, grouped by namespace prefix, that will @@ -24090,7 +24090,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { this.readChildNodes(node, obj); }, "featureMembers": function(node, obj) { - this.readChildNodes(node, obj); + this.readChildNodes(node, obj); }, "name": function(node, obj) { obj.name = this.getChildValue(node); @@ -24310,7 +24310,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { } } }, - + /** * Method: write * @@ -24338,7 +24338,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { return OpenLayers.Format.XML.prototype.write.apply(this, [root]); }, - + /** * Property: writers * As a compliment to the readers property, this structure contains public @@ -24431,7 +24431,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { geometry = geometry.clone().transform( this.internalProjection, this.externalProjection ); - } + } var node = this.createElementNSPlus( "feature:" + this.geometryName ); @@ -24465,7 +24465,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { } } }, - + /** * Method: setGeometryTypes * Sets the mapping. @@ -24482,7 +24482,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { }; }, - CLASS_NAME: "OpenLayers.Format.GML.Base" + CLASS_NAME: "OpenLayers.Format.GML.Base" }); /* ====================================================================== @@ -24506,7 +24506,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { * - */ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, { - + /** * Property: schemaLocation * {String} Schema location for a particular minor version. The writers @@ -24523,7 +24523,7 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, { * instantiation). */ curve: false, - + /** * Property: multiCurve * {Boolean} Write gml:MultiCurve instead of gml:MultiLineString. Since @@ -24533,7 +24533,7 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, { * instantiation). */ multiCurve: true, - + /** * Property: surface * {Boolean} Write gml:Surface instead of gml:Polygon elements. This also @@ -24735,11 +24735,11 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, { this.readers.gml.pos.apply(this, [node, obj]); container.points[1] = obj.points[0]; } - }, OpenLayers.Format.GML.Base.prototype.readers["gml"]), + }, OpenLayers.Format.GML.Base.prototype.readers["gml"]), "feature": OpenLayers.Format.GML.Base.prototype.readers["feature"], "wfs": OpenLayers.Format.GML.Base.prototype.readers["wfs"] }, - + /** * Method: write * @@ -24831,7 +24831,7 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, { } return this.createElementNSPlus("gml:posList", { value: parts.join(" ") - }); + }); }, "Surface": function(geometry) { var node = this.createElementNSPlus("gml:Surface"); @@ -24962,8 +24962,8 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, { "OpenLayers.Geometry.Collection": "GeometryCollection" }; }, - - CLASS_NAME: "OpenLayers.Format.GML.v3" + + CLASS_NAME: "OpenLayers.Format.GML.v3" }); /* ====================================================================== @@ -24990,20 +24990,20 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, { * ogc:PropertyIsNotEqual elements. * - writes matchCase attribute from comparison filters of type EQUAL_TO, * NOT_EQUAL_TO and LIKE. - * - * Inherits from: + * + * Inherits from: * - * - */ OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class( OpenLayers.Format.GML.v3, OpenLayers.Format.Filter.v1, { - + /** * Constant: VERSION * {String} 1.1.0 */ VERSION: "1.1.0", - + /** * Property: schemaLocation * {String} http://www.opengis.net/ogc/filter/1.1.0/filter.xsd @@ -25066,7 +25066,7 @@ OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class( } }, OpenLayers.Format.Filter.v1.prototype.readers["ogc"]), "gml": OpenLayers.Format.GML.v3.prototype.readers["gml"], - "feature": OpenLayers.Format.GML.v3.prototype.readers["feature"] + "feature": OpenLayers.Format.GML.v3.prototype.readers["feature"] }, /** @@ -25118,7 +25118,7 @@ OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class( if(filter.projection) { box.setAttribute("srsName", filter.projection); } - node.appendChild(box); + node.appendChild(box); return node; }, "SortBy": function(sortProperties) { @@ -25131,7 +25131,7 @@ OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class( ); } return node; - }, + }, "SortProperty": function(sortProperty) { var node = this.createElementNSPlus("ogc:SortProperty"); this.writeNode( @@ -25189,7 +25189,7 @@ OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class( return node; }, - CLASS_NAME: "OpenLayers.Format.Filter.v1_1_0" + CLASS_NAME: "OpenLayers.Format.Filter.v1_1_0" }); /* ====================================================================== @@ -25209,18 +25209,18 @@ OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class( * Class: OpenLayers.Format.OWSCommon * Read OWSCommon. Create a new instance with the * constructor. - * + * * Inherits from: * - */ OpenLayers.Format.OWSCommon = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { - + /** * APIProperty: defaultVersion * {String} Version number to assume if none found. Default is "1.0.0". */ defaultVersion: "1.0.0", - + /** * Constructor: OpenLayers.Format.OWSCommon * Create a new parser for OWSCommon. @@ -25252,7 +25252,7 @@ OpenLayers.Format.OWSCommon = OpenLayers.Class(OpenLayers.Format.XML.VersionedOG // ows and if the namespace is declared on a different element if (uri && uri.substring(uri.lastIndexOf("/")+1) === "1.1") { version ="1.1.0"; - } + } if(!version) { version = this.defaultVersion; } @@ -25272,7 +25272,7 @@ OpenLayers.Format.OWSCommon = OpenLayers.Class(OpenLayers.Format.XML.VersionedOG * {Object} An object representing the structure of the document. */ - CLASS_NAME: "OpenLayers.Format.OWSCommon" + CLASS_NAME: "OpenLayers.Format.OWSCommon" }); /* ====================================================================== OpenLayers/Format/OWSCommon/v1.js @@ -25295,7 +25295,7 @@ OpenLayers.Format.OWSCommon = OpenLayers.Class(OpenLayers.Format.XML.VersionedOG * - */ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, { - + /** * Property: regExes * Compiled regular expressions for manipulating strings. @@ -25366,7 +25366,7 @@ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, { }, "ServiceType": function(node, serviceIdentification) { serviceIdentification.serviceType = { - codeSpace: node.getAttribute('codeSpace'), + codeSpace: node.getAttribute('codeSpace'), value: this.getChildValue(node)}; }, "ServiceTypeVersion": function(node, serviceIdentification) { @@ -25376,7 +25376,7 @@ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, { serviceIdentification.fees = this.getChildValue(node); }, "AccessConstraints": function(node, serviceIdentification) { - serviceIdentification.accessConstraints = + serviceIdentification.accessConstraints = this.getChildValue(node); }, "ServiceProvider": function(node, obj) { @@ -25387,7 +25387,7 @@ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, { serviceProvider.providerName = this.getChildValue(node); }, "ProviderSite": function(node, serviceProvider) { - serviceProvider.providerSite = this.getAttributeNS(node, + serviceProvider.providerSite = this.getAttributeNS(node, this.namespaces.xlink, "href"); }, "ServiceContact": function(node, serviceProvider) { @@ -25617,7 +25617,7 @@ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, { * - */ OpenLayers.Format.OWSCommon.v1_0_0 = OpenLayers.Class(OpenLayers.Format.OWSCommon.v1, { - + /** * Property: namespaces * {Object} Mapping of namespace aliases to namespace URIs. @@ -25625,8 +25625,8 @@ OpenLayers.Format.OWSCommon.v1_0_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo namespaces: { ows: "http://www.opengis.net/ows", xlink: "http://www.w3.org/1999/xlink" - }, - + }, + /** * Property: readers * Contains public functions, grouped by namespace prefix, that will @@ -25645,7 +25645,7 @@ OpenLayers.Format.OWSCommon.v1_0_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo exceptions: [] }; this.readChildNodes(node, obj.exceptionReport); - } + } }, OpenLayers.Format.OWSCommon.v1.prototype.readers.ows) }, @@ -25658,7 +25658,7 @@ OpenLayers.Format.OWSCommon.v1_0_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo writers: { "ows": OpenLayers.Format.OWSCommon.v1.prototype.writers.ows }, - + CLASS_NAME: "OpenLayers.Format.OWSCommon.v1_0_0" }); @@ -25688,13 +25688,13 @@ OpenLayers.Format.OWSCommon.v1_0_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo */ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class( OpenLayers.Format.Filter.v1_1_0, OpenLayers.Format.WFST.v1, { - + /** * Property: version * {String} WFS version number. */ version: "1.1.0", - + /** * Property: schemaLocations * {Object} Properties are namespace aliases, values are schema locations. @@ -25702,7 +25702,7 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class( schemaLocations: { "wfs": "http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" }, - + /** * Constructor: OpenLayers.Format.WFST.v1_1_0 * A class for parsing and generating WFS v1.1.0 transactions. @@ -25728,7 +25728,7 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class( OpenLayers.Format.Filter.v1_1_0.prototype.initialize.apply(this, [options]); OpenLayers.Format.WFST.v1.prototype.initialize.apply(this, [options]); }, - + /** * Method: readNode * Shorthand for applying one of the named readers given the node @@ -25751,7 +25751,7 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class( // from the superclass's superclass, which is OpenLayers.Format.XML. return OpenLayers.Format.GML.v3.prototype.readNode.apply(this, arguments); }, - + /** * Property: readers * Contains public functions, grouped by namespace prefix, that will @@ -25830,7 +25830,7 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class( if(options.propertyNames) { for(var i=0,len = options.propertyNames.length; i} The format used by this protocol. */ format: null, - + /** * Property: options * {Object} Any options sent to the constructor. @@ -25894,13 +25894,13 @@ OpenLayers.Protocol = OpenLayers.Class({ * true. */ autoDestroy: true, - + /** * Property: defaultFilter * {} Optional default filter to read requests */ defaultFilter: null, - + /** * Constructor: OpenLayers.Protocol * Abstract class for vector protocols. Create instances of a subclass. @@ -25943,7 +25943,7 @@ OpenLayers.Protocol = OpenLayers.Class({ this.options = null; this.format = null; }, - + /** * APIMethod: read * Construct a request for reading new features. @@ -25960,8 +25960,8 @@ OpenLayers.Protocol = OpenLayers.Class({ options = options || {}; options.filter = this.mergeWithDefaultFilter(options.filter); }, - - + + /** * APIMethod: create * Construct a request for writing newly created features. @@ -25978,7 +25978,7 @@ OpenLayers.Protocol = OpenLayers.Class({ */ create: function() { }, - + /** * APIMethod: update * Construct a request updating modified features. @@ -25995,7 +25995,7 @@ OpenLayers.Protocol = OpenLayers.Class({ */ update: function() { }, - + /** * APIMethod: delete * Construct a request deleting a removed feature. @@ -26043,7 +26043,7 @@ OpenLayers.Protocol = OpenLayers.Class({ */ abort: function(response) { }, - + /** * Method: createCallback * Returns a function that applies the given public method with resp and @@ -26059,8 +26059,8 @@ OpenLayers.Protocol = OpenLayers.Class({ method.apply(this, [response, options]); }, this); }, - - CLASS_NAME: "OpenLayers.Protocol" + + CLASS_NAME: "OpenLayers.Protocol" }); /** @@ -26092,7 +26092,7 @@ OpenLayers.Protocol.Response = OpenLayers.Class({ /** * Property: features * {Array({})} or {} - * The features returned in the response by the server. Depending on the + * The features returned in the response by the server. Depending on the * protocol's read payload, either features or data will be populated. */ features: null, @@ -26100,7 +26100,7 @@ OpenLayers.Protocol.Response = OpenLayers.Class({ /** * Property: data * {Object} - * The data returned in the response by the server. Depending on the + * The data returned in the response by the server. Depending on the * protocol's read payload, either features or data will be populated. */ data: null, @@ -26179,28 +26179,28 @@ OpenLayers.Protocol.Response.FAILURE = 0; * - */ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, { - + /** * APIProperty: indent * {String} For "pretty" printing, the indent string will be used once for * each indentation level. */ indent: " ", - + /** * APIProperty: space * {String} For "pretty" printing, the space string will be used after * the ":" separating a name/value pair. */ space: " ", - + /** * APIProperty: newline * {String} For "pretty" printing, the newline string will be used at the * end of each name/value pair or array item. */ newline: "\n", - + /** * Property: level * {Integer} For "pretty" printing, this is incremented/decremented during @@ -26243,7 +26243,7 @@ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, { * replaced by the result of the filter function. This can be used to * reform generic objects into instances of classes, or to transform * date strings into Date objects. - * + * * Returns: * {Object} An object, array, string, or number . */ @@ -26331,7 +26331,7 @@ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, { } return json; }, - + /** * Method: writeIndent * Output an indentation string depending on the indentation level. @@ -26348,7 +26348,7 @@ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, { } return pieces.join(''); }, - + /** * Method: writeNewline * Output a string representing a newline if in pretty printing mode. @@ -26359,7 +26359,7 @@ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, { writeNewline: function() { return (this.pretty) ? this.newline : ''; }, - + /** * Method: writeSpace * Output a string representing a space if in pretty printing mode. @@ -26383,7 +26383,7 @@ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, { * * Parameters: * object - {Object} The object to be serialized. - * + * * Returns: * {String} A JSON string representing the object. */ @@ -26401,7 +26401,7 @@ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, { var pieces = ['{']; this.level += 1; var key, keyJSON, valueJSON; - + var addComma = false; for(key in object) { if(object.hasOwnProperty(key)) { @@ -26420,19 +26420,19 @@ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, { } } } - + this.level -= 1; pieces.push(this.writeNewline(), this.writeIndent(), '}'); return pieces.join(''); }, - + /** * Method: serialize.array * Transform an array into a JSON string. * * Parameters: * array - {Array} The array to be serialized - * + * * Returns: * {String} A JSON string representing the array. */ @@ -26440,7 +26440,7 @@ OpenLayers.Format.JSON = OpenLayers.Class(OpenLayers.Format, { var json; var pieces = ['[']; this.level += 1; - + for(var i=0, len=array.length; i. If type is "Geometry", the input json @@ -26631,9 +26631,9 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { if (typeof json == "string") { obj = OpenLayers.Format.JSON.prototype.read.apply(this, [json, filter]); - } else { + } else { obj = json; - } + } if(!obj) { OpenLayers.Console.error("Bad JSON: " + json); } else if(typeof(obj.type) != "string") { @@ -26691,7 +26691,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } return results; }, - + /** * Method: isValidType * Check if a GeoJSON object is a valid representative of the given type. @@ -26729,7 +26729,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } return valid; }, - + /** * Method: parseFeature * Convert a feature object from GeoJSON into an @@ -26760,7 +26760,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } return feature; }, - + /** * Method: parseGeometry * Convert a geometry object from GeoJSON into an . @@ -26768,7 +26768,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { * Parameters: * obj - {Object} An object created from a GeoJSON object * - * Returns: + * Returns: * {} A geometry. */ parseGeometry: function(obj) { @@ -26808,12 +26808,12 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { // We don't reproject collections because the children are reprojected // for us when they are created. if (this.internalProjection && this.externalProjection && !collection) { - geometry.transform(this.externalProjection, - this.internalProjection); - } + geometry.transform(this.externalProjection, + this.internalProjection); + } return geometry; }, - + /** * Property: parseCoords * Object with properties corresponding to the GeoJSON geometry types. @@ -26832,13 +26832,13 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { * {} A geometry. */ "point": function(array) { - if (this.ignoreExtraDims == false && + if (this.ignoreExtraDims == false && array.length != 2) { throw "Only 2D points are supported: " + array; } return new OpenLayers.Geometry.Point(array[0], array[1]); }, - + /** * Method: parseCoords.multipoint * Convert a coordinate array from GeoJSON into an @@ -26888,7 +26888,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } return new OpenLayers.Geometry.LineString(points); }, - + /** * Method: parseCoords.multilinestring * Convert a coordinate array from GeoJSON into an @@ -26913,7 +26913,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } return new OpenLayers.Geometry.MultiLineString(lines); }, - + /** * Method: parseCoords.polygon * Convert a coordinate array from GeoJSON into an @@ -27040,7 +27040,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { * Create the CRS object for an object. * * Parameters: - * object - {} + * object - {} * * Returns: * {Object} An object which can be assigned to the crs property @@ -27058,18 +27058,18 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }; - } else { + } else { crs = { "type": "name", "properties": { "name": "EPSG:" + code } }; - } + } } return crs; }, - + /** * Property: extract * Object with properties corresponding to the GeoJSON types. @@ -27098,7 +27098,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } return json; }, - + /** * Method: extract.geometry * Return a GeoJSON object representing a single geometry. @@ -27115,9 +27115,9 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } if (this.internalProjection && this.externalProjection) { geometry = geometry.clone(); - geometry.transform(this.internalProjection, + geometry.transform(this.internalProjection, this.externalProjection); - } + } var geometryType = geometry.CLASS_NAME.split('.')[2]; var data = this.extract[geometryType.toLowerCase()].apply(this, [geometry]); var json; @@ -27132,7 +27132,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { "coordinates": data }; } - + return json; }, @@ -27143,7 +27143,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { * Parameters: * point - {} * - * Returns: + * Returns: * {Array} An array of coordinates representing the point. */ 'point': function(point) { @@ -27168,7 +27168,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } return array; }, - + /** * Method: extract.linestring * Return an array of coordinate arrays from a linestring. @@ -27191,10 +27191,10 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { /** * Method: extract.multilinestring * Return an array of linestring arrays from a linestring. - * + * * Parameters: * multilinestring - {} - * + * * Returns: * {Array} An array of linestring arrays representing * the multilinestring. @@ -27206,14 +27206,14 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } return array; }, - + /** * Method: extract.polygon * Return an array of linear ring arrays from a polygon. * * Parameters: * polygon - {} - * + * * Returns: * {Array} An array of linear ring arrays representing the polygon. */ @@ -27228,10 +27228,10 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { /** * Method: extract.multipolygon * Return an array of polygon arrays from a multipolygon. - * + * * Parameters: * multipolygon - {} - * + * * Returns: * {Array} An array of polygon arrays representing * the multipolygon @@ -27243,14 +27243,14 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } return array; }, - + /** * Method: extract.collection * Return an array of geometries from a geometry collection. - * + * * Parameters: * collection - {} - * + * * Returns: * {Array} An array of geometry objects representing the geometry * collection. @@ -27265,13 +27265,13 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { } return array; } - + }, - CLASS_NAME: "OpenLayers.Format.GeoJSON" + CLASS_NAME: "OpenLayers.Format.GeoJSON" -}); +}); /* ====================================================================== OpenLayers/Protocol/Script.js ====================================================================== */ @@ -27310,7 +27310,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { /** * APIProperty: url - * {String} Service URL. The service is expected to return serialized + * {String} Service URL. The service is expected to return serialized * features wrapped in a named callback (where the callback name is * generated by this protocol). * Read-only, set through the options passed to the constructor. @@ -27324,7 +27324,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { * Example: {maxFeatures: 50} */ params: null, - + /** * APIProperty: callback * {Object} Function to be called when the operation completes. @@ -27342,17 +27342,17 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { /** * APIProperty: callbackKey - * {String} The name of the query string parameter that the service + * {String} The name of the query string parameter that the service * recognizes as the callback identifier. Default is "callback". * This key is used to generate the URL for the script. For example - * setting to "myCallback" would result in a URL like + * setting to "myCallback" would result in a URL like * http://example.com/?myCallback=... */ callbackKey: "callback", /** * APIProperty: callbackPrefix - * {String} Where a service requires that the callback query string + * {String} Where a service requires that the callback query string * parameter value is prefixed by some string, this value may be set. * For example, setting to "foo:" would result in a * URL like http://example.com/?callback=foo:... Default is "". @@ -27361,14 +27361,14 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { /** * APIProperty: scope - * {Object} Optional ``this`` object for the callback. Read-only, set + * {Object} Optional ``this`` object for the callback. Read-only, set * through the options passed to the constructor. */ scope: null, /** * APIProperty: format - * {} Format for parsing features. Default is an + * {} Format for parsing features. Default is an * format. If an alternative is provided, * the format's read method must take an object and return an array * of features. @@ -27377,7 +27377,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { /** * Property: pendingRequests - * {Object} References all pending requests. Property names are script + * {Object} References all pending requests. Property names are script * identifiers and property values are script elements. */ pendingRequests: null, @@ -27386,9 +27386,9 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { * APIProperty: srsInBBOX * {Boolean} Include the SRS identifier in BBOX query string parameter. * Setting this property has no effect if a custom filterToParams method - * is provided. Default is false. If true and the layer has a - * projection object set, any BBOX filter will be serialized with a - * fifth item identifying the projection. + * is provided. Default is false. If true and the layer has a + * projection object set, any BBOX filter will be serialized with a + * fifth item identifying the projection. * E.g. bbox=-1000,-1000,1000,1000,EPSG:900913 */ srsInBBOX: false, @@ -27425,7 +27425,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { }; } }, - + /** * APIMethod: read * Construct a request for reading new features. @@ -27459,8 +27459,8 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { } var response = new OpenLayers.Protocol.Response({requestType: "read"}); var request = this.createRequest( - options.url, - options.params, + options.url, + options.params, OpenLayers.Function.bind(function(data) { response.data = data; this.handleRead(response, options); @@ -27470,23 +27470,23 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { return response; }, - /** - * APIMethod: filterToParams - * Optional method to translate an object into an object - * that can be serialized as request query string provided. If a custom - * method is not provided, any filter will not be serialized. - * - * Parameters: - * filter - {} filter to convert. - * params - {Object} The parameters object. - * - * Returns: - * {Object} The resulting parameters object. + /** + * APIMethod: filterToParams + * Optional method to translate an object into an object + * that can be serialized as request query string provided. If a custom + * method is not provided, any filter will not be serialized. + * + * Parameters: + * filter - {} filter to convert. + * params - {Object} The parameters object. + * + * Returns: + * {Object} The resulting parameters object. */ - /** + /** * Method: createRequest - * Issues a request for features by creating injecting a script in the + * Issues a request for features by creating injecting a script in the * document head. * * Parameters: @@ -27514,11 +27514,11 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { head.appendChild(script); return script; }, - - /** + + /** * Method: destroyRequest * Remove a script node associated with a response from the document. Also - * unregisters the callback and removes the script from the + * unregisters the callback and removes the script from the * object. * * Parameters: @@ -27586,7 +27586,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { /** * APIMethod: abort - * Abort an ongoing request. If no response is provided, all pending + * Abort an ongoing request. If no response is provided, all pending * requests will be aborted. * * Parameters: @@ -27602,7 +27602,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { } } }, - + /** * APIMethod: destroy * Clean up the protocol. @@ -27614,14 +27614,14 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { OpenLayers.Protocol.prototype.destroy.apply(this); }, - CLASS_NAME: "OpenLayers.Protocol.Script" + CLASS_NAME: "OpenLayers.Protocol.Script" }); (function() { var o = OpenLayers.Protocol.Script; var counter = 0; o.registry = {}; - + /** * Function: OpenLayers.Protocol.Script.register * Register a callback for a newly created script. @@ -27641,7 +27641,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { }; return id; }; - + /** * Function: OpenLayers.Protocol.Script.unregister * Unregister a callback previously registered with the register function. @@ -28241,8 +28241,8 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { * Property: controls * {Array()} */ - controls: null, - + controls: null, + /** * APIProperty: autoActivate * {Boolean} Activate the control when it is added to a map. Default is @@ -28250,7 +28250,7 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { */ autoActivate: true, - /** + /** * APIProperty: defaultControl * {} The control which is activated when the control is * activated (turned on), which also happens at instantiation. @@ -28258,7 +28258,7 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { * first activation of the panel. */ defaultControl: null, - + /** * APIProperty: saveState * {Boolean} If set to true, the active state of this panel's controls will @@ -28266,15 +28266,15 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { * is false. */ saveState: false, - + /** * APIProperty: allowDepress - * {Boolean} If is true the controls can - * be deactivated by clicking the icon that represents them. Default + * {Boolean} If is true the controls can + * be deactivated by clicking the icon that represents them. Default * is false. */ allowDepress: false, - + /** * Property: activeState * {Object} stores the active state of this panel's controls. @@ -28285,15 +28285,15 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { * Constructor: OpenLayers.Control.Panel * Create a new control panel. * - * Each control in the panel is represented by an icon. When clicking + * Each control in the panel is represented by an icon. When clicking * on an icon, the method is called. * * Specific properties for controls on a panel: * type - {Number} One of , * , . * If not provided, is assumed. - * title - {string} Text displayed when mouse is over the icon that - * represents the control. + * title - {string} Text displayed when mouse is over the icon that + * represents the control. * * The of a control determines the behavior when * clicking its icon: @@ -28353,7 +28353,7 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { (this.saveState && this.activeState[control.id])) { control.activate(); } - } + } if (this.saveState === true) { this.defaultControl = null; } @@ -28363,7 +28363,7 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { return false; } }, - + /** * APIMethod: deactivate */ @@ -28373,20 +28373,20 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { for (var i=0, len=this.controls.length; i} Controls to add in the panel. - */ + */ addControls: function(controls) { if (!(OpenLayers.Util.isArray(controls))) { controls = [controls]; @@ -28469,7 +28469,7 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { for (var i=0, len=controls.length; i)} Controls to add into map. - */ + */ addControlsToMap: function (controls) { var control; for (var i=0, len=controls.length; i. * When clicked, the function trigger() is executed. - * + * * Inherits from: * - * @@ -28678,7 +28678,7 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { * }); * panel.addControls([button]); * (end) - * + * * Will create a button with CSS class MyButtonItemInactive, that * will call the function MyFunction() when clicked. */ @@ -28688,7 +28688,7 @@ OpenLayers.Control.Button = OpenLayers.Class(OpenLayers.Control, { * {Integer} OpenLayers.Control.TYPE_BUTTON. */ type: OpenLayers.Control.TYPE_BUTTON, - + /** * Method: trigger * Called by a control panel when the button is clicked. @@ -28777,11 +28777,11 @@ OpenLayers.Control.ZoomOut = OpenLayers.Class(OpenLayers.Control.Button, { */ /** - * Class: OpenLayers.Control.ZoomToMaxExtent + * Class: OpenLayers.Control.ZoomToMaxExtent * The ZoomToMaxExtent control is a button that zooms out to the maximum - * extent of the map. It is designed to be used with a + * extent of the map. It is designed to be used with a * . - * + * * Inherits from: * - */ @@ -28789,15 +28789,15 @@ OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control.Button, /** * Method: trigger - * - * Called whenever this control is being rendered inside of a panel and a + * + * Called whenever this control is being rendered inside of a panel and a * click occurs on this controls element. Actually zooms to the maximum * extent of this controls map. */ trigger: function() { if (this.map) { this.map.zoomToMaxExtent(); - } + } }, CLASS_NAME: "OpenLayers.Control.ZoomToMaxExtent" @@ -28820,29 +28820,29 @@ OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class(OpenLayers.Control.Button, /** * Class: OpenLayers.Control.ZoomPanel - * The ZoomPanel control is a compact collecton of 3 zoom controls: a + * The ZoomPanel control is a compact collecton of 3 zoom controls: a * , a , and a - * . By default it is drawn in the upper left + * . By default it is drawn in the upper left * corner of the map. * - * Note: - * If you wish to use this class with the default images and you want + * Note: + * If you wish to use this class with the default images and you want * it to look nice in ie6, you should add the following, conditionally * added css stylesheet to your HTML file: - * + * * (code) * * (end) - * + * * Inherits from: * - */ OpenLayers.Control.ZoomPanel = OpenLayers.Class(OpenLayers.Control.Panel, { /** - * Constructor: OpenLayers.Control.ZoomPanel + * Constructor: OpenLayers.Control.ZoomPanel * Add the three zooming controls. * * Parameters: @@ -28876,47 +28876,47 @@ OpenLayers.Control.ZoomPanel = OpenLayers.Class(OpenLayers.Control.Panel, { /** * Class: OpenLayers.Layer.HTTPRequest - * - * Inherits from: + * + * Inherits from: * - */ OpenLayers.Layer.HTTPRequest = OpenLayers.Class(OpenLayers.Layer, { - /** + /** * Constant: URL_HASH_FACTOR * {Float} Used to hash URL param strings for multi-WMS server selection. * Set to the Golden Ratio per Knuth's recommendation. */ URL_HASH_FACTOR: (Math.sqrt(5) - 1) / 2, - /** + /** * Property: url - * {Array(String) or String} This is either an array of url strings or - * a single url string. + * {Array(String) or String} This is either an array of url strings or + * a single url string. */ url: null, - /** + /** * Property: params * {Object} Hashtable of key/value parameters */ params: null, - - /** + + /** * APIProperty: reproject * *Deprecated*. See http://docs.openlayers.org/library/spherical_mercator.html - * for information on the replacement for this functionality. - * {Boolean} Whether layer should reproject itself based on base layer - * locations. This allows reprojection onto commercial layers. - * Default is false: Most layers can't reproject, but layers + * for information on the replacement for this functionality. + * {Boolean} Whether layer should reproject itself based on base layer + * locations. This allows reprojection onto commercial layers. + * Default is false: Most layers can't reproject, but layers * which can create non-square geographic pixels can, like WMS. - * + * */ reproject: false, /** * Constructor: OpenLayers.Layer.HTTPRequest - * + * * Parameters: * name - {String} * url - {Array(String) or String} @@ -28937,39 +28937,39 @@ OpenLayers.Layer.HTTPRequest = OpenLayers.Class(OpenLayers.Layer, { destroy: function() { this.url = null; this.params = null; - OpenLayers.Layer.prototype.destroy.apply(this, arguments); + OpenLayers.Layer.prototype.destroy.apply(this, arguments); }, - + /** * APIMethod: clone - * + * * Parameters: * obj - {Object} - * + * * Returns: - * {} An exact clone of this + * {} An exact clone of this * */ clone: function (obj) { - + if (obj == null) { obj = new OpenLayers.Layer.HTTPRequest(this.name, this.url, this.params, this.getOptions()); } - + //get all additions from superclasses obj = OpenLayers.Layer.prototype.clone.apply(this, [obj]); // copy/set any non-init, non-simple values here - + return obj; }, - /** + /** * APIMethod: setUrl - * + * * Parameters: * newUrl - {String} */ @@ -28979,7 +28979,7 @@ OpenLayers.Layer.HTTPRequest = OpenLayers.Class(OpenLayers.Layer, { /** * APIMethod: mergeNewParams - * + * * Parameters: * newParams - {Object} * @@ -29008,18 +29008,18 @@ OpenLayers.Layer.HTTPRequest = OpenLayers.Class(OpenLayers.Layer, { * Returns: * {Boolean} The layer was redrawn. */ - redraw: function(force) { + redraw: function(force) { if (force) { return this.mergeNewParams({"_olSalt": Math.random()}); } else { return OpenLayers.Layer.prototype.redraw.apply(this, []); } }, - + /** * Method: selectUrl * selectUrl() implements the standard floating-point multiplicative - * hash function described by Knuth, and hashes the contents of the + * hash function described by Knuth, and hashes the contents of the * given param string into a float between 0 and 1. This float is then * scaled to the size of the provided urls array, and used to select * a URL. @@ -29027,60 +29027,60 @@ OpenLayers.Layer.HTTPRequest = OpenLayers.Class(OpenLayers.Layer, { * Parameters: * paramString - {String} * urls - {Array(String)} - * + * * Returns: * {String} An entry from the urls array, deterministically selected based * on the paramString. */ selectUrl: function(paramString, urls) { var product = 1; - for (var i=0, len=paramString.length; i constructor, or a subclass. - * + * to, and their size - but do not add themselves to the layer div + * automatically, for example. Create a new tile with the + * constructor, or a subclass. + * * TBD 3.0 - remove reference to url in above paragraph - * + * */ OpenLayers.Tile = OpenLayers.Class({ - + /** * APIProperty: events - * {} An events object that handles all + * {} An events object that handles all * events on the tile. * * Register a listener for a particular event with the following syntax: @@ -29172,59 +29172,59 @@ OpenLayers.Tile = OpenLayers.Class({ eventListeners: null, /** - * Property: id + * Property: id * {String} null */ id: null, - - /** - * Property: layer - * {} layer the tile is attached to + + /** + * Property: layer + * {} layer the tile is attached to */ layer: null, - + /** * Property: url * {String} url of the request. * - * TBD 3.0 - * Deprecated. The base tile class does not need an url. This should be + * TBD 3.0 + * Deprecated. The base tile class does not need an url. This should be * handled in subclasses. Does not belong here. */ url: null, - /** - * APIProperty: bounds + /** + * APIProperty: bounds * {} null */ bounds: null, - - /** - * Property: size + + /** + * Property: size * {} null */ size: null, - - /** - * Property: position + + /** + * Property: position * {} Top Left pixel of the tile - */ + */ position: null, - + /** * Property: isLoading * {Boolean} Is the tile loading? */ isLoading: false, - + /** TBD 3.0 -- remove 'url' from the list of parameters to the constructor. * there is no need for the base tile class to have a url. */ - /** + /** * Constructor: OpenLayers.Tile * Constructor for a new instance. - * + * * Parameters: * layer - {} layer that the tile will go in. * position - {} @@ -29232,7 +29232,7 @@ OpenLayers.Tile = OpenLayers.Class({ * url - {} * size - {} * options - {Object} - */ + */ initialize: function(layer, position, bounds, url, size, options) { this.layer = layer; this.position = position.clone(); @@ -29261,13 +29261,13 @@ OpenLayers.Tile = OpenLayers.Class({ * still loading. */ unload: function() { - if (this.isLoading) { - this.isLoading = false; - this.events.triggerEvent("unload"); + if (this.isLoading) { + this.isLoading = false; + this.events.triggerEvent("unload"); } }, - - /** + + /** * APIMethod: destroy * Nullify references to prevent circular references and memory leaks. */ @@ -29276,7 +29276,7 @@ OpenLayers.Tile = OpenLayers.Class({ this.bounds = null; this.size = null; this.position = null; - + if (this.eventListeners) { this.events.un(this.eventListeners); } @@ -29284,10 +29284,10 @@ OpenLayers.Tile = OpenLayers.Class({ this.eventListeners = null; this.events = null; }, - + /** * Method: draw - * Clear whatever is currently in the tile, then return whether or not + * Clear whatever is currently in the tile, then return whether or not * it should actually be re-drawn. This is an example implementation * that can be overridden by subclasses. The minimum thing to do here * is to call and return the result from . @@ -29297,7 +29297,7 @@ OpenLayers.Tile = OpenLayers.Class({ * event will be fired. This is used for drawing tiles asynchronously * after drawing has been cancelled by returning false from a beforedraw * listener. - * + * * Returns: * {Boolean} Whether or not the tile should actually be drawn. Returns null * if a beforedraw listener returned false. @@ -29313,17 +29313,17 @@ OpenLayers.Tile = OpenLayers.Class({ } return draw; }, - + /** * Method: shouldDraw * Return whether or not the tile should actually be (re-)drawn. The only * case where we *wouldn't* want to draw the tile is if the tile is outside * its layer's maxExtent - * + * * Returns: * {Boolean} Whether or not the tile should actually be drawn. */ - shouldDraw: function() { + shouldDraw: function() { var withinMaxExtent = false, maxExtent = this.layer.maxExtent; if (maxExtent) { @@ -29333,10 +29333,10 @@ OpenLayers.Tile = OpenLayers.Class({ withinMaxExtent = true; } } - + return withinMaxExtent || this.layer.displayOutsideMaxExtent; }, - + /** * Method: setBounds * Sets the bounds on this instance @@ -29356,8 +29356,8 @@ OpenLayers.Tile = OpenLayers.Class({ } this.bounds = bounds; }, - - /** + + /** * Method: moveTo * Reposition the tile. * @@ -29379,15 +29379,15 @@ OpenLayers.Tile = OpenLayers.Class({ } }, - /** + /** * Method: clear - * Clear the tile of any bounds/position-related data so that it can + * Clear the tile of any bounds/position-related data so that it can * be reused in a new location. */ clear: function(draw) { // to be extended by subclasses }, - + CLASS_NAME: "OpenLayers.Tile" }); /* ====================================================================== @@ -29419,7 +29419,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { /** * APIProperty: events - * {} An events object that handles all + * {} An events object that handles all * events on the tile. * * Register a listener for a particular event with the following syntax: @@ -29434,46 +29434,46 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { * one will be created. */ - /** + /** * APIProperty: url * {String} The URL of the image being requested. No default. Filled in by * layer.getURL() function. May be modified by loadstart listeners. */ url: null, - - /** + + /** * Property: imgDiv * {HTMLImageElement} The image for this tile. */ imgDiv: null, - + /** * Property: frame * {DOMElement} The image element is appended to the frame. Any gutter on * the image will be hidden behind the frame. If no gutter is set, * this will be null. - */ - frame: null, + */ + frame: null, - /** + /** * Property: imageReloadAttempts * {Integer} Attempts to load the image. */ imageReloadAttempts: null, - + /** * Property: layerAlphaHack * {Boolean} True if the png alpha hack needs to be applied on the layer's div. */ layerAlphaHack: null, - + /** * Property: asyncRequestId * {Integer} ID of an request to see if request is still valid. This is a * number which increments by 1 for each asynchronous request. */ asyncRequestId: null, - + /** * APIProperty: maxGetUrlLength * {Number} If set, requests that would result in GET urls with more @@ -29494,7 +29494,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { * the tile image. */ canvasContext: null, - + /** * APIProperty: crossOriginKeyword * The value of the crossorigin keyword to use when loading images. This is @@ -29505,15 +29505,15 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { */ crossOriginKeyword: null, - /** TBD 3.0 - reorder the parameters to the init function to remove - * URL. the getUrl() function on the layer gets called on + /** TBD 3.0 - reorder the parameters to the init function to remove + * URL. the getUrl() function on the layer gets called on * each draw(), so no need to specify it here. */ - /** + /** * Constructor: OpenLayers.Tile.Image * Constructor for a new instance. - * + * * Parameters: * layer - {} layer that the tile will go in. * position - {} @@ -29521,12 +29521,12 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { * url - {} Deprecated. Remove me in 3.0. * size - {} * options - {Object} - */ + */ initialize: function(layer, position, bounds, url, size, options) { OpenLayers.Tile.prototype.initialize.apply(this, arguments); this.url = url; //deprecated remove me - + this.layerAlphaHack = this.layer.alpha && OpenLayers.Util.alphaHack(); if (this.maxGetUrlLength != null || this.layer.gutter || this.layerAlphaHack) { @@ -29539,8 +29539,8 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { OpenLayers.Util.extend(this, OpenLayers.Tile.Image.IFrame); } }, - - /** + + /** * APIMethod: destroy * nullify references to prevent circular references and memory leaks */ @@ -29554,11 +29554,11 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { this.asyncRequestId = null; OpenLayers.Tile.prototype.destroy.apply(this, arguments); }, - + /** * Method: draw * Check that a tile should be drawn, and draw it. - * + * * Returns: * {Boolean} Was a tile drawn? Or null if a beforedraw listener returned * false. @@ -29585,7 +29585,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { } return shouldDraw; }, - + /** * Method: renderTile * Internal function to actually initialize the image tile, @@ -29629,7 +29629,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { style.height = Math.round(ratio * size.h) + "px"; }, - /** + /** * Method: clear * Remove the tile from the DOM, clear it of any image related data so that * it can be reused in a new location. @@ -29650,7 +29650,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { } this.canvasContext = null; }, - + /** * Method: getImage * Returns or creates and returns the tile image. @@ -29692,7 +29692,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { return this.imgDiv; }, - + /** * APIMethod: setImage * Sets the image element for this tile. This method should only be called @@ -29739,7 +29739,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { this.setImgSrc(this.url); } }, - + /** * Method: setImgSrc * Sets the source for the tile image @@ -29771,7 +29771,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { } } }, - + /** * Method: getTile * Get the tile's markup. @@ -29827,7 +29827,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { img.src + "', sizingMethod='scale')"; } }, - + /** * Method: onImageError * Handler for the image onerror event @@ -29845,7 +29845,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { } } }, - + /** * Method: stopLoading * Stops a loading sequence so won't be executed. @@ -29892,7 +29892,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { }); -/** +/** * Constant: OpenLayers.Tile.Image.IMAGE * {HTMLImageElement} The image for a tile. */ @@ -29928,7 +29928,7 @@ OpenLayers.Tile.Image.IMAGE = (function() { * - */ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { - + /** * APIProperty: tileSize * {} @@ -29937,14 +29937,14 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { /** * Property: tileOriginCorner - * {String} If the property is not provided, the tile origin - * will be derived from the layer's . The corner of the + * {String} If the property is not provided, the tile origin + * will be derived from the layer's . The corner of the * used is determined by this property. Acceptable values * are "tl" (top left), "tr" (top right), "bl" (bottom left), and "br" * (bottom right). Default is "bl". */ tileOriginCorner: "bl", - + /** * APIProperty: tileOrigin * {} Optional origin for aligning the grid of tiles. @@ -29954,7 +29954,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * . Default is ``null``. */ tileOrigin: null, - + /** APIProperty: tileOptions * {Object} optional configuration options for instances * created by this Layer, if supported by the tile class. @@ -29967,25 +29967,25 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * Defaults is OpenLayers.Tile.Image. */ tileClass: OpenLayers.Tile.Image, - + /** * Property: grid - * {Array(Array())} This is an array of rows, each row is + * {Array(Array())} This is an array of rows, each row is * an array of tiles. */ grid: null, /** * APIProperty: singleTile - * {Boolean} Moves the layer into single-tile mode, meaning that one tile + * {Boolean} Moves the layer into single-tile mode, meaning that one tile * will be loaded. The tile's size will be determined by the 'ratio' - * property. When the tile is dragged such that it does not cover the + * property. When the tile is dragged such that it does not cover the * entire viewport, it is reloaded. */ singleTile: false, /** APIProperty: ratio - * {Float} Used only when in single-tile mode, this specifies the + * {Float} Used only when in single-tile mode, this specifies the * ratio of the size of the single tile to the size of the map. * Default value is 1.5. */ @@ -29993,12 +29993,12 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { /** * APIProperty: buffer - * {Integer} Used only when in gridded mode, this specifies the number of + * {Integer} Used only when in gridded mode, this specifies the number of * extra rows and colums of tiles on each side which will * surround the minimum grid tiles to cover the map. * For very slow loading layers, a larger value may increase * performance somewhat when dragging, but will increase bandwidth - * use significantly. + * use significantly. */ buffer: 0, @@ -30015,7 +30015,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * base layer. New tiles for the base layer will cover existing tiles. * This setting is recommended when having an overlay duplicated during * the transition is undesirable (e.g. street labels or big transparent - * fills). + * fills). * null - No transition effect. * * Using "resize" on non-opaque layers can cause undesired visual @@ -30041,7 +30041,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * {Boolean} Indicates if tiles are being loaded. */ loading: false, - + /** * Property: backBuffer * {DOMElement} The back buffer. @@ -30122,7 +30122,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * should not be zero. */ className: null, - + /** * Register a listener for a particular event with the following syntax: * (code) @@ -30163,7 +30163,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * startrow */ gridLayout: null, - + /** * Property: rowSign * {Number} 1 for grids starting at the top, -1 for grids starting at the @@ -30191,7 +30191,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * options - {Object} Hashtable of extra options to tag onto the layer */ initialize: function(name, url, params, options) { - OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, + OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, arguments); this.grid = []; this._removeBackBuffer = OpenLayers.Function.bind(this.removeBackBuffer, this); @@ -30249,7 +30249,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.grid = null; this.tileSize = null; - OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments); + OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments); }, /** @@ -30259,7 +30259,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * stylesheet applies a 'display: none' style to that class, any fade-in * transition will not apply, and backbuffers for each tile will be removed * as soon as the tile is loaded. - * + * * Parameters: * newParams - {Object} * @@ -30289,7 +30289,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { /** * APIMethod: addOptions - * + * * Parameters: * newOptions - {Object} * reinitialize - {Boolean} If set to true, and if resolution options of the @@ -30298,7 +30298,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * changebaselayer event will be triggered. */ addOptions: function (newOptions, reinitialize) { - var singleTileChanged = newOptions.singleTile !== undefined && + var singleTileChanged = newOptions.singleTile !== undefined && newOptions.singleTile !== this.singleTile; OpenLayers.Layer.HTTPRequest.prototype.addOptions.apply(this, arguments); if (this.map && singleTileChanged) { @@ -30309,19 +30309,19 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.moveTo(null, true); } }, - + /** * APIMethod: clone * Create a clone of this layer * * Parameters: * obj - {Object} Is this ever used? - * + * * Returns: * {} An exact clone of this OpenLayers.Layer.Grid */ clone: function (obj) { - + if (obj == null) { obj = new OpenLayers.Layer.Grid(this.name, this.url, @@ -30336,7 +30336,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { if (this.tileSize != null) { obj.tileSize = this.tileSize.clone(); } - + // we do not want to copy reference to grid, so we make a new array obj.grid = []; obj.gridResolution = null; @@ -30347,7 +30347,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { obj.numLoadingTiles = 0; return obj; - }, + }, /** * Method: moveTo @@ -30367,12 +30367,12 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { bounds = bounds || this.map.getExtent(); if (bounds != null) { - + // if grid is empty or zoom has changed, we *must* re-tile var forceReTile = !this.grid.length || zoomChanged; - + // total bounds of the tiles - var tilesBounds = this.getTilesBounds(); + var tilesBounds = this.getTilesBounds(); // the new map resolution var resolution = this.map.getResolution(); @@ -30381,8 +30381,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { var serverResolution = this.getServerResolution(resolution); if (this.singleTile) { - - // We want to redraw whenever even the slightest part of the + + // We want to redraw whenever even the slightest part of the // current bounds is not contained by our tile. // (thus, we do not specify partial -- its default is false) @@ -30408,12 +30408,12 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { } } else { - // if the bounds have changed such that they are not even - // *partially* contained by our tiles (e.g. when user has + // if the bounds have changed such that they are not even + // *partially* contained by our tiles (e.g. when user has // programmatically panned to the other side of the earth on // zoom level 18), then moveGriddedTiles could potentially have // to run through thousands of cycles, so we want to reTile - // instead (thus, partial true). + // instead (thus, partial true). forceReTile = forceReTile || !tilesBounds.intersectsBounds(bounds, { worldBounds: this.map.baseLayer.wrapDateLine && @@ -30436,8 +30436,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { /** * Method: getTileData * Given a map location, retrieve a tile and the pixel offset within that - * tile corresponding to the location. If there is not an existing - * tile in the grid that covers the given location, null will be + * tile corresponding to the location. If there is not an existing + * tile in the grid that covers the given location, null will be * returned. * * Parameters: @@ -30484,13 +30484,13 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { // pixel index within tile i: Math.floor((dtx - col) * tileWidth), j: Math.floor((dty - row) * tileHeight) - }; + }; } } } return data; }, - + /** * Method: destroyTile * @@ -30583,7 +30583,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { }; this.backBufferResolution = this.gridResolution; } - + var ratio = this.backBufferResolution / resolution; // scale the tiles inside the back buffer @@ -30687,16 +30687,16 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * APIMethod: setTileSize * Check if we are in singleTile mode and if so, set the size as a ratio * of the map size (as specified by the layer's 'ratio' property). - * + * * Parameters: * size - {} */ - setTileSize: function(size) { + setTileSize: function(size) { if (this.singleTile) { size = this.map.getSize(); size.h = parseInt(size.h * this.ratio, 10); size.w = parseInt(size.w * this.ratio, 10); - } + } OpenLayers.Layer.HTTPRequest.prototype.setTileSize.apply(this, [size]); }, @@ -30706,30 +30706,30 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * * Returns: * {} A Bounds object representing the bounds of all the - * currently loaded tiles (including those partially or not at all seen + * currently loaded tiles (including those partially or not at all seen * onscreen). */ - getTilesBounds: function() { - var bounds = null; - + getTilesBounds: function() { + var bounds = null; + var length = this.grid.length; if (length) { var bottomLeftTileBounds = this.grid[length - 1][0].bounds, width = this.grid[0].length * bottomLeftTileBounds.getWidth(), height = this.grid.length * bottomLeftTileBounds.getHeight(); - - bounds = new OpenLayers.Bounds(bottomLeftTileBounds.left, + + bounds = new OpenLayers.Bounds(bottomLeftTileBounds.left, bottomLeftTileBounds.bottom, - bottomLeftTileBounds.left + width, + bottomLeftTileBounds.left + width, bottomLeftTileBounds.bottom + height); - } + } return bounds; }, /** * Method: initSingleTile - * - * Parameters: + * + * Parameters: * bounds - {} */ initSingleTile: function(bounds) { @@ -30739,13 +30739,13 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { var center = bounds.getCenterLonLat(); var tileWidth = bounds.getWidth() * this.ratio; var tileHeight = bounds.getHeight() * this.ratio; - - var tileBounds = + + var tileBounds = new OpenLayers.Bounds(center.lon - (tileWidth/2), center.lat - (tileHeight/2), center.lon + (tileWidth/2), center.lat + (tileHeight/2)); - + var px = this.map.getLayerPxFromLonLat({ lon: tileBounds.left, lat: tileBounds.top @@ -30758,14 +30758,14 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { var tile = this.grid[0][0]; if (!tile) { tile = this.addTile(tileBounds, px); - + this.addTileMonitoringHooks(tile); tile.draw(); this.grid[0][0] = tile; } else { tile.moveTo(tileBounds, px); - } - + } + //remove all but our single tile this.removeExcessTiles(1,1); @@ -30773,7 +30773,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.gridResolution = this.getServerResolution(); }, - /** + /** * Method: calculateGridLayout * Generate parameters for the grid layout. * @@ -30791,28 +30791,28 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { calculateGridLayout: function(bounds, origin, resolution) { var tilelon = resolution * this.tileSize.w; var tilelat = resolution * this.tileSize.h; - + var offsetlon = bounds.left - origin.lon; var tilecol = Math.floor(offsetlon/tilelon) - this.buffer; - + var rowSign = this.rowSign; - var offsetlat = rowSign * (origin.lat - bounds.top + tilelat); + var offsetlat = rowSign * (origin.lat - bounds.top + tilelat); var tilerow = Math[~rowSign ? 'floor' : 'ceil'](offsetlat/tilelat) - this.buffer * rowSign; - - return { + + return { tilelon: tilelon, tilelat: tilelat, startcol: tilecol, startrow: tilerow }; }, - + /** * Method: getTileOrigin * Determine the origin for aligning the grid of tiles. If a * property is supplied, that will be returned. Otherwise, the origin * will be derived from the layer's property. In this case, - * the tile origin will be the corner of the given by the + * the tile origin will be the corner of the given by the * property. * * Returns: @@ -30861,7 +30861,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { /** * Method: initGriddedTiles - * + * * Parameters: * bounds - {} */ @@ -30872,7 +30872,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { // tiles required to cover the viewport plus at least one for panning var viewSize = this.map.getSize(); - + var origin = this.getTileOrigin(); var resolution = this.map.getResolution(), serverResolution = this.getServerResolution(), @@ -30882,17 +30882,17 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { h: this.tileSize.h / ratio }; - var minRows = Math.ceil(viewSize.h/tileSize.h) + + var minRows = Math.ceil(viewSize.h/tileSize.h) + 2 * this.buffer + 1; var minCols = Math.ceil(viewSize.w/tileSize.w) + 2 * this.buffer + 1; var tileLayout = this.calculateGridLayout(bounds, origin, serverResolution); this.gridLayout = tileLayout; - + var tilelon = tileLayout.tilelon; var tilelat = tileLayout.tilelat; - + var layerContainerDivLeft = this.map.layerContainerOriginPx.x; var layerContainerDivTop = this.map.layerContainerOriginPx.y; @@ -30912,7 +30912,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { row = []; this.grid.push(row); } - + var colidx = 0; do { tileBounds = this.getTileBoundsForGridIndex(rowidx, colidx); @@ -30933,15 +30933,15 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { distance: Math.pow(tileCenter.lon - center.lon, 2) + Math.pow(tileCenter.lat - center.lat, 2) }); - + colidx += 1; } while ((tileBounds.right <= bounds.right + tilelon * this.buffer) || colidx < minCols); - + rowidx += 1; } while((tileBounds.bottom >= bounds.bottom - tilelat * this.buffer) || rowidx < minRows); - + //shave off exceess rows and colums this.removeExcessTiles(rowidx, colidx); @@ -30951,7 +30951,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { //now actually draw the tiles tileData.sort(function(a, b) { - return a.distance - b.distance; + return a.distance - b.distance; }); for (var i=0, ii=tileData.length; i} @@ -30988,17 +30988,17 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.events.triggerEvent("addtile", {tile: tile}); return tile; }, - - /** + + /** * Method: addTileMonitoringHooks - * This function takes a tile as input and adds the appropriate hooks to + * This function takes a tile as input and adds the appropriate hooks to * the tile so that the layer can keep track of the loading tiles. - * - * Parameters: + * + * Parameters: * tile - {} */ addTileMonitoringHooks: function(tile) { - + var replacingCls = 'olTileReplacing'; tile.onLoadStart = function() { @@ -31013,7 +31013,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { OpenLayers.Element.addClass(tile.getTile(), replacingCls); } }; - + tile.onLoadEnd = function(evt) { this.numLoadingTiles--; var aborted = evt.type === 'unload'; @@ -31058,11 +31058,11 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.events.triggerEvent("loadend"); } }; - + tile.onLoadError = function() { this.events.triggerEvent("tileerror", {tile: tile}); }; - + tile.events.on({ "loadstart": tile.onLoadStart, "loadend": tile.onLoadEnd, @@ -31072,12 +31072,12 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { }); }, - /** + /** * Method: removeTileMonitoringHooks - * This function takes a tile as input and removes the tile hooks + * This function takes a tile as input and removes the tile hooks * that were added in addTileMonitoringHooks() - * - * Parameters: + * + * Parameters: * tile - {} */ removeTileMonitoringHooks: function(tile) { @@ -31090,7 +31090,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { scope: this }); }, - + /** * Method: moveGriddedTiles */ @@ -31170,7 +31170,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { for (var i=0, len=grid.length; i rows) { var row = this.grid.pop(); @@ -31197,7 +31197,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.destroyTile(tile); } } - + // remove extra columns for (i=0, l=this.grid.length; i columns) { @@ -31219,7 +31219,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { this.setTileSize(); } }, - + /** * APIMethod: getTileBounds * Returns The tile bounds for a layer given a pixel location. @@ -31272,7 +31272,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * Class: OpenLayers.Format.ArcXML * Read/Write ArcXML. Create a new instance with the * constructor. - * + * * Inherits from: * - */ @@ -31292,7 +31292,7 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { * A get_image request destined for an ArcIMS server. */ request: null, - + /** * Property: response * A parsed response from an ArcIMS server. @@ -31317,11 +31317,11 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { if (options) { if (options.requesttype == "feature") { this.request.get_image = null; - + var qry = this.request.get_feature.query; this.addCoordSys(qry.featurecoordsys, options.featureCoordSys); this.addCoordSys(qry.filtercoordsys, options.filterCoordSys); - + if (options.polygon) { qry.isspatial = true; qry.spatialfilter.polygon = options.polygon; @@ -31332,10 +31332,10 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { } } else if (options.requesttype == "image") { this.request.get_feature = null; - + var props = this.request.get_image.properties; this.parseEnvelope(props.envelope, options.envelope); - + this.addLayers(props.layerlist, options.layers); this.addImageSize(props.imagesize, options.tileSize); this.addCoordSys(props.featurecoordsys, options.featureCoordSys); @@ -31347,10 +31347,10 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { this.request = null; } } - + OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); }, - + /** * Method: parseEnvelope * Parse an array of coordinates into an ArcXML envelope structure. @@ -31360,18 +31360,18 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { * arr - {Array(double)} An array of coordinates in the order: [ minx, miny, maxx, maxy ] */ parseEnvelope: function(env, arr) { - if (arr && arr.length == 4) { + if (arr && arr.length == 4) { env.minx = arr[0]; env.miny = arr[1]; env.maxx = arr[2]; env.maxy = arr[3]; } }, - - /** + + /** * Method: addLayers * Add a collection of layers to another collection of layers. Each layer in the list is tuple of - * { id, visible }. These layer collections represent the + * { id, visible }. These layer collections represent the * /ARCXML/REQUEST/get_image/PROPERTIES/LAYERLIST/LAYERDEF items in ArcXML * * TODO: Add support for dynamic layer rendering. @@ -31385,7 +31385,7 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { ll.push(lyrs[lind]); } }, - + /** * Method: addImageSize * Set the size of the requested image. @@ -31405,14 +31405,14 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { /** * Method: addCoordSys - * Add the coordinate system information to an object. The object may be + * Add the coordinate system information to an object. The object may be * * Parameters: * featOrFilt - {Object} A featurecoordsys or filtercoordsys ArcXML structure. - * fsys - {String} or {} or {filtercoordsys} or - * {featurecoordsys} A projection representation. If it's a {String}, - * the value is assumed to be the SRID. If it's a {OpenLayers.Projection} - * AND Proj4js is available, the projection number and name are extracted + * fsys - {String} or {} or {filtercoordsys} or + * {featurecoordsys} A projection representation. If it's a {String}, + * the value is assumed to be the SRID. If it's a {OpenLayers.Projection} + * AND Proj4js is available, the projection number and name are extracted * from there. If it's a filter or feature ArcXML structure, it is copied. */ addCoordSys: function(featOrFilt, fsys) { @@ -31441,8 +31441,8 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { * {Boolean} true if the response was an error. */ iserror: function(data) { - var ret = null; - + var ret = null; + if (!data) { ret = (this.response.error !== ''); } else { @@ -31456,20 +31456,20 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { /** * APIMethod: read - * Read data from a string, and return an response. - * + * Read data from a string, and return an response. + * * Parameters: * data - {String} or {DOMElement} data to read/parse. * * Returns: * {} An ArcXML response. Note that this response - * data may change in the future. + * data may change in the future. */ read: function(data) { if(typeof data == "string") { data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); } - + var arcNode = null; if (data && data.documentElement) { if(data.documentElement.nodeName == "ARCXML") { @@ -31478,8 +31478,8 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { arcNode = data.documentElement.getElementsByTagName("ARCXML")[0]; } } - - // in Safari, arcNode will be there but will have a child named + + // in Safari, arcNode will be there but will have a child named // parsererror if (!arcNode || arcNode.firstChild.nodeName === 'parsererror') { var error, source; @@ -31490,32 +31490,32 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { // pass } throw { - message: "Error parsing the ArcXML request", + message: "Error parsing the ArcXML request", error: error, source: source }; } - + var response = this.parseResponse(arcNode); return response; }, - + /** * APIMethod: write - * Generate an ArcXml document string for sending to an ArcIMS server. - * + * Generate an ArcXml document string for sending to an ArcIMS server. + * * Returns: * {String} A string representing the ArcXML document request. */ - write: function(request) { + write: function(request) { if (!request) { request = this.request; - } + } var root = this.createElementNS("", "ARCXML"); root.setAttribute("version","1.1"); var reqElem = this.createElementNS("", "REQUEST"); - + if (request.get_image != null) { var getElem = this.createElementNS("", "GET_IMAGE"); reqElem.appendChild(getElem); @@ -31527,7 +31527,7 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { if (props.featurecoordsys != null) { var feat = this.createElementNS("", "FEATURECOORDSYS"); propElem.appendChild(feat); - + if (props.featurecoordsys.id === 0) { feat.setAttribute("string", props.featurecoordsys['string']); } @@ -31535,7 +31535,7 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { feat.setAttribute("id", props.featurecoordsys.id); } } - + if (props.filtercoordsys != null) { var filt = this.createElementNS("", "FILTERCOORDSYS"); propElem.appendChild(filt); @@ -31547,7 +31547,7 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { filt.setAttribute("id", props.filtercoordsys.id); } } - + if (props.envelope != null) { var env = this.createElementNS("", "ENVELOPE"); propElem.appendChild(env); @@ -31556,55 +31556,55 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { env.setAttribute("miny", props.envelope.miny); env.setAttribute("maxx", props.envelope.maxx); env.setAttribute("maxy", props.envelope.maxy); - } - + } + var imagesz = this.createElementNS("", "IMAGESIZE"); propElem.appendChild(imagesz); - + imagesz.setAttribute("height", props.imagesize.height); imagesz.setAttribute("width", props.imagesize.width); - + if (props.imagesize.height != props.imagesize.printheight || props.imagesize.width != props.imagesize.printwidth) { imagesz.setAttribute("printheight", props.imagesize.printheight); imagesz.setArrtibute("printwidth", props.imagesize.printwidth); } - + if (props.background != null) { var backgrnd = this.createElementNS("", "BACKGROUND"); propElem.appendChild(backgrnd); - - backgrnd.setAttribute("color", - props.background.color.r + "," + - props.background.color.g + "," + + + backgrnd.setAttribute("color", + props.background.color.r + "," + + props.background.color.g + "," + props.background.color.b); - + if (props.background.transcolor !== null) { - backgrnd.setAttribute("transcolor", - props.background.transcolor.r + "," + - props.background.transcolor.g + "," + + backgrnd.setAttribute("transcolor", + props.background.transcolor.r + "," + + props.background.transcolor.g + "," + props.background.transcolor.b); } } - + if (props.layerlist != null && props.layerlist.length > 0) { var layerlst = this.createElementNS("", "LAYERLIST"); propElem.appendChild(layerlst); - + for (var ld = 0; ld < props.layerlist.length; ld++) { var ldef = this.createElementNS("", "LAYERDEF"); layerlst.appendChild(ldef); - + ldef.setAttribute("id", props.layerlist[ld].id); ldef.setAttribute("visible", props.layerlist[ld].visible); - + if (typeof props.layerlist[ld].query == "object") { var query = props.layerlist[ld].query; if (query.where.length < 0) { continue; } - + var queryElem = null; if (typeof query.spatialfilter == "boolean" && query.spatialfilter) { // handle spatial filter madness @@ -31613,9 +31613,9 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { else { queryElem = this.createElementNS("", "QUERY"); } - + queryElem.setAttribute("where", query.where); - + if (typeof query.accuracy == "number" && query.accuracy > 0) { queryElem.setAttribute("accuracy", query.accuracy); } @@ -31634,9 +31634,9 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { ldef.appendChild(queryElem); } - + if (typeof props.layerlist[ld].renderer == "object") { - this.addRenderer(ldef, props.layerlist[ld].renderer); + this.addRenderer(ldef, props.layerlist[ld].renderer); } } } @@ -31644,31 +31644,31 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { var getElem = this.createElementNS("", "GET_FEATURES"); getElem.setAttribute("outputmode", "newxml"); getElem.setAttribute("checkesc", "true"); - + if (request.get_feature.geometry) { getElem.setAttribute("geometry", request.get_feature.geometry); } else { getElem.setAttribute("geometry", "false"); } - + if (request.get_feature.compact) { getElem.setAttribute("compact", request.get_feature.compact); } - + if (request.get_feature.featurelimit == "number") { getElem.setAttribute("featurelimit", request.get_feature.featurelimit); } - + getElem.setAttribute("globalenvelope", "true"); reqElem.appendChild(getElem); - + if (request.get_feature.layer != null && request.get_feature.layer.length > 0) { var lyrElem = this.createElementNS("", "LAYER"); lyrElem.setAttribute("id", request.get_feature.layer); getElem.appendChild(lyrElem); } - + var fquery = request.get_feature.query; if (fquery != null) { var qElem = null; @@ -31678,15 +31678,15 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { qElem = this.createElementNS("", "QUERY"); } getElem.appendChild(qElem); - + if (typeof fquery.accuracy == "number") { qElem.setAttribute("accuracy", fquery.accuracy); } //qElem.setAttribute("featurelimit", "5"); - + if (fquery.featurecoordsys != null) { var fcsElem1 = this.createElementNS("", "FEATURECOORDSYS"); - + if (fquery.featurecoordsys.id == 0) { fcsElem1.setAttribute("string", fquery.featurecoordsys.string); } else { @@ -31694,10 +31694,10 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { } qElem.appendChild(fcsElem1); } - + if (fquery.filtercoordsys != null) { var fcsElem2 = this.createElementNS("", "FILTERCOORDSYS"); - + if (fquery.filtercoordsys.id === 0) { fcsElem2.setAttribute("string", fquery.filtercoordsys.string); } else { @@ -31705,30 +31705,30 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { } qElem.appendChild(fcsElem2); } - - if (fquery.buffer > 0) { + + if (fquery.buffer > 0) { var bufElem = this.createElementNS("", "BUFFER"); bufElem.setAttribute("distance", fquery.buffer); qElem.appendChild(bufElem); } - + if (fquery.isspatial) { var spfElem = this.createElementNS("", "SPATIALFILTER"); spfElem.setAttribute("relation", fquery.spatialfilter.relation); qElem.appendChild(spfElem); - + if (fquery.spatialfilter.envelope) { - var envElem = this.createElementNS("", "ENVELOPE"); + var envElem = this.createElementNS("", "ENVELOPE"); envElem.setAttribute("minx", fquery.spatialfilter.envelope.minx); envElem.setAttribute("miny", fquery.spatialfilter.envelope.miny); envElem.setAttribute("maxx", fquery.spatialfilter.envelope.maxx); envElem.setAttribute("maxy", fquery.spatialfilter.envelope.maxy); spfElem.appendChild(envElem); } else if(typeof fquery.spatialfilter.polygon == "object") { - spfElem.appendChild(this.writePolygonGeometry(fquery.spatialfilter.polygon)); + spfElem.appendChild(this.writePolygonGeometry(fquery.spatialfilter.polygon)); } } - + if (fquery.where != null && fquery.where.length > 0) { qElem.setAttribute("where", fquery.where); } @@ -31739,26 +31739,26 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { return OpenLayers.Format.XML.prototype.write.apply(this, [root]); }, - - + + addGroupRenderer: function(ldef, toprenderer) { var topRelem = this.createElementNS("", "GROUPRENDERER"); ldef.appendChild(topRelem); - + for (var rind = 0; rind < toprenderer.length; rind++) { var renderer = toprenderer[rind]; this.addRenderer(topRelem, renderer); } }, - - + + addRenderer: function(topRelem, renderer) { if (OpenLayers.Util.isArray(renderer)) { this.addGroupRenderer(topRelem, renderer); } else { var renderElem = this.createElementNS("", renderer.type.toUpperCase() + "RENDERER"); topRelem.appendChild(renderElem); - + if (renderElem.tagName == "VALUEMAPRENDERER") { this.addValueMapRenderer(renderElem, renderer); } else if (renderElem.tagName == "VALUEMAPLABELRENDERER") { @@ -31768,10 +31768,10 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { } else if (renderElem.tagName == "SCALEDEPENDENTRENDERER") { this.addScaleDependentRenderer(renderElem, renderer); } - } + } }, - - + + addScaleDependentRenderer: function(renderElem, renderer) { if (typeof renderer.lower == "string" || typeof renderer.lower == "number") { renderElem.setAttribute("lower", renderer.lower); @@ -31779,21 +31779,21 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { if (typeof renderer.upper == "string" || typeof renderer.upper == "number") { renderElem.setAttribute("upper", renderer.upper); } - + this.addRenderer(renderElem, renderer.renderer); }, - - + + addValueMapLabelRenderer: function(renderElem, renderer) { renderElem.setAttribute("lookupfield", renderer.lookupfield); renderElem.setAttribute("labelfield", renderer.labelfield); - + if (typeof renderer.exacts == "object") { for (var ext=0, extlen=renderer.exacts.length; ext 0) { response.error = this.getChildValue(errorNode, "Unknown error."); } else { var responseNode = data.getElementsByTagName("RESPONSE"); - + if (responseNode == null || responseNode.length == 0) { response.error = "No RESPONSE tag found in ArcXML response."; return response; } - + var rtype = responseNode[0].firstChild.nodeName; if (rtype == "#text") { rtype = responseNode[0].firstChild.nextSibling.nodeName; } - + if (rtype == "IMAGE") { var envelopeNode = data.getElementsByTagName("ENVELOPE"); var outputNode = data.getElementsByTagName("OUTPUT"); - + if (envelopeNode == null || envelopeNode.length == 0) { response.error = "No ENVELOPE tag found in ArcXML response."; } else if (outputNode == null || outputNode.length == 0) { response.error = "No OUTPUT tag found in ArcXML response."; } else { - var envAttr = this.parseAttributes(envelopeNode[0]); + var envAttr = this.parseAttributes(envelopeNode[0]); var outputAttr = this.parseAttributes(outputNode[0]); - + if (typeof outputAttr.type == "string") { - response.image = { - envelope: envAttr, - output: { - type: outputAttr.type, + response.image = { + envelope: envAttr, + output: { + type: outputAttr.type, data: this.getChildValue(outputNode[0]) } }; @@ -32038,11 +32038,11 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { } } else if (rtype == "FEATURES") { var features = responseNode[0].getElementsByTagName("FEATURES"); - + // get the feature count var featureCount = features[0].getElementsByTagName("FEATURECOUNT"); response.features.featurecount = featureCount[0].getAttribute("count"); - + if (response.features.featurecount > 0) { // get the feature envelope var envelope = features[0].getElementsByTagName("ENVELOPE"); @@ -32081,7 +32081,7 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { linearRings = null; } ring = null; - + if (polys.length == 1) { feature.geometry = polys[0]; } else @@ -32099,8 +32099,8 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { } return response; }, - - + + /** * Method: parseAttributes * @@ -32121,8 +32121,8 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { } return attributes; }, - - + + /** * Method: parsePointGeometry * @@ -32160,10 +32160,10 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { point = null; } - return new OpenLayers.Geometry.LinearRing(ringPoints); + return new OpenLayers.Geometry.LinearRing(ringPoints); }, - - CLASS_NAME: "OpenLayers.Format.ArcXML" + + CLASS_NAME: "OpenLayers.Format.ArcXML" }); OpenLayers.Format.ArcXML.Request = OpenLayers.Class({ @@ -32172,19 +32172,19 @@ OpenLayers.Format.ArcXML.Request = OpenLayers.Class({ get_image: { properties: { background: null, - /*{ + /*{ color: { r:255, g:255, b:255 }, transcolor: null },*/ draw: true, envelope: { - minx: 0, - miny: 0, - maxx: 0, + minx: 0, + miny: 0, + maxx: 0, maxy: 0 }, - featurecoordsys: { - id:0, + featurecoordsys: { + id:0, string:"", datumtransformid:0, datumtransformstring:"" @@ -32243,44 +32243,44 @@ OpenLayers.Format.ArcXML.Request = OpenLayers.Class({ } } }, - + environment: { separators: { cs:" ", ts:";" } }, - + layer: [], workspaces: [] }; - - return OpenLayers.Util.extend(this, defaults); + + return OpenLayers.Util.extend(this, defaults); }, - + CLASS_NAME: "OpenLayers.Format.ArcXML.Request" }); -OpenLayers.Format.ArcXML.Response = OpenLayers.Class({ +OpenLayers.Format.ArcXML.Response = OpenLayers.Class({ initialize: function(params) { var defaults = { image: { envelope:null, output:'' }, - + features: { featurecount: 0, envelope: null, feature: [] }, - + error:'' }; - + return OpenLayers.Util.extend(this, defaults); }, - + CLASS_NAME: "OpenLayers.Format.ArcXML.Response" }); /* ====================================================================== @@ -32779,7 +32779,7 @@ if (!OpenLayers.Request) { OpenLayers.Request = {}; } OpenLayers.Util.extend(OpenLayers.Request, { - + /** * Constant: DEFAULT_CONFIG * {Object} Default configuration for all requests. @@ -32799,22 +32799,22 @@ OpenLayers.Util.extend(OpenLayers.Request, { failure: null, scope: null }, - + /** * Constant: URL_SPLIT_REGEX */ URL_SPLIT_REGEX: /([^:]*:)\/\/([^:]*:?[^@]*@)?([^:\/\?]*):?([^\/\?]*)/, - + /** * APIProperty: events - * {} An events object that handles all + * {} An events object that handles all * events on the {} object. * * All event listeners will receive an event object with three properties: * request - {} The request object. * config - {Object} The config object sent to the specific request method. * requestUrl - {String} The request url. - * + * * Supported event types: * complete - Triggered when we have a response from the request, if a * listener returns false, no further response processing will take @@ -32823,7 +32823,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { * failure - Triggered when the HTTP response does not have a success code. */ events: new OpenLayers.Events(this), - + /** * Method: makeSameOrigin * Using the specified proxy, returns a same origin url of the provided url. @@ -32918,7 +32918,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { * {XMLHttpRequest} Request object. To abort the request before a response * is received, call abort() on the request object. */ - issue: function(config) { + issue: function(config) { // apply default config - proxy host may have changed var defaultConfig = OpenLayers.Util.extend( this.DEFAULT_CONFIG, @@ -32929,9 +32929,9 @@ OpenLayers.Util.extend(OpenLayers.Request, { config = OpenLayers.Util.applyDefaults(config, defaultConfig); config.headers = OpenLayers.Util.applyDefaults(config.headers, defaultConfig.headers); // Always set the "X-Requested-With" header to signal that this request - // was issued through the XHR-object. Since header keys are case + // was issued through the XHR-object. Since header keys are case // insensitive and we want to allow overriding of the "X-Requested-With" - // header through the user we cannot use applyDefaults, but have to + // header through the user we cannot use applyDefaults, but have to // check manually whether we were called with a "X-Requested-With" // header. var customRequestedWithHeader = false, @@ -32950,7 +32950,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { // create request, open, and set headers var request = new OpenLayers.Request.XMLHttpRequest(); - var url = OpenLayers.Util.urlAppend(config.url, + var url = OpenLayers.Util.urlAppend(config.url, OpenLayers.Util.getParameterString(config.params || {})); url = OpenLayers.Request.makeSameOrigin(url, config.proxy); request.open( @@ -32965,7 +32965,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { // we want to execute runCallbacks with "this" as the // execution scope var self = this; - + request.onreadystatechange = function() { if(request.readyState == OpenLayers.Request.XMLHttpRequest.DONE) { var proceed = events.triggerEvent( @@ -32979,7 +32979,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { } } }; - + // send request (optionally with data) and return // call in a timeout for asynchronous requests so the return is // available before readyState == 4 for cached docs @@ -32994,11 +32994,11 @@ OpenLayers.Util.extend(OpenLayers.Request, { } return request; }, - + /** * Method: runCallbacks * Calls the complete, success and failure callbacks. Application - * can listen to the "complete" event, have the listener + * can listen to the "complete" event, have the listener * display a confirm window and always return false, and * execute OpenLayers.Request.runCallbacks if the user * hits "yes" in the confirm window. @@ -33009,12 +33009,12 @@ OpenLayers.Util.extend(OpenLayers.Request, { runCallbacks: function(options) { var request = options.request; var config = options.config; - + // bind callbacks to readyState 4 (done) var complete = (config.scope) ? OpenLayers.Function.bind(config.callback, config.scope) : config.callback; - + // optional success callback var success; if(config.success) { @@ -33043,14 +33043,14 @@ OpenLayers.Util.extend(OpenLayers.Request, { success(request); } } - if(request.status && (request.status < 200 || request.status >= 300)) { + if(request.status && (request.status < 200 || request.status >= 300)) { this.events.triggerEvent("failure", options); if(failure) { failure(request); } } }, - + /** * APIMethod: GET * Send an HTTP GET request. Additional configuration properties are @@ -33061,7 +33061,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { * config - {Object} Object with properties for configuring the request. * See the method for documentation of allowed properties. * This object is modified and should not be reused. - * + * * Returns: * {XMLHttpRequest} Request object. */ @@ -33069,7 +33069,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { config = OpenLayers.Util.extend(config, {method: "GET"}); return OpenLayers.Request.issue(config); }, - + /** * APIMethod: POST * Send a POST request. Additional configuration properties are @@ -33081,7 +33081,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { * See the method for documentation of allowed properties. The * default "Content-Type" header will be set to "application-xml" if * none is provided. This object is modified and should not be reused. - * + * * Returns: * {XMLHttpRequest} Request object. */ @@ -33094,7 +33094,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { } return OpenLayers.Request.issue(config); }, - + /** * APIMethod: PUT * Send an HTTP PUT request. Additional configuration properties are @@ -33106,7 +33106,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { * See the method for documentation of allowed properties. The * default "Content-Type" header will be set to "application-xml" if * none is provided. This object is modified and should not be reused. - * + * * Returns: * {XMLHttpRequest} Request object. */ @@ -33119,7 +33119,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { } return OpenLayers.Request.issue(config); }, - + /** * APIMethod: DELETE * Send an HTTP DELETE request. Additional configuration properties are @@ -33130,7 +33130,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { * config - {Object} Object with properties for configuring the request. * See the method for documentation of allowed properties. * This object is modified and should not be reused. - * + * * Returns: * {XMLHttpRequest} Request object. */ @@ -33138,7 +33138,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { config = OpenLayers.Util.extend(config, {method: "DELETE"}); return OpenLayers.Request.issue(config); }, - + /** * APIMethod: HEAD * Send an HTTP HEAD request. Additional configuration properties are @@ -33149,7 +33149,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { * config - {Object} Object with properties for configuring the request. * See the method for documentation of allowed properties. * This object is modified and should not be reused. - * + * * Returns: * {XMLHttpRequest} Request object. */ @@ -33157,7 +33157,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { config = OpenLayers.Util.extend(config, {method: "HEAD"}); return OpenLayers.Request.issue(config); }, - + /** * APIMethod: OPTIONS * Send an HTTP OPTIONS request. Additional configuration properties are @@ -33168,7 +33168,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { * config - {Object} Object with properties for configuring the request. * See the method for documentation of allowed properties. * This object is modified and should not be reused. - * + * * Returns: * {XMLHttpRequest} Request object. */ @@ -33198,7 +33198,7 @@ OpenLayers.Util.extend(OpenLayers.Request, { * Instances of OpenLayers.Layer.ArcIMS are used to display data from ESRI ArcIMS * Mapping Services. Create a new ArcIMS layer with the * constructor. - * + * * Inherits from: * - */ @@ -33208,35 +33208,35 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { * Constant: DEFAULT_PARAMS * {Object} Default query string parameters. */ - DEFAULT_PARAMS: { + DEFAULT_PARAMS: { ClientVersion: "9.2", ServiceName: '' }, - + /** * APIProperty: featureCoordSys * {String} Code for feature coordinate system. Default is "4326". */ featureCoordSys: "4326", - + /** * APIProperty: filterCoordSys * {String} Code for filter coordinate system. Default is "4326". */ filterCoordSys: "4326", - + /** * APIProperty: layers * {Array} An array of objects with layer properties. */ layers: null, - + /** * APIProperty: async * {Boolean} Request images asynchronously. Default is true. */ async: true, - + /** * APIProperty: name * {String} Layer name. Default is "ArcIMS". @@ -33261,8 +33261,8 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { isBaseLayer: true, async: true, name: "ArcIMS" - }, - + }, + /** * Constructor: OpenLayers.Layer.ArcIMS * Create a new ArcIMS layer object. @@ -33271,9 +33271,9 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { * (code) * var arcims = new OpenLayers.Layer.ArcIMS( * "Global Sample", - * "http://sample.avencia.com/servlet/com.esri.esrimap.Esrimap", + * "http://sample.avencia.com/servlet/com.esri.esrimap.Esrimap", * { - * service: "OpenLayers_Sample", + * service: "OpenLayers_Sample", * layers: [ * // layers to manipulate * {id: "1", visible: true} @@ -33289,7 +33289,7 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { * layer. */ initialize: function(name, url, options) { - + this.tileSize = new OpenLayers.Size(512, 512); // parameters @@ -33300,20 +33300,20 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { this.options = OpenLayers.Util.applyDefaults( options, this.DEFAULT_OPTIONS ); - + OpenLayers.Layer.Grid.prototype.initialize.apply( this, [name, url, this.params, options] ); - //layer is transparent + //layer is transparent if (this.transparent) { - + // unless explicitly set in options, make layer an overlay if (!this.isBaseLayer) { this.isBaseLayer = false; - } - - // jpegs can never be transparent, so intelligently switch the + } + + // jpegs can never be transparent, so intelligently switch the // format, depending on the browser's capabilities if (this.format == "image/jpeg") { this.format = OpenLayers.Util.alphaHack() ? "image/gif" : "image/png"; @@ -33324,7 +33324,7 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { if (this.options.layers === null) { this.options.layers = []; } - }, + }, /** * Method: getURL @@ -33340,28 +33340,28 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { getURL: function(bounds) { var url = ""; bounds = this.adjustBounds(bounds); - + // create an arcxml request to generate the image - var axlReq = new OpenLayers.Format.ArcXML( + var axlReq = new OpenLayers.Format.ArcXML( OpenLayers.Util.extend(this.options, { requesttype: "image", envelope: bounds.toArray(), tileSize: this.tileSize }) ); - + // create a synchronous ajax request to get an arcims image var req = new OpenLayers.Request.POST({ url: this.getFullRequestString(), data: axlReq.write(), async: false }); - + // if the response exists if (req != null) { var doc = req.responseXML; - if (!doc || !doc.documentElement) { + if (!doc || !doc.documentElement) { doc = req.responseText; } @@ -33370,11 +33370,11 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { var arcxml = axlResp.read(doc); url = this.getUrlOrImage(arcxml.image.output); } - + return url; }, - - + + /** * Method: getURLasync * Get an image url this layer asynchronously, and execute a callback @@ -33388,16 +33388,16 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { */ getURLasync: function(bounds, callback, scope) { bounds = this.adjustBounds(bounds); - + // create an arcxml request to generate the image - var axlReq = new OpenLayers.Format.ArcXML( - OpenLayers.Util.extend(this.options, { + var axlReq = new OpenLayers.Format.ArcXML( + OpenLayers.Util.extend(this.options, { requesttype: "image", envelope: bounds.toArray(), tileSize: this.tileSize }) ); - + // create an asynchronous ajax request to get an arcims image OpenLayers.Request.POST({ url: this.getFullRequestString(), @@ -33407,20 +33407,20 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { // process the response from ArcIMS, and call the callback function // to set the image URL var doc = req.responseXML; - if (!doc || !doc.documentElement) { + if (!doc || !doc.documentElement) { doc = req.responseText; } // create a new arcxml format to read the response var axlResp = new OpenLayers.Format.ArcXML(); var arcxml = axlResp.read(doc); - + callback.call(scope, this.getUrlOrImage(arcxml.image.output)); }, scope: this }); }, - + /** * Method: getUrlOrImage * Extract a url or image from the ArcXML image output. @@ -33442,12 +33442,12 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { // The image data is inline and base64 encoded, create a data // url for the image. This will only work for small images, // due to browser url length limits. - ret = "data:image/" + output.type + + ret = "data:image/" + output.type + ";base64," + output.data; } return ret; }, - + /** * Method: setLayerQuery * Set the query definition on this layer. Query definitions are used to @@ -33467,11 +33467,11 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { return; } } - + // no layer found, create a new definition this.options.layers.push({id: id, visible: true, query: querydef}); }, - + /** * Method: getFeatureInfo * Get feature information from ArcIMS. Using the applied geometry, apply @@ -33526,8 +33526,8 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { if (geometry instanceof OpenLayers.LonLat) { // create an envelope if the geometry is really a lon/lat requestOptions.polygon = null; - requestOptions.envelope = [ - geometry.lon - buffer, + requestOptions.envelope = [ + geometry.lon - buffer, geometry.lat - buffer, geometry.lon + buffer, geometry.lat + buffer @@ -33537,7 +33537,7 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { requestOptions.envelope = null; requestOptions.polygon = geometry; } - + // create an arcxml request to get feature requests var arcxml = new OpenLayers.Format.ArcXML(requestOptions); @@ -33556,13 +33556,13 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { var mapOffCenter = this.map.getLonLatFromPixel(viewPx); arcxml.request.get_feature.query.accuracy = mapOffCenter.lon - mapCenter.lon; } - + // set the get_feature query to be the same as the layer passed in arcxml.request.get_feature.query.where = layer.query.where; - + // use area_intersection arcxml.request.get_feature.query.spatialfilter.relation = "area_intersection"; - + // create a new asynchronous request to get the feature info OpenLayers.Request.POST({ url: this.getFullRequestString({'CustomService': 'Query'}), @@ -33570,7 +33570,7 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { callback: function(request) { // parse the arcxml response var response = arcxml.parseResponse(request.responseText); - + if (!arcxml.iserror()) { // if the arcxml is not an error, call the callback with the features parsed callback.call(scope, response.features); @@ -33604,7 +33604,7 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { return obj; }, - + CLASS_NAME: "OpenLayers.Layer.ArcIMS" }); /* ====================================================================== @@ -33633,38 +33633,38 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { */ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { - /** + /** * APIProperty: slideFactor - * {Integer} Number of pixels by which we'll pan the map in any direction + * {Integer} Number of pixels by which we'll pan the map in any direction * on clicking the arrow buttons. If you want to pan by some ratio * of the map dimensions, use instead. */ slideFactor: 50, - /** + /** * APIProperty: slideRatio - * {Number} The fraction of map width/height by which we'll pan the map + * {Number} The fraction of map width/height by which we'll pan the map * on clicking the arrow buttons. Default is null. If set, will * override . E.g. if slideRatio is .5, then the Pan Up - * button will pan up half the map height. + * button will pan up half the map height. */ slideRatio: null, - /** + /** * Property: buttons - * {Array(DOMElement)} Array of Button Divs + * {Array(DOMElement)} Array of Button Divs */ buttons: null, - /** + /** * Property: position - * {} + * {} */ position: null, /** * Constructor: OpenLayers.Control.PanZoom - * + * * Parameters: * options - {Object} */ @@ -33687,11 +33687,11 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { OpenLayers.Control.prototype.destroy.apply(this, arguments); }, - /** + /** * Method: setMap * * Properties: - * map - {} + * map - {} */ setMap: function(map) { OpenLayers.Control.prototype.setMap.apply(this, arguments); @@ -33702,8 +33702,8 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { * Method: draw * * Parameters: - * px - {} - * + * px - {} + * * Returns: * {DOMElement} A reference to the container div for the PanZoom control. */ @@ -33722,26 +33722,26 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { px.y = centered.y+sz.h; this._addButton("panleft", "west-mini.png", px, sz); this._addButton("panright", "east-mini.png", px.add(sz.w, 0), sz); - this._addButton("pandown", "south-mini.png", + this._addButton("pandown", "south-mini.png", centered.add(0, sz.h*2), sz); - this._addButton("zoomin", "zoom-plus-mini.png", + this._addButton("zoomin", "zoom-plus-mini.png", centered.add(0, sz.h*3+5), sz); - this._addButton("zoomworld", "zoom-world-mini.png", + this._addButton("zoomworld", "zoom-world-mini.png", centered.add(0, sz.h*4+5), sz); - this._addButton("zoomout", "zoom-minus-mini.png", + this._addButton("zoomout", "zoom-minus-mini.png", centered.add(0, sz.h*5+5), sz); return this.div; }, - + /** * Method: _addButton - * + * * Parameters: - * id - {String} - * img - {String} - * xy - {} - * sz - {} - * + * id - {String} + * img - {String} + * xy - {} + * sz - {} + * * Returns: * {DOMElement} A Div (an alphaImageDiv, to be precise) that contains the * image of the button, and has all the proper event handlers set. @@ -33749,22 +33749,22 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { _addButton:function(id, img, xy, sz) { var imgLocation = OpenLayers.Util.getImageLocation(img); var btn = OpenLayers.Util.createAlphaImageDiv( - this.id + "_" + id, + this.id + "_" + id, xy, sz, imgLocation, "absolute"); btn.style.cursor = "pointer"; //we want to add the outer div this.div.appendChild(btn); btn.action = id; btn.className = "olButton"; - + //we want to remember/reference the outer div this.buttons.push(btn); return btn; }, - + /** * Method: _removeButton - * + * * Parameters: * btn - {Object} */ @@ -33772,7 +33772,7 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { this.div.removeChild(btn); OpenLayers.Util.removeItem(this.buttons, btn); }, - + /** * Method: removeButtons */ @@ -33781,7 +33781,7 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { this._removeButton(this.buttons[i]); } }, - + /** * Method: onButtonClick * @@ -33791,30 +33791,30 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { onButtonClick: function(evt) { var btn = evt.buttonElement; switch (btn.action) { - case "panup": + case "panup": this.map.pan(0, -this.getSlideFactor("h")); break; - case "pandown": + case "pandown": this.map.pan(0, this.getSlideFactor("h")); break; - case "panleft": + case "panleft": this.map.pan(-this.getSlideFactor("w"), 0); break; - case "panright": + case "panright": this.map.pan(this.getSlideFactor("w"), 0); break; - case "zoomin": - this.map.zoomIn(); + case "zoomin": + this.map.zoomIn(); break; - case "zoomout": - this.map.zoomOut(); + case "zoomout": + this.map.zoomOut(); break; - case "zoomworld": - this.map.zoomToMaxExtent(); + case "zoomworld": + this.map.zoomToMaxExtent(); break; } }, - + /** * Method: getSlideFactor * @@ -33861,7 +33861,7 @@ OpenLayers.Control.PanZoom.Y = 4; /** * Class: OpenLayers.Control.PanZoomBar * The PanZoomBar is a visible control composed of a - * and a . + * and a . * By default it is displayed in the upper left corner of the map as 4 * directional arrows above a vertical slider. * @@ -33870,34 +33870,34 @@ OpenLayers.Control.PanZoom.Y = 4; */ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { - /** + /** * APIProperty: zoomStopWidth */ zoomStopWidth: 18, - /** + /** * APIProperty: zoomStopHeight */ zoomStopHeight: 11, - /** + /** * Property: slider */ slider: null, - /** + /** * Property: sliderEvents * {} */ sliderEvents: null, - /** + /** * Property: zoombarDiv * {DOMElement} */ zoombarDiv: null, - /** + /** * APIProperty: zoomWorldIcon * {Boolean} */ @@ -33913,7 +33913,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { /** * APIProperty: forceFixedZoomLevel - * {Boolean} Force a fixed zoom level even though the map has + * {Boolean} Force a fixed zoom level even though the map has * fractionalZoom */ forceFixedZoomLevel: false, @@ -33938,7 +33938,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { /** * Constructor: OpenLayers.Control.PanZoomBar - */ + */ /** * APIMethod: destroy @@ -33958,12 +33958,12 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { delete this.mouseDragStart; delete this.zoomStart; }, - + /** * Method: setMap - * + * * Parameters: - * map - {} + * map - {} */ setMap: function(map) { OpenLayers.Control.PanZoom.prototype.setMap.apply(this, arguments); @@ -33974,7 +33974,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { }); }, - /** + /** * Method: redraw * clear the div and start over. */ @@ -33982,15 +33982,15 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { if (this.div != null) { this.removeButtons(); this._removeZoomBar(); - } + } this.draw(); }, - + /** - * Method: draw + * Method: draw * * Parameters: - * px - {} + * px - {} */ draw: function(px) { // initialize our internal div @@ -34035,9 +34035,9 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { return this.div; }, - /** + /** * Method: _addZoomBar - * + * * Parameters: * centered - {} where zoombar drawing is to start. */ @@ -34047,13 +34047,13 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { var minZoom = this.map.getMinZoom(); var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom(); var slider = OpenLayers.Util.createAlphaImageDiv(id, - centered.add(-1, zoomsToEnd * this.zoomStopHeight), + centered.add(-1, zoomsToEnd * this.zoomStopHeight), {w: 20, h: 9}, imgLocation, "absolute"); slider.style.cursor = "move"; this.slider = slider; - + this.sliderEvents = new OpenLayers.Events(this, slider, null, true, {includeXY: true}); this.sliderEvents.on({ @@ -34064,14 +34064,14 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { "mousemove": this.zoomBarDrag, "mouseup": this.zoomBarUp }); - + var sz = { w: this.zoomStopWidth, h: this.zoomStopHeight * (this.map.getNumZoomLevels() - minZoom) }; var imgLocation = OpenLayers.Util.getImageLocation("zoombar.png"); var div = null; - + if (OpenLayers.Util.alphaHack()) { var id = this.id + "_" + this.map.id; div = OpenLayers.Util.createAlphaImageDiv(id, centered, @@ -34089,7 +34089,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { div.style.cursor = "pointer"; div.className = "olButton"; this.zoombarDiv = div; - + this.div.appendChild(div); this.startTop = parseInt(div.style.top); @@ -34097,11 +34097,11 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { this.map.events.register("zoomend", this, this.moveZoomBar); - centered = centered.add(0, + centered = centered.add(0, this.zoomStopHeight * (this.map.getNumZoomLevels() - minZoom)); - return centered; + return centered; }, - + /** * Method: _removeZoomBar */ @@ -34115,15 +34115,15 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { "mouseup": this.zoomBarUp }); this.sliderEvents.destroy(); - + this.div.removeChild(this.zoombarDiv); this.zoombarDiv = null; this.div.removeChild(this.slider); this.slider = null; - + this.map.events.unregister("zoomend", this, this.moveZoomBar); }, - + /** * Method: onButtonClick * @@ -34136,31 +34136,31 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { var levels = evt.buttonXY.y / this.zoomStopHeight; if(this.forceFixedZoomLevel || !this.map.fractionalZoom) { levels = Math.floor(levels); - } - var zoom = (this.map.getNumZoomLevels() - 1) - levels; + } + var zoom = (this.map.getNumZoomLevels() - 1) - levels; zoom = Math.min(Math.max(zoom, 0), this.map.getNumZoomLevels() - 1); this.map.zoomTo(zoom); } }, - + /** * Method: passEventToSlider * This function is used to pass events that happen on the div, or the map, * through to the slider, which then does its moving thing. * * Parameters: - * evt - {} + * evt - {} */ passEventToSlider:function(evt) { this.sliderEvents.handleBrowserEvent(evt); }, - + /* * Method: zoomBarDown * event listener for clicks on the slider * * Parameters: - * evt - {} + * evt - {} */ zoomBarDown:function(evt) { if (!OpenLayers.Event.isLeftClick(evt) && !OpenLayers.Event.isSingleTouch(evt)) { @@ -34176,10 +34176,10 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { this.zoomStart = evt.xy.clone(); this.div.style.cursor = "move"; // reset the div offsets just in case the div moved - this.zoombarDiv.offsets = null; + this.zoombarDiv.offsets = null; OpenLayers.Event.stop(evt); }, - + /* * Method: zoomBarDrag * This is what happens when a click has occurred, and the client is @@ -34188,13 +34188,13 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { * visual location * * Parameters: - * evt - {} + * evt - {} */ zoomBarDrag:function(evt) { if (this.mouseDragStart != null) { var deltaY = this.mouseDragStart.y - evt.xy.y; var offsets = OpenLayers.Util.pagePosition(this.zoombarDiv); - if ((evt.clientY - offsets[1]) > 0 && + if ((evt.clientY - offsets[1]) > 0 && (evt.clientY - offsets[1]) < parseInt(this.zoombarDiv.style.height) - 2) { var newTop = parseInt(this.slider.style.top) - deltaY; this.slider.style.top = newTop+"px"; @@ -34205,14 +34205,14 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { OpenLayers.Event.stop(evt); } }, - + /* * Method: zoomBarUp * Perform cleanup when a mouseup event is received -- discover new zoom * level and switch to it. * * Parameters: - * evt - {} + * evt - {} */ zoomBarUp:function(evt) { if (!OpenLayers.Event.isLeftClick(evt) && evt.type !== "touchend") { @@ -34229,11 +34229,11 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { var zoomLevel = this.map.zoom; if (!this.forceFixedZoomLevel && this.map.fractionalZoom) { zoomLevel += this.deltaY/this.zoomStopHeight; - zoomLevel = Math.min(Math.max(zoomLevel, 0), + zoomLevel = Math.min(Math.max(zoomLevel, 0), this.map.getNumZoomLevels() - 1); } else { zoomLevel += this.deltaY/this.zoomStopHeight; - zoomLevel = Math.max(Math.round(zoomLevel), 0); + zoomLevel = Math.max(Math.round(zoomLevel), 0); } this.map.zoomTo(zoomLevel); this.mouseDragStart = null; @@ -34242,18 +34242,18 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { OpenLayers.Event.stop(evt); } }, - + /* * Method: moveZoomBar * Change the location of the slider to match the current zoom level. */ moveZoomBar:function() { - var newTop = - ((this.map.getNumZoomLevels()-1) - this.map.getZoom()) * + var newTop = + ((this.map.getNumZoomLevels()-1) - this.map.getZoom()) * this.zoomStopHeight + this.startTop + 1; this.slider.style.top = newTop + "px"; - }, - + }, + CLASS_NAME: "OpenLayers.Control.PanZoomBar" }); /* ====================================================================== @@ -34272,12 +34272,12 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { /** * Class: OpenLayers.Format.WFSCapabilities * Read WFS Capabilities. - * + * * Inherits from: * - */ OpenLayers.Format.WFSCapabilities = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { - + /** * APIProperty: defaultVersion * {String} Version number to assume if none found. Default is "1.1.0". @@ -34295,16 +34295,16 @@ OpenLayers.Format.WFSCapabilities = OpenLayers.Class(OpenLayers.Format.XML.Versi /** * APIMethod: read - * Read capabilities data from a string, and return a list of layers. - * - * Parameters: + * Read capabilities data from a string, and return a list of layers. + * + * Parameters: * data - {String} or {DOMElement} data to read/parse. * * Returns: * {Array} List of named layers. */ - - CLASS_NAME: "OpenLayers.Format.WFSCapabilities" + + CLASS_NAME: "OpenLayers.Format.WFSCapabilities" }); /* ====================================================================== @@ -34323,7 +34323,7 @@ OpenLayers.Format.WFSCapabilities = OpenLayers.Class(OpenLayers.Format.XML.Versi /** * Class: OpenLayers.Format.WFSCapabilities.v1 * Abstract class not to be instantiated directly. - * + * * Inherits from: * - */ @@ -34355,7 +34355,7 @@ OpenLayers.Format.WFSCapabilities.v1 = OpenLayers.Class( * Property: defaultPrefix */ defaultPrefix: "wfs", - + /** * Constructor: OpenLayers.Format.WFSCapabilities.v1_1 * Create an instance of one of the subclasses. @@ -34367,9 +34367,9 @@ OpenLayers.Format.WFSCapabilities.v1 = OpenLayers.Class( /** * APIMethod: read - * Read capabilities data from a string, and return a list of layers. - * - * Parameters: + * Read capabilities data from a string, and return a list of layers. + * + * Parameters: * data - {String} or {DOMElement} data to read/parse. * * Returns: @@ -34437,7 +34437,7 @@ OpenLayers.Format.WFSCapabilities.v1 = OpenLayers.Class( } }, - CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1" + CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1" }); /* ====================================================================== @@ -34457,7 +34457,7 @@ OpenLayers.Format.WFSCapabilities.v1 = OpenLayers.Class( /** * Class: OpenLayers.Format.WFSCapabilities/v1_1_0 * Read WFS Capabilities version 1.1.0. - * + * * Inherits from: * - */ @@ -34474,7 +34474,7 @@ OpenLayers.Format.WFSCapabilities.v1_1_0 = OpenLayers.Class( splitSpace: (/\s+/), trimComma: (/\s*,\s*/g) }, - + /** * Constructor: OpenLayers.Format.WFSCapabilities.v1_1_0 * Create a new parser for WFS capabilities version 1.1.0. @@ -34504,7 +34504,7 @@ OpenLayers.Format.WFSCapabilities.v1_1_0 = OpenLayers.Class( "ows": OpenLayers.Format.OWSCommon.v1.prototype.readers.ows }, - CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1_1_0" + CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1_1_0" }); /* ====================================================================== @@ -34515,7 +34515,7 @@ OpenLayers.Format.WFSCapabilities.v1_1_0 = OpenLayers.Class( * full list of contributors). Published under the 2-clause BSD license. * See license.txt in the OpenLayers distribution or repository for the * full text of the license. */ - + /** * @requires OpenLayers/Layer.js * @requires OpenLayers/Tile/Image.js @@ -34538,7 +34538,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { * in the layer options */ isBaseLayer: true, - + /** * Property: url * {String} URL of the image to use @@ -34553,7 +34553,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { * maxExtent property of the options argument (as with any other layer). */ extent: null, - + /** * Property: size * {} The image size in pixels @@ -34593,7 +34593,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { this.aspectRatio = (this.extent.getHeight() / this.size.h) / (this.extent.getWidth() / this.size.w); - }, + }, /** * Method: destroy @@ -34607,7 +34607,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { } OpenLayers.Layer.prototype.destroy.apply(this, arguments); }, - + /** * Method: clone * Create a clone of this layer @@ -34619,7 +34619,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { * {} An exact copy of this layer */ clone: function(obj) { - + if(obj == null) { obj = new OpenLayers.Layer.Image(this.name, this.url, @@ -34634,11 +34634,11 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { // copy/set any non-init, non-simple values here return obj; - }, - + }, + /** * APIMethod: setMap - * + * * Parameters: * map - {} */ @@ -34657,10 +34657,10 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { OpenLayers.Layer.prototype.setMap.apply(this, arguments); }, - /** + /** * Method: moveTo * Create the tile for the image or resize it for the new resolution - * + * * Parameters: * bounds - {} * zoomChanged - {Boolean} @@ -34684,7 +34684,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { if(firstRendering) { //create the new tile - this.tile = new OpenLayers.Tile.Image(this, ulPx, this.extent, + this.tile = new OpenLayers.Tile.Image(this, ulPx, this.extent, null, this.tileSize); this.addTileMonitoringHooks(this.tile); } else { @@ -34694,7 +34694,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { } this.tile.draw(); } - }, + }, /** * Set the tile size based on the map size. @@ -34705,12 +34705,12 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { this.tileSize = new OpenLayers.Size(tileWidth, tileHeight); }, - /** + /** * Method: addTileMonitoringHooks - * This function takes a tile as input and adds the appropriate hooks to + * This function takes a tile as input and adds the appropriate hooks to * the tile so that the layer can keep track of the loading tiles. - * - * Parameters: + * + * Parameters: * tile - {} */ addTileMonitoringHooks: function(tile) { @@ -34718,7 +34718,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { this.events.triggerEvent("loadstart"); }; tile.events.register("loadstart", this, tile.onLoadStart); - + tile.onLoadEnd = function() { this.events.triggerEvent("loadend"); }; @@ -34726,12 +34726,12 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { tile.events.register("unload", this, tile.onLoadEnd); }, - /** + /** * Method: removeTileMonitoringHooks - * This function takes a tile as input and removes the tile hooks + * This function takes a tile as input and removes the tile hooks * that were added in . - * - * Parameters: + * + * Parameters: * tile - {} */ removeTileMonitoringHooks: function(tile) { @@ -34743,10 +34743,10 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { scope: this }); }, - + /** * APIMethod: setUrl - * + * * Parameters: * newUrl - {String} */ @@ -34755,12 +34755,12 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { this.tile.draw(); }, - /** + /** * APIMethod: getURL * The url we return is always the same (the image itself never changes) - * so we can ignore the bounds parameter (it will always be the same, - * anyways) - * + * so we can ignore the bounds parameter (it will always be the same, + * anyways) + * * Parameters: * bounds - {} */ @@ -34789,21 +34789,21 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { * one of the strategy subclasses instead. */ OpenLayers.Strategy = OpenLayers.Class({ - + /** * Property: layer * {} The layer this strategy belongs to. */ layer: null, - + /** * Property: options * {Object} Any options sent to the constructor. */ options: null, - /** - * Property: active + /** + * Property: active * {Boolean} The control is active. */ active: null, @@ -34838,7 +34838,7 @@ OpenLayers.Strategy = OpenLayers.Class({ // set the active property here, so that user cannot override it this.active = false; }, - + /** * APIMethod: destroy * Clean up the strategy. @@ -34859,7 +34859,7 @@ OpenLayers.Strategy = OpenLayers.Class({ setLayer: function(layer) { this.layer = layer; }, - + /** * Method: activate * Activate the strategy. Register any listeners, do appropriate setup. @@ -34875,7 +34875,7 @@ OpenLayers.Strategy = OpenLayers.Class({ } return false; }, - + /** * Method: deactivate * Deactivate the strategy. Unregister any listeners, do appropriate @@ -34892,8 +34892,8 @@ OpenLayers.Strategy = OpenLayers.Class({ } return false; }, - - CLASS_NAME: "OpenLayers.Strategy" + + CLASS_NAME: "OpenLayers.Strategy" }); /* ====================================================================== OpenLayers/Strategy/Save.js @@ -34919,10 +34919,10 @@ OpenLayers.Strategy = OpenLayers.Class({ * - */ OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, { - + /** * APIProperty: events - * {} An events object that handles all + * {} An events object that handles all * events on the strategy object. * * Register a listener for a particular event with the following syntax: @@ -34934,16 +34934,16 @@ OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, { * start - Triggered before saving * success - Triggered after a successful transaction * fail - Triggered after a failed transaction - * + * */ - - /** + + /** * Property: events * {} Events instance for triggering this protocol * events. */ events: null, - + /** * APIProperty: auto * {Boolean | Number} Auto-save. Default is false. If true, features will be @@ -34952,7 +34952,7 @@ OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, { * saved on an interval provided by the value (in seconds). */ auto: false, - + /** * Property: timer * {Number} The id of the timer. @@ -34971,11 +34971,11 @@ OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, { OpenLayers.Strategy.prototype.initialize.apply(this, [options]); this.events = new OpenLayers.Events(this); }, - + /** * APIMethod: activate * Activate the strategy. Register any listeners, do appropriate setup. - * + * * Returns: * {Boolean} The strategy was successfully activated. */ @@ -34999,12 +34999,12 @@ OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, { } return activated; }, - + /** * APIMethod: deactivate * Deactivate the strategy. Unregister any listeners, do appropriate * tear-down. - * + * * Returns: * {Boolean} The strategy was successfully deactivated. */ @@ -35025,7 +35025,7 @@ OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, { } return deactivated; }, - + /** * Method: triggerSave * Registered as a listener. Calls save if a feature has insert, update, @@ -35042,7 +35042,7 @@ OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, { this.save([event.feature]); } }, - + /** * APIMethod: save * Tell the layer protocol to commit unsaved features. If the layer @@ -35084,7 +35084,7 @@ OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, { scope: this }); }, - + /** * Method: onCommit * Called after protocol commit. @@ -35127,8 +35127,8 @@ OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, { this.events.triggerEvent("fail", evt); } }, - - CLASS_NAME: "OpenLayers.Strategy.Save" + + CLASS_NAME: "OpenLayers.Strategy.Save" }); /* ====================================================================== OpenLayers/Events/featureclick.js @@ -35147,31 +35147,31 @@ OpenLayers.Strategy.Save = OpenLayers.Class(OpenLayers.Strategy, { * Class: OpenLayers.Events.featureclick * * Extension event type for handling feature click events, including overlapping - * features. - * + * features. + * * Event types provided by this extension: - * - featureclick + * - featureclick */ OpenLayers.Events.featureclick = OpenLayers.Class({ - + /** * Property: cache * {Object} A cache of features under the mouse. */ cache: null, - + /** * Property: map * {} The map to register browser events on. */ map: null, - + /** * Property: provides * {Array(String)} The event types provided by this extension. */ provides: ["featureclick", "nofeatureclick", "featureover", "featureout"], - + /** * Constructor: OpenLayers.Events.featureclick * Create a new featureclick event type. @@ -35194,14 +35194,14 @@ OpenLayers.Events.featureclick = OpenLayers.Class({ } } else { throw("Listeners for '" + this.provides.join("', '") + - "' events can only be registered for OpenLayers.Layer.Vector " + + "' events can only be registered for OpenLayers.Layer.Vector " + "or OpenLayers.Map instances"); } for (var i=this.provides.length-1; i>=0; --i) { target.extensions[this.provides[i]] = true; } }, - + /** * Method: setMap * @@ -35218,7 +35218,7 @@ OpenLayers.Events.featureclick = OpenLayers.Class({ map.events.register("touchend", this, this.onClick, {extension: true}); map.events.register("mousemove", this, this.onMousemove, {extension: true}); }, - + /** * Method: start * Sets startEvt = evt. @@ -35229,18 +35229,18 @@ OpenLayers.Events.featureclick = OpenLayers.Class({ start: function(evt) { this.startEvt = evt; }, - + /** * Method: cancel * Deletes the start event. * * Parameters: * evt - {} - */ + */ cancel: function(evt) { delete this.startEvt; }, - + /** * Method: onClick * Listener for the click event. @@ -35274,7 +35274,7 @@ OpenLayers.Events.featureclick = OpenLayers.Class({ } } }, - + /** * Method: onMousemove * Listener for the mousemove event. @@ -35326,7 +35326,7 @@ OpenLayers.Events.featureclick = OpenLayers.Class({ } } }, - + /** * Method: triggerEvent * Determines where to trigger the event and triggers it. @@ -35401,7 +35401,7 @@ OpenLayers.Events.featureclick = OpenLayers.Class({ } return features; }, - + /** * APIMethod: destroy * Clean up. @@ -35409,7 +35409,7 @@ OpenLayers.Events.featureclick = OpenLayers.Class({ destroy: function() { for (var i=this.provides.length-1; i>=0; --i) { delete this.target.extensions[this.provides[i]]; - } + } this.map.events.un({ mousemove: this.onMousemove, mousedown: this.start, @@ -35423,36 +35423,36 @@ OpenLayers.Events.featureclick = OpenLayers.Class({ delete this.map; delete this.target; } - + }); - + /** * Class: OpenLayers.Events.nofeatureclick * - * Extension event type for handling click events that do not hit a feature. - * + * Extension event type for handling click events that do not hit a feature. + * * Event types provided by this extension: - * - nofeatureclick + * - nofeatureclick */ OpenLayers.Events.nofeatureclick = OpenLayers.Events.featureclick; /** * Class: OpenLayers.Events.featureover * - * Extension event type for handling hovering over a feature. - * + * Extension event type for handling hovering over a feature. + * * Event types provided by this extension: - * - featureover + * - featureover */ OpenLayers.Events.featureover = OpenLayers.Events.featureclick; /** * Class: OpenLayers.Events.featureout * - * Extension event type for handling leaving a feature. - * + * Extension event type for handling leaving a feature. + * * Event types provided by this extension: - * - featureout + * - featureout */ OpenLayers.Events.featureout = OpenLayers.Events.featureclick; /* ====================================================================== @@ -35474,16 +35474,16 @@ OpenLayers.Events.featureout = OpenLayers.Events.featureclick; /** * Class: OpenLayers.Format.GPX - * Read/write GPX parser. Create a new instance with the + * Read/write GPX parser. Create a new instance with the * constructor. * * Inherits from: * - */ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { - - /** + + /** * APIProperty: defaultDesc * {String} Default description for the waypoints/tracks in the case * where the feature has no "description" attribute. @@ -35496,19 +35496,19 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { * {Boolean} Extract waypoints from GPX. (default: true) */ extractWaypoints: true, - + /** * APIProperty: extractTracks * {Boolean} Extract tracks from GPX. (default: true) */ extractTracks: true, - + /** * APIProperty: extractRoutes * {Boolean} Extract routes from GPX. (default: true) */ extractRoutes: true, - + /** * APIProperty: extractAttributes * {Boolean} Extract feature attributes from GPX. (default: true) @@ -35539,7 +35539,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { * Defaults to "OpenLayers" */ creator: "OpenLayers", - + /** * Constructor: OpenLayers.Format.GPX * Create a new parser for GPX. @@ -35554,23 +35554,23 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); }, - + /** * APIMethod: read * Return a list of features from a GPX doc * * Parameters: - * doc - {Element} + * doc - {Element} * * Returns: * Array({}) */ read: function(doc) { - if (typeof doc == "string") { + if (typeof doc == "string") { doc = OpenLayers.Format.XML.prototype.read.apply(this, [doc]); } var features = []; - + if(this.extractTracks) { var tracks = doc.getElementsByTagName("trk"); for (var i=0, len=tracks.length; i)} List of features to serialize into a string. * metadata - {Object} A key/value pairs object to build a metadata node to * add to the gpx. Supported keys are 'name', 'desc', 'author'. @@ -35726,7 +35726,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { /** * Method: buildFeatureNode * Accepts an , and builds a node for it. - * + * * Parameters: * feature - {} * @@ -35737,7 +35737,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { var geometry = feature.geometry; geometry = geometry.clone(); if (this.internalProjection && this.externalProjection) { - geometry.transform(this.internalProjection, + geometry.transform(this.internalProjection, this.externalProjection); } if (geometry.CLASS_NAME == "OpenLayers.Geometry.Point") { @@ -35787,10 +35787,10 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { return nodes; } }, - + /** * Method: buildTrkPtNode - * Builds a trkpt node given a point + * Builds a trkpt node given a point * * Parameters: * point - {} @@ -35861,7 +35861,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { * Class: OpenLayers.Format.WMSDescribeLayer * Read SLD WMS DescribeLayer response * DescribeLayer is meant to couple WMS to WFS and WCS - * + * * Inherits from: * - */ @@ -35872,7 +35872,7 @@ OpenLayers.Format.WMSDescribeLayer = OpenLayers.Class(OpenLayers.Format.XML.Vers * {String} Version number to assume if none found. Default is "1.1.1". */ defaultVersion: "1.1.1", - + /** * Constructor: OpenLayers.Format.WMSDescribeLayer * Create a new parser for WMS DescribeLayer responses. @@ -35884,11 +35884,11 @@ OpenLayers.Format.WMSDescribeLayer = OpenLayers.Class(OpenLayers.Format.XML.Vers /** * APIMethod: read - * Read DescribeLayer data from a string, and return the response. + * Read DescribeLayer data from a string, and return the response. * The OGC currently defines 2 formats which are allowed for output, * so we need to parse these 2 types - * - * Parameters: + * + * Parameters: * data - {String} or {DOMElement} data to read/parse. * * Returns: @@ -35897,8 +35897,8 @@ OpenLayers.Format.WMSDescribeLayer = OpenLayers.Class(OpenLayers.Format.XML.Vers * - {String} owsURL: the online resource * - {String} typeName: the name of the typename on the service */ - - CLASS_NAME: "OpenLayers.Format.WMSDescribeLayer" + + CLASS_NAME: "OpenLayers.Format.WMSDescribeLayer" }); /* ====================================================================== @@ -35920,7 +35920,7 @@ OpenLayers.Format.WMSDescribeLayer = OpenLayers.Class(OpenLayers.Format.XML.Vers * Read SLD WMS DescribeLayer response for WMS 1.1.X * WMS 1.1.X is tightly coupled to SLD 1.0.0 * - * Example DescribeLayer request: + * Example DescribeLayer request: * http://demo.opengeo.org/geoserver/wms?request=DescribeLayer&version=1.1.1&layers=topp:states * * Inherits from: @@ -35928,7 +35928,7 @@ OpenLayers.Format.WMSDescribeLayer = OpenLayers.Class(OpenLayers.Format.XML.Vers */ OpenLayers.Format.WMSDescribeLayer.v1_1_1 = OpenLayers.Class( OpenLayers.Format.WMSDescribeLayer, { - + /** * Constructor: OpenLayers.Format.WMSDescribeLayer * Create a new parser for WMS DescribeLayer responses. @@ -35938,17 +35938,17 @@ OpenLayers.Format.WMSDescribeLayer.v1_1_1 = OpenLayers.Class( * this instance. */ initialize: function(options) { - OpenLayers.Format.WMSDescribeLayer.prototype.initialize.apply(this, + OpenLayers.Format.WMSDescribeLayer.prototype.initialize.apply(this, [options]); }, /** * APIMethod: read - * Read DescribeLayer data from a string, and return the response. + * Read DescribeLayer data from a string, and return the response. * The OGC defines 2 formats which are allowed for output, * so we need to parse these 2 types for version 1.1.X - * - * Parameters: + * + * Parameters: * data - {String} or {DOMElement} data to read/parse. * * Returns: @@ -35964,12 +35964,12 @@ OpenLayers.Format.WMSDescribeLayer.v1_1_1 = OpenLayers.Class( data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); } var root = data.documentElement; - var children = root.childNodes; + var children = root.childNodes; var describelayer = {layerDescriptions: []}; var childNode, nodeName; - for(var i=0; i */ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, { - + /** * APIProperty: isBaseLayer - * Default is true, as this is designed to be a base tile source. + * Default is true, as this is designed to be a base tile source. */ isBaseLayer: true, - + /** * APIProperty: sphericalMercator - * Whether the tile extents should be set to the defaults for + * Whether the tile extents should be set to the defaults for * spherical mercator. Useful for things like OpenStreetMap. * Default is false, except for the OSM subclass. */ @@ -36077,7 +36077,7 @@ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, { * of the server resolutions. */ zoomOffset: 0, - + /** * APIProperty: serverResolutions * {Array} A list of all resolutions available on the server. Only set this @@ -36113,19 +36113,19 @@ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, { name || this.name, url || this.url, {}, options ]); }, - + /** * APIMethod: clone * Create a clone of this layer * * Parameters: * obj - {Object} Is this ever used? - * + * * Returns: * {} An exact clone of this OpenLayers.Layer.XYZ */ clone: function (obj) { - + if (obj == null) { obj = new OpenLayers.Layer.XYZ(this.name, this.url, @@ -36136,7 +36136,7 @@ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, { obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]); return obj; - }, + }, /** * Method: getURL @@ -36156,10 +36156,10 @@ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, { var s = '' + xyz.x + xyz.y + xyz.z; url = this.selectUrl(s, url); } - + return OpenLayers.String.format(url, xyz); }, - + /** * Method: getXYZ * Calculates x, y and z for the given bounds. @@ -36185,20 +36185,20 @@ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, { return {'x': x, 'y': y, 'z': z}; }, - + /* APIMethod: setMap - * When the layer is added to a map, then we can fetch our origin - * (if we don't have one.) - * + * When the layer is added to a map, then we can fetch our origin + * (if we don't have one.) + * * Parameters: * map - {} */ setMap: function(map) { OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments); - if (!this.tileOrigin) { + if (!this.tileOrigin) { this.tileOrigin = new OpenLayers.LonLat(this.maxExtent.left, this.maxExtent.bottom); - } + } }, CLASS_NAME: "OpenLayers.Layer.XYZ" @@ -36222,12 +36222,12 @@ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, { * hosted tile.openstreetmap.org Mapnik tileset is used. If you wish to use * a different layer instead, you need to provide a different * URL to the constructor. Here's an example for using OpenCycleMap: - * + * * (code) - * new OpenLayers.Layer.OSM("OpenCycleMap", + * new OpenLayers.Layer.OSM("OpenCycleMap", * ["http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png", * "http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png", - * "http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"]); + * "http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"]); * (end) * * Inherits from: @@ -36250,10 +36250,10 @@ OpenLayers.Layer.OSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { * is null or undefined. To use another tileset you can have something * like this: * (code) - * new OpenLayers.Layer.OSM("OpenCycleMap", + * new OpenLayers.Layer.OSM("OpenCycleMap", * ["http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png", * "http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png", - * "http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"]); + * "http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"]); * (end) */ url: [ @@ -36344,37 +36344,37 @@ OpenLayers.Layer.OSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { */ /** - * Class: OpenLayers.Renderer + * Class: OpenLayers.Renderer * This is the base class for all renderers. * * This is based on a merger code written by Paul Spencer and Bertil Chapuis. * It is largely composed of virtual functions that are to be implemented * in technology-specific subclasses, but there is some generic code too. - * + * * The functions that *are* implemented here merely deal with the maintenance - * of the size and extent variables, as well as the cached 'resolution' - * value. - * + * of the size and extent variables, as well as the cached 'resolution' + * value. + * * A note to the user that all subclasses should use getResolution() instead - * of directly accessing this.resolution in order to correctly use the + * of directly accessing this.resolution in order to correctly use the * cacheing system. * */ OpenLayers.Renderer = OpenLayers.Class({ - /** + /** * Property: container - * {DOMElement} + * {DOMElement} */ container: null, - + /** * Property: root * {DOMElement} */ root: null, - /** + /** * Property: extent * {} */ @@ -36383,32 +36383,32 @@ OpenLayers.Renderer = OpenLayers.Class({ /** * Property: locked * {Boolean} If the renderer is currently in a state where many things - * are changing, the 'locked' property is set to true. This means + * are changing, the 'locked' property is set to true. This means * that renderers can expect at least one more drawFeature event to be * called with the 'locked' property set to 'true': In some renderers, * this might make sense to use as a 'only update local information' - * flag. - */ + * flag. + */ locked: false, - - /** + + /** * Property: size - * {} + * {} */ size: null, - + /** * Property: resolution * {Float} cache of current map resolution */ resolution: null, - + /** - * Property: map + * Property: map * {} Reference to the map -- this is set in Vector's setMap() */ map: null, - + /** * Property: featureDx * {Number} Feature offset in x direction. Will be calculated for and @@ -36416,12 +36416,12 @@ OpenLayers.Renderer = OpenLayers.Class({ * ). */ featureDx: 0, - + /** - * Constructor: OpenLayers.Renderer + * Constructor: OpenLayers.Renderer * * Parameters: - * containerID - {} + * containerID - {} * options - {Object} options for this renderer. See sublcasses for * supported options. */ @@ -36429,7 +36429,7 @@ OpenLayers.Renderer = OpenLayers.Class({ this.container = OpenLayers.Util.getElement(containerID); OpenLayers.Util.extend(this, options); }, - + /** * APIMethod: destroy */ @@ -36444,20 +36444,20 @@ OpenLayers.Renderer = OpenLayers.Class({ /** * APIMethod: supported * This should be overridden by specific subclasses - * + * * Returns: * {Boolean} Whether or not the browser supports the renderer class */ supported: function() { return false; - }, - + }, + /** * Method: setExtent * Set the visible part of the layer. * - * Resolution has probably changed, so we nullify the resolution - * cache (this.resolution) -- this way it will be re-computed when + * Resolution has probably changed, so we nullify the resolution + * cache (this.resolution) -- this way it will be re-computed when * next it is needed. * We nullify the resolution cache (this.resolution) if resolutionChanged * is set to true - this way it will be re-computed on the next @@ -36484,27 +36484,27 @@ OpenLayers.Renderer = OpenLayers.Class({ } return true; }, - + /** * Method: setSize * Sets the size of the drawing surface. - * - * Resolution has probably changed, so we nullify the resolution - * cache (this.resolution) -- this way it will be re-computed when + * + * Resolution has probably changed, so we nullify the resolution + * cache (this.resolution) -- this way it will be re-computed when * next it is needed. * * Parameters: - * size - {} + * size - {} */ setSize: function(size) { this.size = size.clone(); this.resolution = null; }, - - /** + + /** * Method: getResolution * Uses cached copy of resolution if available to minimize computing - * + * * Returns: * {Float} The current map's resolution */ @@ -36512,7 +36512,7 @@ OpenLayers.Renderer = OpenLayers.Class({ this.resolution = this.resolution || this.map.getResolution(); return this.resolution; }, - + /** * Method: drawFeature * Draw the feature. The optional style argument can be used @@ -36520,9 +36520,9 @@ OpenLayers.Renderer = OpenLayers.Class({ * be called from layer.drawFeature(). * * Parameters: - * feature - {} + * feature - {} * style - {} - * + * * Returns: * {Boolean} true if the feature has been drawn completely, false if not, * undefined if the feature had no geometry @@ -36546,7 +36546,7 @@ OpenLayers.Renderer = OpenLayers.Class({ var rendered = this.drawGeometry(feature.geometry, style, feature.id); if(style.display != "none" && style.label && rendered !== false) { - var location = feature.geometry.getCentroid(); + var location = feature.geometry.getCentroid(); if(style.labelXOffset || style.labelYOffset) { var xOffset = isNaN(style.labelXOffset) ? 0 : style.labelXOffset; var yOffset = isNaN(style.labelYOffset) ? 0 : style.labelYOffset; @@ -36586,26 +36586,26 @@ OpenLayers.Renderer = OpenLayers.Class({ } }, - /** + /** * Method: drawGeometry - * + * * Draw a geometry. This should only be called from the renderer itself. * Use layer.drawFeature() from outside the renderer. * virtual function * * Parameters: - * geometry - {} - * style - {Object} - * featureId - {} + * geometry - {} + * style - {Object} + * featureId - {} */ drawGeometry: function(geometry, style, featureId) {}, - + /** * Method: drawText * Function for drawing text labels. * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * featureId - {String} * style - * location - {} @@ -36616,40 +36616,40 @@ OpenLayers.Renderer = OpenLayers.Class({ * Method: removeText * Function for removing text labels. * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * featureId - {String} */ removeText: function(featureId) {}, - + /** * Method: clear * Clear all vectors from the renderer. * virtual function. - */ + */ clear: function() {}, /** * Method: getFeatureIdFromEvent - * Returns a feature id from an event on the renderer. + * Returns a feature id from an event on the renderer. * How this happens is specific to the renderer. This should be * called from layer.getFeatureFromEvent(). * Virtual function. - * + * * Parameters: - * evt - {} + * evt - {} * * Returns: * {String} A feature id or undefined. */ getFeatureIdFromEvent: function(evt) {}, - + /** - * Method: eraseFeatures + * Method: eraseFeatures * This is called by the layer to erase features - * + * * Parameters: - * features - {Array()} + * features - {Array()} */ eraseFeatures: function(features) { if(!(OpenLayers.Util.isArray(features))) { @@ -36661,24 +36661,24 @@ OpenLayers.Renderer = OpenLayers.Class({ this.removeText(feature.id); } }, - + /** * Method: eraseGeometry * Remove a geometry from the renderer (by id). * virtual function. - * + * * Parameters: - * geometry - {} + * geometry - {} * featureId - {String} */ eraseGeometry: function(geometry, featureId) {}, - + /** * Method: moveRoot * moves this renderer's root to a (different) renderer. * To be implemented by subclasses that require a common renderer root for * feature selection. - * + * * Parameters: * renderer - {} target renderer for the moved root */ @@ -36689,20 +36689,20 @@ OpenLayers.Renderer = OpenLayers.Class({ * Gets the layer that this renderer's output appears on. If moveRoot was * used, this will be different from the id of the layer containing the * features rendered by this renderer. - * + * * Returns: * {String} the id of the output layer. */ getRenderLayerId: function() { return this.container.id; }, - + /** * Method: applyDefaultSymbolizer - * + * * Parameters: * symbolizer - {Object} - * + * * Returns: * {Object} */ @@ -36750,7 +36750,7 @@ OpenLayers.Renderer.defaultSymbolizer = { pointRadius: 0, labelAlign: 'cm' }; - + /** @@ -36780,26 +36780,26 @@ OpenLayers.Renderer.symbol = { */ /** - * Class: OpenLayers.Renderer.Canvas + * Class: OpenLayers.Renderer.Canvas * A renderer based on the 2D 'canvas' drawing element. - * + * * Inherits: * - */ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { - + /** * APIProperty: hitDetection * {Boolean} Allow for hit detection of features. Default is true. */ hitDetection: true, - + /** * Property: hitOverflow * {Number} The method for converting feature identifiers to color values - * supports 16777215 sequential values. Two features cannot be + * supports 16777215 sequential values. Two features cannot be * predictably detected if their identifiers differ by more than this - * value. The hitOverflow allows for bigger numbers (but the + * value. The hitOverflow allows for bigger numbers (but the * difference in values is still limited). */ hitOverflow: 0, @@ -36808,27 +36808,27 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { * Property: canvas * {Canvas} The canvas context object. */ - canvas: null, - + canvas: null, + /** * Property: features * {Object} Internal object of feature/style pairs for use in redrawing the layer. */ features: null, - + /** * Property: pendingRedraw * {Boolean} The renderer needs a redraw call to render features added while * the renderer was locked. */ pendingRedraw: false, - + /** * Property: cachedSymbolBounds * {Object} Internal cache of calculated symbol extents. */ cachedSymbolBounds: {}, - + /** * Constructor: OpenLayers.Renderer.Canvas * @@ -36847,7 +36847,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { this.hitContext = this.hitCanvas.getContext("2d"); } }, - + /** * Method: setExtent * Set the visible part of the layer. @@ -36866,13 +36866,13 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { // always redraw features return false; }, - - /** + + /** * Method: eraseGeometry * Erase a geometry from the renderer. Because the Canvas renderer has * 'memory' of the features that it has drawn, we have to remove the - * feature so it doesn't redraw. - * + * feature so it doesn't redraw. + * * Parameters: * geometry - {} * featureId - {String} @@ -36883,14 +36883,14 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { /** * APIMethod: supported - * + * * Returns: * {Boolean} Whether or not the browser supports the renderer class */ supported: function() { return OpenLayers.CANVAS_SUPPORTED; - }, - + }, + /** * Method: setSize * Sets the size of the drawing surface. @@ -36898,7 +36898,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { * Once the size is updated, redraw the canvas. * * Parameters: - * size - {} + * size - {} */ setSize: function(size) { this.size = size.clone(); @@ -36916,15 +36916,15 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { hitCanvas.height = size.h; } }, - + /** * Method: drawFeature * Draw the feature. Stores the feature in the features list, - * then redraws the layer. + * then redraws the layer. * * Parameters: - * feature - {} - * style - {} + * feature - {} + * style - {} * * Returns: * {Boolean} The feature has been drawn completely. If the feature has no @@ -36963,14 +36963,14 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { return rendered; }, - /** + /** * Method: drawGeometry * Used when looping (in redraw) over the features; draws - * the canvas. + * the canvas. * * Parameters: - * geometry - {} - * style - {Object} + * geometry - {} + * style - {Object} */ drawGeometry: function(geometry, style, featureId) { var className = geometry.CLASS_NAME; @@ -37003,19 +37003,19 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { /** * Method: drawExternalGraphic - * Called to draw External graphics. - * - * Parameters: + * Called to draw External graphics. + * + * Parameters: * geometry - {} * style - {Object} * featureId - {String} - */ + */ drawExternalGraphic: function(geometry, style, featureId) { var img = new Image(); - var title = style.title || style.graphicTitle; + var title = style.title || style.graphicTitle; if (title) { - img.title = title; + img.title = title; } var width = style.graphicWidth || style.graphicHeight; @@ -37028,7 +37028,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { style.graphicYOffset : -(0.5 * height); var opacity = style.graphicOpacity || style.fillOpacity; - + var onLoad = function() { if(!this.features[featureId]) { return; @@ -37064,42 +37064,42 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { /** * Method: drawNamedSymbol - * Called to draw Well Known Graphic Symbol Name. + * Called to draw Well Known Graphic Symbol Name. * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * geometry - {} * style - {Object} * featureId - {String} - */ + */ drawNamedSymbol: function(geometry, style, featureId) { var x, y, cx, cy, i, symbolBounds, scaling, angle; var unscaledStrokeWidth; var deg2rad = Math.PI / 180.0; - + var symbol = OpenLayers.Renderer.symbol[style.graphicName]; - + if (!symbol) { throw new Error(style.graphicName + ' is not a valid symbol name'); } - + if (!symbol.length || symbol.length < 2) return; - + var pt = this.getLocalXY(geometry); var p0 = pt[0]; var p1 = pt[1]; - + if (isNaN(p0) || isNaN(p1)) return; - + // Use rounded line caps this.canvas.lineCap = "round"; this.canvas.lineJoin = "round"; - + if (this.hitDetection) { this.hitContext.lineCap = "round"; this.hitContext.lineJoin = "round"; } - + // Scale and rotate symbols, using precalculated bounds whenever possible. if (style.graphicName in this.cachedSymbolBounds) { symbolBounds = this.cachedSymbolBounds[style.graphicName]; @@ -37110,39 +37110,39 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { } this.cachedSymbolBounds[style.graphicName] = symbolBounds; } - + // Push symbol scaling, translation and rotation onto the transformation stack in reverse order. // Don't forget to apply all canvas transformations to the hitContext canvas as well(!) this.canvas.save(); if (this.hitDetection) { this.hitContext.save(); } - + // Step 3: place symbol at the desired location this.canvas.translate(p0,p1); if (this.hitDetection) { this.hitContext.translate(p0,p1); } - + // Step 2a. rotate the symbol if necessary angle = deg2rad * style.rotation; // will be NaN when style.rotation is undefined. if (!isNaN(angle)) { this.canvas.rotate(angle); if (this.hitDetection) { this.hitContext.rotate(angle); } } - + // // Step 2: scale symbol such that pointRadius equals half the maximum symbol dimension. scaling = 2.0 * style.pointRadius / Math.max(symbolBounds.getWidth(), symbolBounds.getHeight()); this.canvas.scale(scaling,scaling); if (this.hitDetection) { this.hitContext.scale(scaling,scaling); } - - // Step 1: center the symbol at the origin + + // Step 1: center the symbol at the origin cx = symbolBounds.getCenterLonLat().lon; cy = symbolBounds.getCenterLonLat().lat; this.canvas.translate(-cx,-cy); - if (this.hitDetection) { this.hitContext.translate(-cx,-cy); } + if (this.hitDetection) { this.hitContext.translate(-cx,-cy); } // Don't forget to scale stroke widths, because they are affected by canvas scale transformations as well(!) // Alternative: scale symbol coordinates manually, so stroke width scaling is not needed anymore. unscaledStrokeWidth = style.strokeWidth; style.strokeWidth = unscaledStrokeWidth / scaling; - + if (style.fill !== false) { this.setCanvasStyle("fill", style); this.canvas.beginPath(); @@ -37167,8 +37167,8 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { this.hitContext.closePath(); this.hitContext.fill(); } - } - + } + if (style.stroke !== false) { this.setCanvasStyle("stroke", style); this.canvas.beginPath(); @@ -37180,8 +37180,8 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { } this.canvas.closePath(); this.canvas.stroke(); - - + + if (this.hitDetection) { this.setHitContextStyle("stroke", featureId, style, scaling); this.hitContext.beginPath(); @@ -37194,13 +37194,13 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { this.hitContext.closePath(); this.hitContext.stroke(); } - + } - + style.strokeWidth = unscaledStrokeWidth; this.canvas.restore(); if (this.hitDetection) { this.hitContext.restore(); } - this.setCanvasStyle("reset"); + this.setCanvasStyle("reset"); }, /** @@ -37212,10 +37212,10 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { * style - {Object} Symbolizer hash */ setCanvasStyle: function(type, style) { - if (type === "fill") { + if (type === "fill") { this.canvas.globalAlpha = style['fillOpacity']; this.canvas.fillStyle = style['fillColor']; - } else if (type === "stroke") { + } else if (type === "stroke") { this.canvas.globalAlpha = style['strokeOpacity']; this.canvas.strokeStyle = style['strokeColor']; this.canvas.lineWidth = style['strokeWidth']; @@ -37224,7 +37224,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { this.canvas.lineWidth = 1; } }, - + /** * Method: featureIdToHex * Convert a feature ID string into an RGB hex string. @@ -37246,7 +37246,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { hex = "#" + hex.substring(len-6, len); return hex; }, - + /** * Method: setHitContextStyle * Prepare the hit canvas for drawing by setting various global settings. @@ -37261,10 +37261,10 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { if (type == "fill") { this.hitContext.globalAlpha = 1.0; this.hitContext.fillStyle = hex; - } else if (type == "stroke") { + } else if (type == "stroke") { this.hitContext.globalAlpha = 1.0; this.hitContext.strokeStyle = hex; - // bump up stroke width to deal with antialiasing. If strokeScaling is defined, we're rendering a symbol + // bump up stroke width to deal with antialiasing. If strokeScaling is defined, we're rendering a symbol // on a transformed canvas, so the antialias width bump has to scale as well. if (typeof strokeScaling === "undefined") { this.hitContext.lineWidth = symbolizer.strokeWidth + 2; @@ -37280,12 +37280,12 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { /** * Method: drawPoint * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * geometry - {} * style - {Object} * featureId - {String} - */ + */ drawPoint: function(geometry, style, featureId) { if(style.graphic !== false) { if(style.externalGraphic) { @@ -37329,30 +37329,30 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { } } }, - + /** * Method: drawLineString * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * geometry - {} * style - {Object} * featureId - {String} - */ + */ drawLineString: function(geometry, style, featureId) { style = OpenLayers.Util.applyDefaults({fill: false}, style); this.drawLinearRing(geometry, style, featureId); - }, - + }, + /** * Method: drawLinearRing * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * geometry - {} * style - {Object} * featureId - {String} - */ + */ drawLinearRing: function(geometry, style, featureId) { if (style.fill !== false) { this.setCanvasStyle("fill", style); @@ -37372,7 +37372,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { } this.setCanvasStyle("reset"); }, - + /** * Method: renderPath * Render a path with stroke and optional fill. @@ -37397,36 +37397,36 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { } } }, - + /** * Method: drawPolygon * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * geometry - {} * style - {Object} * featureId - {String} - */ + */ drawPolygon: function(geometry, style, featureId) { var components = geometry.components; var len = components.length; this.drawLinearRing(components[0], style, featureId); // erase inner rings for (var i=1; i} */ getLocalXY: function(point) { @@ -37537,7 +37537,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { /** * Method: clear * Clear all vectors from the renderer. - */ + */ clear: function() { var height = this.root.height; var width = this.root.width; @@ -37550,19 +37550,19 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { /** * Method: getFeatureIdFromEvent - * Returns a feature id from an event on the renderer. - * + * Returns a feature id from an event on the renderer. + * * Parameters: - * evt - {} + * evt - {} * * Returns: - * {)} + * features - {Array()} */ eraseFeatures: function(features) { if(!(OpenLayers.Util.isArray(features))) { @@ -37641,7 +37641,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { item = labelMap[i]; this.drawText(item[0].geometry.getCentroid(), item[1]); } - } + } }, CLASS_NAME: "OpenLayers.Renderer.Canvas" @@ -37694,16 +37694,16 @@ OpenLayers.Renderer.Canvas.drawImageScaleFactor = null; * @requires OpenLayers/Projection.js */ -/** +/** * Class: OpenLayers.Format.OSM - * OSM parser. Create a new instance with the + * OSM parser. Create a new instance with the * constructor. * * Inherits from: * - */ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { - + /** * APIProperty: checkTags * {Boolean} Should tags be checked to determine whether something @@ -37718,16 +37718,16 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { * Must be set when creating the format. Will only be used if checkTags * is set. */ - interestingTagsExclude: null, - + interestingTagsExclude: null, + /** * APIProperty: areaTags - * {Array} List of tags indicating that something is an area. - * Must be set when creating the format. Will only be used if + * {Array} List of tags indicating that something is an area. + * Must be set when creating the format. Will only be used if * checkTags is true. */ - areaTags: null, - + areaTags: null, + /** * Constructor: OpenLayers.Format.OSM * Create a new parser for OSM. @@ -37738,20 +37738,20 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { */ initialize: function(options) { var layer_defaults = { - 'interestingTagsExclude': ['source', 'source_ref', + 'interestingTagsExclude': ['source', 'source_ref', 'source:ref', 'history', 'attribution', 'created_by'], 'areaTags': ['area', 'building', 'leisure', 'tourism', 'ruins', - 'historic', 'landuse', 'military', 'natural', 'sport'] + 'historic', 'landuse', 'military', 'natural', 'sport'] }; - + layer_defaults = OpenLayers.Util.extend(layer_defaults, options); - + var interesting = {}; for (var i = 0; i < layer_defaults.interestingTagsExclude.length; i++) { interesting[layer_defaults.interestingTagsExclude[i]] = true; } layer_defaults.interestingTagsExclude = interesting; - + var area = {}; for (var i = 0; i < layer_defaults.areaTags.length; i++) { area[layer_defaults.areaTags[i]] = true; @@ -37760,102 +37760,102 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { // OSM coordinates are always in longlat WGS84 this.externalProjection = new OpenLayers.Projection("EPSG:4326"); - + OpenLayers.Format.XML.prototype.initialize.apply(this, [layer_defaults]); }, - + /** * APIMethod: read * Return a list of features from a OSM doc - + * Parameters: - * doc - {Element} + * doc - {Element} * * Returns: * Array({}) */ read: function(doc) { - if (typeof doc == "string") { + if (typeof doc == "string") { doc = OpenLayers.Format.XML.prototype.read.apply(this, [doc]); } var nodes = this.getNodes(doc); var ways = this.getWays(doc); - + // Geoms will contain at least ways.length entries. var feat_list = new Array(ways.length); - + for (var i = 0; i < ways.length; i++) { // We know the minimal of this one ahead of time. (Could be -1 // due to areas/polygons) var point_list = new Array(ways[i].nodes.length); - - var poly = this.isWayArea(ways[i]) ? 1 : 0; + + var poly = this.isWayArea(ways[i]) ? 1 : 0; for (var j = 0; j < ways[i].nodes.length; j++) { var node = nodes[ways[i].nodes[j]]; - + var point = new OpenLayers.Geometry.Point(node.lon, node.lat); - - // Since OSM is topological, we stash the node ID internally. + + // Since OSM is topological, we stash the node ID internally. point.osm_id = parseInt(ways[i].nodes[j]); point_list[j] = point; - - // We don't display nodes if they're used inside other + + // We don't display nodes if they're used inside other // elements. - node.used = true; + node.used = true; } var geometry = null; - if (poly) { + if (poly) { geometry = new OpenLayers.Geometry.Polygon( new OpenLayers.Geometry.LinearRing(point_list)); - } else { + } else { geometry = new OpenLayers.Geometry.LineString(point_list); } if (this.internalProjection && this.externalProjection) { - geometry.transform(this.externalProjection, + geometry.transform(this.externalProjection, this.internalProjection); - } + } var feat = new OpenLayers.Feature.Vector(geometry, ways[i].tags); feat.osm_id = parseInt(ways[i].id); feat.fid = "way." + feat.osm_id; feat_list[i] = feat; - } + } for (var node_id in nodes) { var node = nodes[node_id]; if (!node.used || this.checkTags) { var tags = null; - + if (this.checkTags) { var result = this.getTags(node.node, true); if (node.used && !result[1]) { continue; } tags = result[0]; - } else { + } else { tags = this.getTags(node.node); - } - + } + var feat = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(node['lon'], node['lat']), tags); if (this.internalProjection && this.externalProjection) { - feat.geometry.transform(this.externalProjection, + feat.geometry.transform(this.externalProjection, this.internalProjection); - } - feat.osm_id = parseInt(node_id); + } + feat.osm_id = parseInt(node_id); feat.fid = "node." + feat.osm_id; feat_list.push(feat); - } + } // Memory cleanup node.node = null; - } + } return feat_list; }, /** * Method: getNodes - * Return the node items from a doc. + * Return the node items from a doc. * * Parameters: * doc - {DOMElement} node to parse tags from @@ -37877,7 +37877,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { /** * Method: getWays - * Return the way items from a doc. + * Return the way items from a doc. * * Parameters: * doc - {DOMElement} node to parse tags from @@ -37890,22 +37890,22 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { var way_object = { id: way.getAttribute("id") }; - + way_object.tags = this.getTags(way); - + var node_list = way.getElementsByTagName("nd"); - + way_object.nodes = new Array(node_list.length); - + for (var j = 0; j < node_list.length; j++) { way_object.nodes[j] = node_list[j].getAttribute("ref"); - } + } return_ways.push(way_object); } - return return_ways; - - }, - + return return_ways; + + }, + /** * Method: getTags * Return the tags list attached to a specific DOM element. @@ -37913,10 +37913,10 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { * Parameters: * dom_node - {DOMElement} node to parse tags from * interesting_tags - {Boolean} whether the return from this function should - * return a boolean indicating that it has 'interesting tags' -- + * return a boolean indicating that it has 'interesting tags' -- * tags like attribution and source are ignored. (To change the list * of tags, see interestingTagsExclude) - * + * * Returns: * tags - {Object} hash of tags * interesting - {Boolean} if interesting_tags is passed, returns @@ -37933,12 +37933,12 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { if (!this.interestingTagsExclude[key]) { interesting = true; } - } - } - return interesting_tags ? [tags, interesting] : tags; + } + } + return interesting_tags ? [tags, interesting] : tags; }, - /** + /** * Method: isWayArea * Given a way object from getWays, check whether the tags and geometry * indicate something is an area. @@ -37946,10 +37946,10 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { * Returns: * {Boolean} */ - isWayArea: function(way) { + isWayArea: function(way) { var poly_shaped = false; var poly_tags = false; - + if (way.nodes[0] == way.nodes[way.nodes.length - 1]) { poly_shaped = true; } @@ -37960,36 +37960,36 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { break; } } - } - return poly_shaped && (this.checkTags ? poly_tags : true); - }, + } + return poly_shaped && (this.checkTags ? poly_tags : true); + }, /** - * APIMethod: write + * APIMethod: write * Takes a list of features, returns a serialized OSM format file for use * in tools like JOSM. * * Parameters: * features - {Array()} */ - write: function(features) { + write: function(features) { if (!(OpenLayers.Util.isArray(features))) { features = [features]; } - + this.osm_id = 1; this.created_nodes = {}; var root_node = this.createElementNS(null, "osm"); root_node.setAttribute("version", "0.5"); root_node.setAttribute("generator", "OpenLayers "+ OpenLayers.VERSION_NUMBER); - // Loop backwards, because the deserializer puts nodes last, and + // Loop backwards, because the deserializer puts nodes last, and // we want them first if possible for(var i = features.length - 1; i >= 0; i--) { var nodes = this.createFeatureNodes(features[i]); for (var j = 0; j < nodes.length; j++) { root_node.appendChild(nodes[j]); - } + } } return OpenLayers.Format.XML.prototype.write.apply(this, [root_node]); }, @@ -38015,7 +38015,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { } return nodes; }, - + /** * Method: createXML * Takes a feature, returns a list of nodes from size 0->n. @@ -38029,39 +38029,39 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { 'point': function(point) { var id = null; var geometry = point.geometry ? point.geometry : point; - + if (this.internalProjection && this.externalProjection) { geometry = geometry.clone(); - geometry.transform(this.internalProjection, + geometry.transform(this.internalProjection, this.externalProjection); - } - + } + var already_exists = false; // We don't return anything if the node // has already been created if (point.osm_id) { id = point.osm_id; if (this.created_nodes[id]) { already_exists = true; - } + } } else { id = -this.osm_id; - this.osm_id++; + this.osm_id++; } if (already_exists) { node = this.created_nodes[id]; - } else { + } else { var node = this.createElementNS(null, "node"); } this.created_nodes[id] = node; node.setAttribute("id", id); - node.setAttribute("lon", geometry.x); + node.setAttribute("lon", geometry.x); node.setAttribute("lat", geometry.y); if (point.attributes) { this.serializeTags(point, node); } this.setState(point, node); return already_exists ? [] : [node]; - }, + }, linestring: function(feature) { var id; var nodes = []; @@ -38070,7 +38070,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { id = feature.osm_id; } else { id = -this.osm_id; - this.osm_id++; + this.osm_id++; } var way = this.createElementNS(null, "way"); way.setAttribute("id", id); @@ -38091,12 +38091,12 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { } this.serializeTags(feature, way); nodes.push(way); - + return nodes; }, polygon: function(feature) { var attrs = OpenLayers.Util.extend({'area':'yes'}, feature.attributes); - var feat = new OpenLayers.Feature.Vector(feature.geometry.components[0], attrs); + var feat = new OpenLayers.Feature.Vector(feature.geometry.components[0], attrs); feat.osm_id = feature.osm_id; return this.createXML['linestring'].apply(this, [feat]); } @@ -38120,7 +38120,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { }, /** - * Method: setState + * Method: setState * OpenStreetMap has a convention that 'state' is stored for modification or deletion. * This allows the file to be uploaded via JOSM or the bulk uploader tool. * @@ -38140,11 +38140,11 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { if (state) { node.setAttribute("action", state); } - } + } }, - CLASS_NAME: "OpenLayers.Format.OSM" -}); + CLASS_NAME: "OpenLayers.Format.OSM" +}); /* ====================================================================== OpenLayers/Handler/Keyboard.js ====================================================================== */ @@ -38163,22 +38163,22 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { * Class: OpenLayers.handler.Keyboard * A handler for keyboard events. Create a new instance with the * constructor. - * + * * Inherits from: - * - + * - */ OpenLayers.Handler.Keyboard = OpenLayers.Class(OpenLayers.Handler, { /* http://www.quirksmode.org/js/keys.html explains key x-browser key handling quirks in pretty nice detail */ - /** + /** * Constant: KEY_EVENTS * keydown, keypress, keyup */ KEY_EVENTS: ["keydown", "keyup"], - /** + /** * Property: eventListener * {Function} */ @@ -38194,7 +38194,7 @@ OpenLayers.Handler.Keyboard = OpenLayers.Class(OpenLayers.Handler, { /** * Constructor: OpenLayers.Handler.Keyboard * Returns a new keyboard handler. - * + * * Parameters: * control - {} The control that is making use of * this handler. If a handler is being used without a control, the @@ -38214,7 +38214,7 @@ OpenLayers.Handler.Keyboard = OpenLayers.Class(OpenLayers.Handler, { this.handleKeyEvent, this ); }, - + /** * Method: destroy */ @@ -38256,7 +38256,7 @@ OpenLayers.Handler.Keyboard = OpenLayers.Class(OpenLayers.Handler, { }, /** - * Method: handleKeyEvent + * Method: handleKeyEvent */ handleKeyEvent: function (evt) { if (this.checkModifiers(evt)) { @@ -38436,7 +38436,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { dragHandle: null, /** - * APIProperty: onModificationStart + * APIProperty: onModificationStart * {Function} *Deprecated*. Register for "beforefeaturemodified" instead. * The "beforefeaturemodified" event is triggered on the layer before * any modification begins. @@ -38465,7 +38465,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * The "afterfeaturemodified" event is triggered on the layer after * a feature has been modified. * - * Optional function to be called when a feature is finished + * Optional function to be called when a feature is finished * being modified. The function should expect to be called with a * feature. */ @@ -38498,7 +38498,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { if(!(OpenLayers.Util.isArray(this.deleteCodes))) { this.deleteCodes = [this.deleteCodes]; } - + // configure the drag handler var dragCallbacks = { down: function(pixel) { @@ -38564,7 +38564,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { /** * APIMethod: activate * Activate the control. - * + * * Returns: * {Boolean} Successfully activated the control. */ @@ -38584,7 +38584,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * APIMethod: deactivate * Deactivate the control. * - * Returns: + * Returns: * {Boolean} Successfully deactivated the control. */ deactivate: function() { @@ -38688,8 +38688,8 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { }); this.modified = false; }, - - + + /** * Method: dragStart * Called by the drag handler before a feature is dragged. This method is @@ -38784,7 +38784,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { // maintain node z-index this.layer.drawFeature(vertex); }, - + /** * Method: dragComplete * Called by the drag handler when the feature dragging is complete. @@ -38796,10 +38796,10 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { this.resetVertices(); this.setFeatureState(); this.onModification(this.feature); - this.layer.events.triggerEvent("featuremodified", + this.layer.events.triggerEvent("featuremodified", {feature: this.feature}); }, - + /** * Method: setFeatureState * Called when the feature is modified. If the current state is not @@ -38818,7 +38818,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { } } }, - + /** * Method: resetVertices */ @@ -38856,7 +38856,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { } } }, - + /** * Method: handleKeypress * Called by the feature handler on keypress. This is used to delete @@ -38869,7 +38869,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { */ handleKeypress: function(evt) { var code = evt.keyCode; - + // check for delete key if(this.feature && OpenLayers.Util.indexOf(this.deleteCodes, code) != -1) { @@ -38890,7 +38890,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { this.resetVertices(); this.setFeatureState(); this.onModification(this.feature); - this.layer.events.triggerEvent("featuremodified", + this.layer.events.triggerEvent("featuremodified", {feature: this.feature}); } } @@ -38903,7 +38903,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { */ collectVertices: function() { this.vertices = []; - this.virtualVertices = []; + this.virtualVertices = []; var control = this; function collectComponentVertices(geometry) { var i, vertex, component, len; @@ -38928,7 +38928,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { collectComponentVertices(component); } } - + // add virtual vertices in the middle of each edge if (control.createVertices && geometry.CLASS_NAME != "OpenLayers.Geometry.MultiPoint") { for(i=0, len=geometry.components.length; i control and the * attribution placed on or near the map. - * + * * Inherits from: * - */ @@ -39133,7 +39133,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { /** * Property: key - * {String} API key for Bing maps, get your own key + * {String} API key for Bing maps, get your own key * at http://bingmapsportal.com/ . */ key: null, @@ -39152,7 +39152,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { 0.5971642833948135, 0.29858214169740677, 0.14929107084870338, 0.07464553542435169 ], - + /** * Property: attributionTemplate * {String} @@ -39175,7 +39175,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { * {RegExp} Regular expression to match and replace http: in bing urls */ protocolRegex: /^http:/i, - + /** * APIProperty: type * {String} The layer identifier. Any non-birdseye imageryType @@ -39183,14 +39183,14 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { * used. Default is "Road". */ type: "Road", - + /** * APIProperty: culture * {String} The culture identifier. See http://msdn.microsoft.com/en-us/library/ff701709.aspx * for the definition and the possible values. Default is "en-US". */ culture: "en-US", - + /** * APIProperty: metadataParams * {Object} Optional url parameters for the Get Imagery Metadata request @@ -39252,13 +39252,13 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { sphericalMercator: true }, options); var name = options.name || "Bing " + (options.type || this.type); - + var newArgs = [name, null, options]; OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArgs); this.tileOptions = OpenLayers.Util.extend({ crossOriginKeyword: 'anonymous' }, this.options.tileOptions); - this.loadMetadata(); + this.loadMetadata(); }, /** @@ -39284,7 +39284,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { script.id = this._callbackId; document.getElementsByTagName("head")[0].appendChild(script); }, - + /** * Method: initLayer * @@ -39313,7 +39313,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { } this.updateAttribution(); }, - + /** * Method: getURL * @@ -39343,7 +39343,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { return OpenLayers.String.format(url, {'quadkey': quadKey}); }, - + /** * Method: updateAttribution * Updates the attribution according to the requirements outlined in @@ -39386,7 +39386,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { property: "attribution" }); }, - + /** * Method: setMap */ @@ -39394,13 +39394,13 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { OpenLayers.Layer.XYZ.prototype.setMap.apply(this, arguments); this.map.events.register("moveend", this, this.updateAttribution); }, - + /** * APIMethod: clone - * + * * Parameters: * obj - {Object} - * + * * Returns: * {} An exact clone of this */ @@ -39413,7 +39413,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { // copy/set any non-init, non-simple values here return obj; }, - + /** * Method: destroy */ @@ -39422,7 +39422,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { this.map.events.unregister("moveend", this, this.updateAttribution); OpenLayers.Layer.XYZ.prototype.destroy.apply(this, arguments); }, - + CLASS_NAME: "OpenLayers.Layer.Bing" }); @@ -39456,19 +39456,19 @@ OpenLayers.Layer.Bing.processMetadata = function(metadata) { * @requires OpenLayers/Style.js * @requires OpenLayers/Feature/Vector.js */ - + /** * Class: OpenLayers.StyleMap */ OpenLayers.StyleMap = OpenLayers.Class({ - + /** * Property: styles * {Object} Hash of {}, keyed by names of well known * rendering intents (e.g. "default", "temporary", "select", "delete"). */ styles: null, - + /** * Property: extendDefault * {Boolean} if true, every render intent will extend the symbolizers @@ -39476,10 +39476,10 @@ OpenLayers.StyleMap = OpenLayers.Class({ * rendering intent will be treated as a completely independent style. */ extendDefault: true, - + /** * Constructor: OpenLayers.StyleMap - * + * * Parameters: * style - {Object} Optional. Either a style hash, or a style object, or * a hash of style objects (style hashes) keyed by rendering @@ -39500,7 +39500,7 @@ OpenLayers.StyleMap = OpenLayers.Class({ "delete": new OpenLayers.Style( OpenLayers.Feature.Vector.style["delete"]) }; - + // take whatever the user passed as style parameter and convert it // into parts of stylemap. if(style instanceof OpenLayers.Style) { @@ -39539,11 +39539,11 @@ OpenLayers.StyleMap = OpenLayers.Class({ } this.styles = null; }, - + /** * Method: createSymbolizer * Creates the symbolizer for a feature for a render intent. - * + * * Parameters: * feature - {} The feature to evaluate the rules * of the intended style against. @@ -39551,7 +39551,7 @@ OpenLayers.StyleMap = OpenLayers.Class({ * used to draw the feature. Well known intents are "default" * (for just drawing the features), "select" (for selected * features) and "temporary" (for drawing features). - * + * * Returns: * {Object} symbolizer hash */ @@ -39570,20 +39570,20 @@ OpenLayers.StyleMap = OpenLayers.Class({ return OpenLayers.Util.extend(defaultSymbolizer, this.styles[intent].createSymbolizer(feature)); }, - + /** * Method: addUniqueValueRules * Convenience method to create comparison rules for unique values of a * property. The rules will be added to the style object for a specified * rendering intent. This method is a shortcut for creating something like * the "unique value legends" familiar from well known desktop GIS systems - * + * * Parameters: * renderIntent - {String} rendering intent to add the rules to * property - {String} values of feature attributes to create the * rules for * symbolizers - {Object} Hash of symbolizers, keyed by the desired - * property values + * property values * context - {Object} An optional object with properties that * symbolizers' property values should be evaluated * against. If no context is specified, feature.attributes @@ -39670,7 +39670,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * beforefeatureremoved - Triggered before a feature is removed. Listeners * will receive an object with a *feature* property referencing the * feature to be removed. - * beforefeaturesremoved - Triggered before multiple features are removed. + * beforefeaturesremoved - Triggered before multiple features are removed. * Listeners will receive an object with a *features* property * referencing the features to be removed. * featureremoved - Triggerd after a feature is removed. The event @@ -39689,14 +39689,14 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * featureunselected - Triggered after a feature is unselected. * Listeners will receive an object with a *feature* property * referencing the unselected feature. - * beforefeaturemodified - Triggered when a feature is selected to - * be modified. Listeners will receive an object with a *feature* + * beforefeaturemodified - Triggered when a feature is selected to + * be modified. Listeners will receive an object with a *feature* * property referencing the selected feature. * featuremodified - Triggered when a feature has been modified. - * Listeners will receive an object with a *feature* property referencing + * Listeners will receive an object with a *feature* property referencing * the modified feature. * afterfeaturemodified - Triggered when a feature is finished being modified. - * Listeners will receive an object with a *feature* property referencing + * Listeners will receive an object with a *feature* property referencing * the modified feature. * vertexmodified - Triggered when a vertex within any feature geometry * has been modified. Listeners will receive an object with a @@ -39733,7 +39733,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { */ isBaseLayer: false, - /** + /** * APIProperty: isFixed * {Boolean} Whether the layer remains in one place while dragging the * map. Note that setting this to true will move the layer to the bottom @@ -39741,26 +39741,26 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { */ isFixed: false, - /** + /** * APIProperty: features - * {Array()} + * {Array()} */ features: null, - - /** + + /** * Property: filter * {} The filter set in this layer, * a strategy launching read requests can combined * this filter with its own filter. */ filter: null, - - /** + + /** * Property: selectedFeatures - * {Array()} + * {Array()} */ selectedFeatures: null, - + /** * Property: unrenderedFeatures * {Object} hash of features, keyed by feature.id, that the renderer @@ -39773,32 +39773,32 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * {Boolean} report friendly error message when loading of renderer * fails. */ - reportError: true, + reportError: true, - /** + /** * APIProperty: style * {Object} Default style for the layer */ style: null, - + /** * Property: styleMap * {} */ styleMap: null, - + /** * Property: strategies * {Array(})} Optional list of strategies for the layer. */ strategies: null, - + /** * Property: protocol * {} Optional protocol for the layer. */ protocol: null, - + /** * Property: renderers * {Array(String)} List of supported Renderer classes. Add to this list to @@ -39807,21 +39807,21 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * method will be used, if not defined in the 'renderer' option. */ renderers: ['SVG', 'VML', 'Canvas'], - - /** + + /** * Property: renderer * {} */ renderer: null, - + /** * APIProperty: rendererOptions * {Object} Options for the renderer. See {} for * supported options. */ rendererOptions: null, - - /** + + /** * APIProperty: geometryType * {String} geometryType allows you to limit the types of geometries this * layer supports. This should be set to something like @@ -39829,16 +39829,16 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { */ geometryType: null, - /** + /** * Property: drawn * {Boolean} Whether the Vector Layer features have been drawn yet. */ drawn: false, - - /** + + /** * APIProperty: ratio * {Float} This specifies the ratio of the size of the visiblity of the Vector Layer features to the size of the map. - */ + */ ratio: 1, /** @@ -39857,7 +39857,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { OpenLayers.Layer.prototype.initialize.apply(this, arguments); // allow user-set renderer, otherwise assign one - if (!this.renderer || !this.renderer.supported()) { + if (!this.renderer || !this.renderer.supported()) { this.assignRenderer(); } @@ -39865,7 +39865,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { if (!this.renderer || !this.renderer.supported()) { this.renderer = null; this.displayError(); - } + } if (!this.styleMap) { this.styleMap = new OpenLayers.StyleMap(); @@ -39874,7 +39874,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { this.features = []; this.selectedFeatures = []; this.unrenderedFeatures = {}; - + // Allow for custom layer behavior if(this.strategies){ for(var i=0, len=this.strategies.length; i} An exact clone of this layer */ clone: function (obj) { - + if (obj == null) { obj = new OpenLayers.Layer.Vector(this.name, this.getOptions()); } @@ -39946,8 +39946,8 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { obj.features = clonedFeatures; return obj; - }, - + }, + /** * Method: refresh * Ask the layer to request features again and redraw them. Triggers @@ -39963,11 +39963,11 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { } }, - /** + /** * Method: assignRenderer - * Iterates through the available renderer implementations and selects + * Iterates through the available renderer implementations and selects * and assigns the first one whose "supported()" function returns true. - */ + */ assignRenderer: function() { for (var i=0, len=this.renderers.length; i} + * map - {} */ - setMap: function(map) { + setMap: function(map) { OpenLayers.Layer.prototype.setMap.apply(this, arguments); if (!this.renderer) { @@ -40054,15 +40054,15 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { } } }, - + /** * Method: onMapResize - * Notify the renderer of the change in size. - * + * Notify the renderer of the change in size. + * */ onMapResize: function() { OpenLayers.Layer.prototype.onMapResize.apply(this, arguments); - + var newSize = this.map.getSize(); newSize.w = newSize.w * this.ratio; newSize.h = newSize.h * this.ratio; @@ -40071,22 +40071,22 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { /** * Method: moveTo - * Reset the vector layer's div so that it once again is lined up with + * Reset the vector layer's div so that it once again is lined up with * the map. Notify the renderer of the change of extent, and in the - * case of a change of zoom level (resolution), have the + * case of a change of zoom level (resolution), have the * renderer redraw features. - * - * If the layer has not yet been drawn, cycle through the layer's + * + * If the layer has not yet been drawn, cycle through the layer's * features and draw each one. - * + * * Parameters: - * bounds - {} - * zoomChanged - {Boolean} - * dragging - {Boolean} + * bounds - {} + * zoomChanged - {Boolean} + * dragging - {Boolean} */ moveTo: function(bounds, zoomChanged, dragging) { OpenLayers.Layer.prototype.moveTo.apply(this, arguments); - + var coordSysUnchanged = true; if (!dragging) { this.renderer.root.style.visibility = 'hidden'; @@ -40115,7 +40115,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { if (OpenLayers.IS_GECKO === true) { this.div.scrollLeft = this.div.scrollLeft; } - + if (!zoomChanged && coordSysUnchanged) { for (var i in this.unrenderedFeatures) { var feature = this.unrenderedFeatures[i]; @@ -40131,13 +40131,13 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { feature = this.features[i]; this.drawFeature(feature); } - } + } }, - - /** + + /** * APIMethod: display * Hide or show the Layer - * + * * Parameters: * display - {Boolean} */ @@ -40156,14 +40156,14 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * Add Features to the layer. * * Parameters: - * features - {Array()} + * features - {Array()} * options - {Object} */ addFeatures: function(features, options) { if (!(OpenLayers.Util.isArray(features))) { features = [features]; } - + var notify = !options || !options.silent; if(notify) { var event = {features: features}; @@ -40173,7 +40173,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { } features = event.features; } - + // Track successfully added features for featuresadded event, since // beforefeatureadded can veto single features. var featuresAdded = []; @@ -40182,9 +40182,9 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { this.renderer.locked = true; } else { this.renderer.locked = false; - } + } var feature = features[i]; - + if (this.geometryType && !(feature.geometry instanceof this.geometryType)) { throw new TypeError('addFeatures: component should be an ' + @@ -40209,7 +40209,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { featuresAdded.push(feature); this.features.push(feature); this.drawFeature(feature); - + if (notify) { this.events.triggerEvent("featureadded", { feature: feature @@ -40217,7 +40217,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { this.onFeatureInsert(feature); } } - + if(notify) { this.events.triggerEvent("featuresadded", {features: featuresAdded}); } @@ -40231,7 +40231,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * and featureremoved events will be triggered for each feature. The * featuresremoved event will be triggered after all features have * been removed. To supress event triggering, use the silent option. - * + * * Parameters: * features - {Array()} List of features to be * removed. @@ -40256,7 +40256,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { } var notify = !options || !options.silent; - + if (notify) { this.events.triggerEvent( "beforefeaturesremoved", {features: features} @@ -40269,15 +40269,15 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { // because if all the features after the current one are 'null', we // won't call eraseGeometry, so we break the 'renderer functions // will always be called with locked=false *last*' rule. The end result - // is a possible gratiutious unlocking to save a loop through the rest + // is a possible gratiutious unlocking to save a loop through the rest // of the list checking the remaining features every time. So long as - // null geoms are rare, this is probably okay. + // null geoms are rare, this is probably okay. if (i != 0 && features[i-1].geometry) { this.renderer.locked = true; } else { this.renderer.locked = false; } - + var feature = features[i]; delete this.unrenderedFeatures[feature.id]; @@ -40294,8 +40294,8 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { if (feature.geometry) { this.renderer.eraseFeatures(feature); } - - //in the case that this feature is one of the selected features, + + //in the case that this feature is one of the selected features, // remove it from that array as well. if (OpenLayers.Util.indexOf(this.selectedFeatures, feature) != -1){ OpenLayers.Util.removeItem(this.selectedFeatures, feature); @@ -40312,8 +40312,8 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { this.events.triggerEvent("featuresremoved", {features: features}); } }, - - /** + + /** * APIMethod: removeAllFeatures * Remove all features from the layer. * @@ -40386,20 +40386,20 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * is included, this style will be used. If no style is included, the * feature's style will be used. If the feature doesn't have a style, * the layer's style will be used. - * - * This function is not designed to be used when adding features to + * + * This function is not designed to be used when adding features to * the layer (use addFeatures instead). It is meant to be used when - * the style of a feature has changed, or in some other way needs to + * the style of a feature has changed, or in some other way needs to * visually updated *after* it has already been added to a layer. You - * must add the feature to the layer for most layer-related events to + * must add the feature to the layer for most layer-related events to * happen. * - * Parameters: - * feature - {} + * Parameters: + * feature - {} * style - {String | Object} Named render intent or full symbolizer object. */ drawFeature: function(feature, style) { - // don't try to draw the feature with the renderer if the layer is not + // don't try to draw the feature with the renderer if the layer is not // drawn itself if (!this.drawn) { return; @@ -40414,7 +40414,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { style = this.styleMap.createSymbolizer(feature, renderIntent); } } - + var drawn = this.renderer.drawFeature(feature, style); //TODO remove the check for null when we get rid of Renderer.SVG if (drawn === false || drawn === null) { @@ -40423,13 +40423,13 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { delete this.unrenderedFeatures[feature.id]; } }, - + /** * Method: eraseFeatures * Erase features from the layer. * * Parameters: - * features - {Array()} + * features - {Array()} */ eraseFeatures: function(features) { this.renderer.eraseFeatures(features); @@ -40441,7 +40441,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * Otherwise, return null. * * Parameters: - * evt - {Event} + * evt - {Event} * * Returns: * {} A feature if one was under the event. @@ -40518,7 +40518,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { getFeatureByFid: function(featureFid) { return this.getFeatureBy('fid', featureFid); }, - + /** * APIMethod: getFeaturesByAttribute * Returns an array of features that have the given attribute key set to the @@ -40530,15 +40530,15 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * attrValue - {Mixed} * * Returns: - * Array({}) An array of features that have the + * Array({}) An array of features that have the * passed named attribute set to the given value. */ getFeaturesByAttribute: function(attrName, attrValue) { var i, - feature, + feature, len = this.features.length, foundFeatures = []; - for(i = 0; i < len; i++) { + for(i = 0; i < len; i++) { feature = this.features[i]; if(feature && feature.attributes) { if (feature.attributes[attrName] === attrValue) { @@ -40571,12 +40571,12 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * Does nothing by default. Override this if you * need to do something on feature updates. * - * Parameters: - * feature - {} + * Parameters: + * feature - {} */ onFeatureInsert: function(feature) { }, - + /** * APIMethod: preFeatureInsert * method called before a feature is inserted. @@ -40585,15 +40585,15 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * layer, but before they are drawn, such as adjust the style. * * Parameters: - * feature - {} + * feature - {} */ preFeatureInsert: function(feature) { }, - /** + /** * APIMethod: getDataExtent * Calculates the max extent which includes all of the features. - * + * * Returns: * {} or null if the layer has no features with * geometries. @@ -40655,22 +40655,22 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { /** * APIProperty: dx - * {Number} Point grid spacing in the x-axis direction (map units). + * {Number} Point grid spacing in the x-axis direction (map units). * Read-only. Use the method to modify this value. */ dx: null, /** * APIProperty: dy - * {Number} Point grid spacing in the y-axis direction (map units). + * {Number} Point grid spacing in the y-axis direction (map units). * Read-only. Use the method to modify this value. */ dy: null, /** * APIProperty: ratio - * {Number} Ratio of the desired grid size to the map viewport size. - * Default is 1.5. Larger ratios mean the grid is recalculated less often + * {Number} Ratio of the desired grid size to the map viewport size. + * Default is 1.5. Larger ratios mean the grid is recalculated less often * while panning. The setting has precedence when determining * grid size. Read-only. Use the method to modify this value. */ @@ -40693,16 +40693,16 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { /** * APIProperty: origin - * {} Grid origin. The grid lattice will be aligned with - * the origin. If not set at construction, the center of the map's maximum - * extent is used. Read-only. Use the method to modify this + * {} Grid origin. The grid lattice will be aligned with + * the origin. If not set at construction, the center of the map's maximum + * extent is used. Read-only. Use the method to modify this * value. */ origin: null, /** * Property: gridBounds - * {} Internally cached grid bounds (with optional + * {} Internally cached grid bounds (with optional * rotation applied). */ gridBounds: null, @@ -40713,22 +40713,22 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { * * Parameters: * config - {Object} An object containing all configuration properties for - * the layer. The and properties are required to be set at + * the layer. The and properties are required to be set at * construction. Any other layer properties may be set in this object. */ initialize: function(config) { config = config || {}; OpenLayers.Layer.Vector.prototype.initialize.apply(this, [config.name, config]); }, - - /** + + /** * Method: setMap - * The layer has been added to the map. - * + * The layer has been added to the map. + * * Parameters: - * map - {} + * map - {} */ - setMap: function(map) { + setMap: function(map) { OpenLayers.Layer.Vector.prototype.setMap.apply(this, arguments); map.events.register("moveend", this, this.onMoveEnd); }, @@ -40744,7 +40744,7 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { map.events.unregister("moveend", this, this.onMoveEnd); OpenLayers.Layer.Vector.prototype.removeMap.apply(this, arguments); }, - + /** * APIMethod: setRatio * Set the grid property and update the grid. Can only be called @@ -40757,10 +40757,10 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { this.ratio = ratio; this.updateGrid(true); }, - + /** * APIMethod: setMaxFeatures - * Set the grid property and update the grid. Can only be + * Set the grid property and update the grid. Can only be * called after the layer has been added to a map with a center/extent. * * Parameters: @@ -40774,7 +40774,7 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { /** * APIMethod: setSpacing * Set the grid and properties and update the grid. If only one - * argument is provided, it will be set as and . Can only be + * argument is provided, it will be set as and . Can only be * called after the layer has been added to a map with a center/extent. * * Parameters: @@ -40786,7 +40786,7 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { this.dy = dy || dx; this.updateGrid(true); }, - + /** * APIMethod: setOrigin * Set the grid property and update the grid. Can only be called @@ -40799,7 +40799,7 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { this.origin = origin; this.updateGrid(true); }, - + /** * APIMethod: getOrigin * Get the grid property. @@ -40813,12 +40813,12 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { } return this.origin; }, - + /** * APIMethod: setRotation * Set the grid property and update the grid. Rotation values * are in degrees clockwise from the positive x-axis (negative values - * for counter-clockwise rotation). Can only be called after the layer + * for counter-clockwise rotation). Can only be called after the layer * has been added to a map with a center/extent. * * Parameters: @@ -40828,7 +40828,7 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { this.rotation = rotation; this.updateGrid(true); }, - + /** * Method: onMoveEnd * Listener for map "moveend" events. @@ -40836,7 +40836,7 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { onMoveEnd: function() { this.updateGrid(); }, - + /** * Method: getViewBounds * Gets the (potentially rotated) view bounds for grid calculations. @@ -40855,7 +40855,7 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { } return bounds; }, - + /** * Method: updateGrid * Update the grid. @@ -40873,7 +40873,7 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { var viewBoundsHeight = viewBounds.getHeight(); var aspectRatio = viewBoundsWidth / viewBoundsHeight; var maxHeight = Math.sqrt(this.dx * this.dy * this.maxFeatures / aspectRatio); - var maxWidth = maxHeight * aspectRatio; + var maxWidth = maxHeight * aspectRatio; var gridWidth = Math.min(viewBoundsWidth * this.ratio, maxWidth); var gridHeight = Math.min(viewBoundsHeight * this.ratio, maxHeight); var center = viewBounds.getCenterLonLat(); @@ -40907,19 +40907,19 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { /** * Method: invalidBounds - * Determine whether the previously generated point grid is invalid. - * This occurs when the map bounds extends beyond the previously + * Determine whether the previously generated point grid is invalid. + * This occurs when the map bounds extends beyond the previously * generated grid bounds. * * Returns: - * {Boolean} + * {Boolean} */ invalidBounds: function() { return !this.gridBounds || !this.gridBounds.containsBounds(this.getViewBounds()); }, CLASS_NAME: "OpenLayers.Layer.PointGrid" - + }); /* ====================================================================== OpenLayers/Handler/MouseWheel.js @@ -40937,27 +40937,27 @@ OpenLayers.Layer.PointGrid = OpenLayers.Class(OpenLayers.Layer.Vector, { /** * Class: OpenLayers.Handler.MouseWheel * Handler for wheel up/down events. - * + * * Inherits from: * - */ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { - /** - * Property: wheelListener - * {function} + /** + * Property: wheelListener + * {function} */ wheelListener: null, /** * Property: interval - * {Integer} In order to increase server performance, an interval (in - * milliseconds) can be set to reduce the number of up/down events - * called. If set, a new up/down event will not be set until the - * interval has passed. - * Defaults to 0, meaning no interval. + * {Integer} In order to increase server performance, an interval (in + * milliseconds) can be set to reduce the number of up/down events + * called. If set, a new up/down event will not be set until the + * interval has passed. + * Defaults to 0, meaning no interval. */ interval: 0, - + /** * Property: maxDelta * {Integer} Maximum delta to collect before breaking from the current @@ -40965,7 +40965,7 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { * returned from the handler. Default is Number.POSITIVE_INFINITY. */ maxDelta: Number.POSITIVE_INFINITY, - + /** * Property: delta * {Integer} When interval is set, delta collects the mousewheel z-deltas @@ -40973,25 +40973,25 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { * See also the cumulative option */ delta: 0, - + /** * Property: cumulative - * {Boolean} When interval is set: true to collect all the mousewheel + * {Boolean} When interval is set: true to collect all the mousewheel * z-deltas, false to only record the delta direction (positive or * negative) */ cumulative: true, - + /** * Constructor: OpenLayers.Handler.MouseWheel * * Parameters: - * control - {} + * control - {} * callbacks - {Object} An object containing a single function to be * called when the drag operation is finished. * The callback should expect to recieve a single * argument, the point geometry. - * options - {Object} + * options - {Object} */ initialize: function(control, callbacks, options) { OpenLayers.Handler.prototype.initialize.apply(this, arguments); @@ -41002,7 +41002,7 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { /** * Method: destroy - */ + */ destroy: function() { OpenLayers.Handler.prototype.destroy.apply(this, arguments); this.wheelListener = null; @@ -41012,22 +41012,22 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { * Mouse ScrollWheel code thanks to http://adomas.org/javascript-mouse-wheel/ */ - /** + /** * Method: onWheelEvent * Catch the wheel event and handle it xbrowserly - * + * * Parameters: - * e - {Event} + * e - {Event} */ onWheelEvent: function(e){ - + // make sure we have a map and check keyboard modifiers if (!this.map || !this.checkModifiers(e)) { return; } - - // Ride up the element's DOM hierarchy to determine if it or any of - // its ancestors was: + + // Ride up the element's DOM hierarchy to determine if it or any of + // its ancestors was: // * specifically marked as scrollable (CSS overflow property) // * one of our layer divs or a div marked as scrollable // ('olScrollable' CSS class) @@ -41036,7 +41036,7 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { var overScrollableDiv = false; var allowScroll = false; var overMapDiv = false; - + var elem = OpenLayers.Event.element(e); while((elem != null) && !overMapDiv && !overScrollableDiv) { @@ -41046,14 +41046,14 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { if (elem.currentStyle) { overflow = elem.currentStyle["overflow"]; } else { - var style = + var style = document.defaultView.getComputedStyle(elem, null); overflow = style.getPropertyValue("overflow"); } - overScrollableDiv = ( overflow && + overScrollableDiv = ( overflow && (overflow == "auto") || (overflow == "scroll") ); } catch(err) { - //sometimes when scrolling in a popup, this causes + //sometimes when scrolling in a popup, this causes // obscure browser error } } @@ -41077,14 +41077,14 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { elem = elem.parentNode; } - + // Logic below is the following: // // If we are over a scrollable div or not over the map div: // * do nothing (let the browser handle scrolling) // - // otherwise - // + // otherwise + // // If we are over the layer div or a 'olScrollable' div: // * zoom/in out // then @@ -41092,13 +41092,13 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { // // otherwise // - // Kill the event (dont scroll the page if we wheel over the + // Kill the event (dont scroll the page if we wheel over the // layerswitcher or the pan/zoom control) // if (!overScrollableDiv && overMapDiv) { if (allowScroll) { var delta = 0; - + if (e.wheelDelta) { delta = e.wheelDelta; if (delta % 160 === 0) { @@ -41135,14 +41135,14 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { * Method: wheelZoom * Given the wheel event, we carry out the appropriate zooming in or out, * based on the 'wheelDelta' or 'detail' property of the event. - * + * * Parameters: * e - {Event} */ wheelZoom: function(e) { var delta = this.delta; this.delta = 0; - + if (delta) { e.xy = this.map.events.getMousePosition(e); if (delta < 0) { @@ -41154,9 +41154,9 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { } } }, - + /** - * Method: activate + * Method: activate */ activate: function (evt) { if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) { @@ -41172,7 +41172,7 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { }, /** - * Method: deactivate + * Method: deactivate */ deactivate: function (evt) { if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) { @@ -41207,7 +41207,7 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, { * Base class representing a symbolizer used for feature rendering. */ OpenLayers.Symbolizer = OpenLayers.Class({ - + /** * APIProperty: zIndex @@ -41216,14 +41216,14 @@ OpenLayers.Symbolizer = OpenLayers.Class({ * with smaller zIndex values. Default is 0. */ zIndex: 0, - + /** * Constructor: OpenLayers.Symbolizer * Instances of this class are not useful. See one of the subclasses. * * Parameters: - * config - {Object} An object containing properties to be set on the - * symbolizer. Any documented symbolizer property can be set at + * config - {Object} An object containing properties to be set on the + * symbolizer. Any documented symbolizer property can be set at * construction. * * Returns: @@ -41232,8 +41232,8 @@ OpenLayers.Symbolizer = OpenLayers.Class({ initialize: function(config) { OpenLayers.Util.extend(this, config); }, - - /** + + /** * APIMethod: clone * Create a copy of this symbolizer. * @@ -41243,9 +41243,9 @@ OpenLayers.Symbolizer = OpenLayers.Class({ var Type = eval(this.CLASS_NAME); return new Type(OpenLayers.Util.extend({}, this)); }, - + CLASS_NAME: "OpenLayers.Symbolizer" - + }); /* ====================================================================== @@ -41266,14 +41266,14 @@ OpenLayers.Symbolizer = OpenLayers.Class({ * A symbolizer used to render raster images. */ OpenLayers.Symbolizer.Raster = OpenLayers.Class(OpenLayers.Symbolizer, { - + /** * Constructor: OpenLayers.Symbolizer.Raster * Create a symbolizer for rendering rasters. * * Parameters: - * config - {Object} An object containing properties to be set on the - * symbolizer. Any documented symbolizer property can be set at + * config - {Object} An object containing properties to be set on the + * symbolizer. Any documented symbolizer property can be set at * construction. * * Returns: @@ -41282,9 +41282,9 @@ OpenLayers.Symbolizer.Raster = OpenLayers.Class(OpenLayers.Symbolizer, { initialize: function(config) { OpenLayers.Symbolizer.prototype.initialize.apply(this, arguments); }, - + CLASS_NAME: "OpenLayers.Symbolizer.Raster" - + }); /* ====================================================================== OpenLayers/Rule.js @@ -41307,25 +41307,25 @@ OpenLayers.Symbolizer.Raster = OpenLayers.Class(OpenLayers.Symbolizer, { * This class represents an SLD Rule, as being used for rule-based SLD styling. */ OpenLayers.Rule = OpenLayers.Class({ - + /** * Property: id * {String} A unique id for this session. */ id: null, - + /** * APIProperty: name * {String} name of this rule */ name: null, - + /** * Property: title * {String} Title of this rule (set if included in SLD) */ title: null, - + /** * Property: description * {String} Description of this rule (set if abstract is included in SLD) @@ -41339,7 +41339,7 @@ OpenLayers.Rule = OpenLayers.Class({ * be used. */ context: null, - + /** * Property: filter * {} Optional filter for the rule. @@ -41349,13 +41349,13 @@ OpenLayers.Rule = OpenLayers.Class({ /** * Property: elseFilter * {Boolean} Determines whether this rule is only to be applied only if - * no other rules match (ElseFilter according to the SLD specification). + * no other rules match (ElseFilter according to the SLD specification). * Default is false. For instances of OpenLayers.Rule, if elseFilter is - * false, the rule will always apply. For subclasses, the else property is + * false, the rule will always apply. For subclasses, the else property is * ignored. */ elseFilter: false, - + /** * Property: symbolizer * {Object} Symbolizer or hash of symbolizers for this rule. If hash of @@ -41366,18 +41366,18 @@ OpenLayers.Rule = OpenLayers.Class({ * SLD. */ symbolizer: null, - + /** * Property: symbolizers - * {Array} Collection of symbolizers associated with this rule. If + * {Array} Collection of symbolizers associated with this rule. If * provided at construction, the symbolizers array has precedence - * over the deprecated symbolizer property. Note that multiple + * over the deprecated symbolizer property. Note that multiple * symbolizers are not currently supported by the vector renderers. * Rules with multiple symbolizers are currently only useful for * maintaining elements in an SLD document. */ symbolizers: null, - + /** * APIProperty: minScaleDenominator * {Number} or {String} minimum scale at which to draw the feature. @@ -41393,15 +41393,15 @@ OpenLayers.Rule = OpenLayers.Class({ * propertyNames in the form "literal ${propertyName}" */ maxScaleDenominator: null, - - /** + + /** * Constructor: OpenLayers.Rule * Creates a Rule. * * Parameters: * options - {Object} An optional object with properties to set on the * rule - * + * * Returns: * {} */ @@ -41414,7 +41414,7 @@ OpenLayers.Rule = OpenLayers.Class({ this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); }, - /** + /** * APIMethod: destroy * nullify references to prevent circular references and memory leaks */ @@ -41425,14 +41425,14 @@ OpenLayers.Rule = OpenLayers.Class({ this.symbolizer = null; delete this.symbolizers; }, - + /** * APIMethod: evaluate * evaluates this rule for a specific feature - * + * * Parameters: * feature - {} feature to apply the rule to. - * + * * Returns: * {Boolean} true if the rule applies, false if it does not. * This rule is the default rule and always returns true. @@ -41444,7 +41444,7 @@ OpenLayers.Rule = OpenLayers.Class({ if (this.minScaleDenominator || this.maxScaleDenominator) { var scale = feature.layer.map.getScale(); } - + // check if within minScale/maxScale bounds if (this.minScaleDenominator) { applies = scale >= OpenLayers.Style.createLiteral( @@ -41454,7 +41454,7 @@ OpenLayers.Rule = OpenLayers.Class({ applies = scale < OpenLayers.Style.createLiteral( this.maxScaleDenominator, context); } - + // check if optional filter applies if(applies && this.filter) { // feature id filters get the feature, others get the context @@ -41467,11 +41467,11 @@ OpenLayers.Rule = OpenLayers.Class({ return applies; }, - + /** * Method: getContext * Gets the context for evaluating this rule - * + * * Paramters: * feature - {} feature to take the context from if * none is specified. @@ -41486,11 +41486,11 @@ OpenLayers.Rule = OpenLayers.Class({ } return context; }, - + /** * APIMethod: clone * Clones this rule. - * + * * Returns: * {} Clone of this rule. */ @@ -41523,7 +41523,7 @@ OpenLayers.Rule = OpenLayers.Class({ options.context = this.context && OpenLayers.Util.extend({}, this.context); return new OpenLayers.Rule(options); }, - + CLASS_NAME: "OpenLayers.Rule" }); /* ====================================================================== @@ -41549,12 +41549,12 @@ OpenLayers.Rule = OpenLayers.Class({ * Class: OpenLayers.Format.SLD * Read/Write SLD. Create a new instance with the * constructor. - * + * * Inherits from: * - */ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { - + /** * APIProperty: profile * {String} If provided, use a custom profile. @@ -41569,14 +41569,14 @@ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { * {String} Version number to assume if none found. Default is "1.0.0". */ defaultVersion: "1.0.0", - + /** * APIProperty: stringifyOutput * {Boolean} If true, write will return a string otherwise a DOMElement. * Default is true. */ stringifyOutput: true, - + /** * APIProperty: namedLayersAsArray * {Boolean} Generate a namedLayers array. If false, the namedLayers @@ -41584,7 +41584,7 @@ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { * false. */ namedLayersAsArray: false, - + /** * APIMethod: write * Write a SLD document given a list of styles. @@ -41596,7 +41596,7 @@ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { * Returns: * {String} An SLD document string. */ - + /** * APIMethod: read * Read and SLD doc and return an object representing the SLD. @@ -41609,7 +41609,7 @@ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { * {Object} An object representing the SLD. */ - CLASS_NAME: "OpenLayers.Format.SLD" + CLASS_NAME: "OpenLayers.Format.SLD" }); /* ====================================================================== OpenLayers/Symbolizer/Polygon.js @@ -41629,57 +41629,57 @@ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { * A symbolizer used to render line features. */ OpenLayers.Symbolizer.Polygon = OpenLayers.Class(OpenLayers.Symbolizer, { - + /** * APIProperty: strokeColor * {String} Color for line stroke. This is a RGB hex value (e.g. "#ff0000" * for red). - * + * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ - + /** * APIProperty: strokeOpacity * {Number} Stroke opacity (0-1). - * + * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ - + /** * APIProperty: strokeWidth * {Number} Pixel stroke width. - * + * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ - + /** * APIProperty: strokeLinecap * {String} Stroke cap type ("butt", "round", or "square"). - * + * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ - + /** * Property: strokeDashstyle * {String} Stroke dash style according to the SLD spec. Note that the * OpenLayers values for strokeDashstyle ("dot", "dash", "dashdot", * "longdash", "longdashdot", or "solid") will not work in SLD, but * most SLD patterns will render correctly in OpenLayers. - * + * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ /** * APIProperty: fillColor * {String} RGB hex fill color (e.g. "#ff0000" for red). - * + * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ - + /** * APIProperty: fillOpacity * {Number} Fill opacity (0-1). - * + * * No default set here. Use OpenLayers.Renderer.defaultRenderer for defaults. */ @@ -41688,8 +41688,8 @@ OpenLayers.Symbolizer.Polygon = OpenLayers.Class(OpenLayers.Symbolizer, { * Create a symbolizer for rendering polygons. * * Parameters: - * config - {Object} An object containing properties to be set on the - * symbolizer. Any documented symbolizer property can be set at + * config - {Object} An object containing properties to be set on the + * symbolizer. Any documented symbolizer property can be set at * construction. * * Returns: @@ -41698,9 +41698,9 @@ OpenLayers.Symbolizer.Polygon = OpenLayers.Class(OpenLayers.Symbolizer, { initialize: function(config) { OpenLayers.Symbolizer.prototype.initialize.apply(this, arguments); }, - + CLASS_NAME: "OpenLayers.Symbolizer.Polygon" - + }); /* ====================================================================== @@ -41724,7 +41724,7 @@ OpenLayers.Symbolizer.Polygon = OpenLayers.Class(OpenLayers.Symbolizer, { * - */ OpenLayers.Format.GML.v2 = OpenLayers.Class(OpenLayers.Format.GML.Base, { - + /** * Property: schemaLocation * {String} Schema location for a particular minor version. @@ -41896,8 +41896,8 @@ OpenLayers.Format.GML.v2 = OpenLayers.Class(OpenLayers.Format.GML.Base, { "feature": OpenLayers.Format.GML.Base.prototype.writers["feature"], "wfs": OpenLayers.Format.GML.Base.prototype.writers["wfs"] }, - - CLASS_NAME: "OpenLayers.Format.GML.v2" + + CLASS_NAME: "OpenLayers.Format.GML.v2" }); /* ====================================================================== @@ -41917,20 +41917,20 @@ OpenLayers.Format.GML.v2 = OpenLayers.Class(OpenLayers.Format.GML.Base, { /** * Class: OpenLayers.Format.Filter.v1_0_0 * Write ogc:Filter version 1.0.0. - * + * * Inherits from: * - * - */ OpenLayers.Format.Filter.v1_0_0 = OpenLayers.Class( OpenLayers.Format.GML.v2, OpenLayers.Format.Filter.v1, { - + /** * Constant: VERSION * {String} 1.0.0 */ VERSION: "1.0.0", - + /** * Property: schemaLocation * {String} http://www.opengis.net/ogc/filter/1.0.0/filter.xsd @@ -41989,7 +41989,7 @@ OpenLayers.Format.Filter.v1_0_0 = OpenLayers.Class( } }, OpenLayers.Format.Filter.v1.prototype.readers["ogc"]), "gml": OpenLayers.Format.GML.v2.prototype.readers["gml"], - "feature": OpenLayers.Format.GML.v2.prototype.readers["feature"] + "feature": OpenLayers.Format.GML.v2.prototype.readers["feature"] }, /** @@ -42085,7 +42085,7 @@ OpenLayers.Format.Filter.v1_0_0 = OpenLayers.Class( }, - CLASS_NAME: "OpenLayers.Format.Filter.v1_0_0" + CLASS_NAME: "OpenLayers.Format.Filter.v1_0_0" }); /* ====================================================================== @@ -42113,7 +42113,7 @@ OpenLayers.Format.Filter.v1_0_0 = OpenLayers.Class( */ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class( OpenLayers.Format.Filter.v1_0_0, OpenLayers.Format.WFST.v1, { - + /** * Property: version * {String} WFS version number. @@ -42127,7 +42127,7 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class( * property defaults to false as it isn't WFS 1.0.0 compliant. */ srsNameInQuery: false, - + /** * Property: schemaLocations * {Object} Properties are namespace aliases, values are schema locations. @@ -42155,7 +42155,7 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class( OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this, [options]); OpenLayers.Format.WFST.v1.prototype.initialize.apply(this, [options]); }, - + /** * Method: readNode * Shorthand for applying one of the named readers given the node @@ -42178,7 +42178,7 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class( // from the superclass's superclass, which is OpenLayers.Format.XML. return OpenLayers.Format.GML.v2.prototype.readNode.apply(this, arguments); }, - + /** * Property: readers * Contains public functions, grouped by namespace prefix, that will @@ -42246,7 +42246,7 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class( if(options.propertyNames) { for(var i=0,len = options.propertyNames.length; i} This is an array of node id's stored in the * order that they should show up on screen. Id's higher up in the * array (higher array index) represent nodes with higher z-indeces. */ - order: null, - + order: null, + /** * Property: indices * {Object} This is a hash that maps node ids to their z-index value - * stored in the indexer. This is done to make finding a nodes z-index + * stored in the indexer. This is done to make finding a nodes z-index * value O(1). */ indices: null, - + /** * Property: compare * {Function} This is the function used to determine placement of @@ -42316,32 +42316,32 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ * the Z_ORDER_DRAWING_ORDER comparison method. */ compare: null, - + /** * APIMethod: initialize - * Create a new indexer with - * + * Create a new indexer with + * * Parameters: * yOrdering - {Boolean} Whether to use y-ordering. */ initialize: function(yOrdering) { - this.compare = yOrdering ? + this.compare = yOrdering ? OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_Y_ORDER : OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER_DRAWING_ORDER; this.clear(); }, - + /** * APIMethod: insert - * Insert a new node into the indexer. In order to find the correct - * positioning for the node to be inserted, this method uses a binary - * search. This makes inserting O(log(n)). - * + * Insert a new node into the indexer. In order to find the correct + * positioning for the node to be inserted, this method uses a binary + * search. This makes inserting O(log(n)). + * * Parameters: * newNode - {DOMElement} The new node to be inserted. - * + * * Returns * {DOMElement} the node before which we should insert our newNode, or * null if newNode can just be appended. @@ -42352,10 +42352,10 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ if (this.exists(newNode)) { this.remove(newNode); } - + var nodeId = newNode.id; - - this.determineZIndex(newNode); + + this.determineZIndex(newNode); var leftIndex = -1; var rightIndex = this.order.length; @@ -42363,29 +42363,29 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ while (rightIndex - leftIndex > 1) { middle = parseInt((leftIndex + rightIndex) / 2); - + var placement = this.compare(this, newNode, OpenLayers.Util.getElement(this.order[middle])); - + if (placement > 0) { leftIndex = middle; } else { rightIndex = middle; - } + } } - + this.order.splice(rightIndex, 0, nodeId); this.indices[nodeId] = this.getZIndex(newNode); - + // If the new node should be before another in the index // order, return the node before which we have to insert the new one; // else, return null to indicate that the new node can be appended. return this.getNextElement(rightIndex); }, - + /** * APIMethod: remove - * + * * Parameters: * node - {DOMElement} The node to be removed. */ @@ -42397,8 +42397,8 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ // from the indeces hash. this.order.splice(arrayIndex, 1); delete this.indices[nodeId]; - - // Reset the maxium z-index based on the last item in the + + // Reset the maxium z-index based on the last item in the // order array. if (this.order.length > 0) { var lastId = this.order[this.order.length - 1]; @@ -42408,7 +42408,7 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ } } }, - + /** * APIMethod: clear */ @@ -42417,7 +42417,7 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ this.indices = {}; this.maxZIndex = 0; }, - + /** * APIMethod: exists * @@ -42434,29 +42434,29 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ /** * APIMethod: getZIndex * Get the z-index value for the current node from the node data itself. - * + * * Parameters: * node - {DOMElement} The node whose z-index to get. - * + * * Returns: - * {Integer} The z-index value for the specified node (from the node + * {Integer} The z-index value for the specified node (from the node * data itself). */ getZIndex: function(node) { - return node._style.graphicZIndex; + return node._style.graphicZIndex; }, - + /** * Method: determineZIndex - * Determine the z-index for the current node if there isn't one, + * Determine the z-index for the current node if there isn't one, * and set the maximum value if we've found a new maximum. - * + * * Parameters: - * node - {DOMElement} + * node - {DOMElement} */ determineZIndex: function(node) { var zIndex = node._style.graphicZIndex; - + // Everything must have a zIndex. If none is specified, // this means the user *must* (hint: assumption) want this // node to succomb to drawing order. To enforce drawing order @@ -42464,7 +42464,7 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ // greater than any currently in the indexer. if (zIndex == null) { zIndex = this.maxZIndex; - node._style.graphicZIndex = zIndex; + node._style.graphicZIndex = zIndex; } else if (zIndex > this.maxZIndex) { this.maxZIndex = zIndex; } @@ -42473,10 +42473,10 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ /** * APIMethod: getNextElement * Get the next element in the order stack. - * + * * Parameters: * index - {Integer} The index of the current node in this.order. - * + * * Returns: * {DOMElement} the node following the index passed in, or * null. @@ -42491,32 +42491,32 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ return nextElement; } else { return null; - } + } }, - + CLASS_NAME: "OpenLayers.ElementsIndexer" }); /** * Namespace: OpenLayers.ElementsIndexer.IndexingMethods - * These are the compare methods for figuring out where a new node should be - * placed within the indexer. These methods are very similar to general - * sorting methods in that they return -1, 0, and 1 to specify the + * These are the compare methods for figuring out where a new node should be + * placed within the indexer. These methods are very similar to general + * sorting methods in that they return -1, 0, and 1 to specify the * direction in which new nodes fall in the ordering. */ OpenLayers.ElementsIndexer.IndexingMethods = { - + /** * Method: Z_ORDER * This compare method is used by other comparison methods. * It can be used individually for ordering, but is not recommended, * because it doesn't subscribe to drawing order. - * + * * Parameters: * indexer - {} * newNode - {DOMElement} * nextNode - {DOMElement} - * + * * Returns: * {Integer} */ @@ -42526,90 +42526,90 @@ OpenLayers.ElementsIndexer.IndexingMethods = { var returnVal = 0; if (nextNode) { var nextZIndex = indexer.getZIndex(nextNode); - returnVal = newZIndex - nextZIndex; + returnVal = newZIndex - nextZIndex; } - + return returnVal; }, /** * APIMethod: Z_ORDER_DRAWING_ORDER * This method orders nodes by their z-index, but does so in a way - * that, if there are other nodes with the same z-index, the newest - * drawn will be the front most within that z-index. This is the + * that, if there are other nodes with the same z-index, the newest + * drawn will be the front most within that z-index. This is the * default indexing method. - * + * * Parameters: * indexer - {} * newNode - {DOMElement} * nextNode - {DOMElement} - * + * * Returns: * {Integer} */ Z_ORDER_DRAWING_ORDER: function(indexer, newNode, nextNode) { var returnVal = OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER( - indexer, - newNode, + indexer, + newNode, nextNode ); - + // Make Z_ORDER subscribe to drawing order by pushing it above // all of the other nodes with the same z-index. if (nextNode && returnVal == 0) { returnVal = 1; } - + return returnVal; }, /** * APIMethod: Z_ORDER_Y_ORDER * This one should really be called Z_ORDER_Y_ORDER_DRAWING_ORDER, as it - * best describes which ordering methods have precedence (though, the - * name would be too long). This method orders nodes by their z-index, - * but does so in a way that, if there are other nodes with the same - * z-index, the nodes with the lower y position will be "closer" than - * those with a higher y position. If two nodes have the exact same y - * position, however, then this method will revert to using drawing + * best describes which ordering methods have precedence (though, the + * name would be too long). This method orders nodes by their z-index, + * but does so in a way that, if there are other nodes with the same + * z-index, the nodes with the lower y position will be "closer" than + * those with a higher y position. If two nodes have the exact same y + * position, however, then this method will revert to using drawing * order to decide placement. - * + * * Parameters: * indexer - {} * newNode - {DOMElement} * nextNode - {DOMElement} - * + * * Returns: * {Integer} */ Z_ORDER_Y_ORDER: function(indexer, newNode, nextNode) { var returnVal = OpenLayers.ElementsIndexer.IndexingMethods.Z_ORDER( - indexer, - newNode, + indexer, + newNode, nextNode ); - - if (nextNode && returnVal === 0) { + + if (nextNode && returnVal === 0) { var result = nextNode._boundsBottom - newNode._boundsBottom; returnVal = (result === 0) ? 1 : result; } - - return returnVal; + + return returnVal; } }; /** * Class: OpenLayers.Renderer.Elements - * This is another virtual class in that it should never be instantiated by - * itself as a Renderer. It exists because there is *tons* of shared + * This is another virtual class in that it should never be instantiated by + * itself as a Renderer. It exists because there is *tons* of shared * functionality between different vector libraries which use nodes/elements - * as a base for rendering vectors. - * - * The highlevel bits of code that are implemented here are the adding and - * removing of geometries, which is essentially the same for any + * as a base for rendering vectors. + * + * The highlevel bits of code that are implemented here are the adding and + * removing of geometries, which is essentially the same for any * element-based renderer. The details of creating each node and drawing the - * paths are of course different, but the machinery is the same. - * + * paths are of course different, but the machinery is the same. + * * Inherits: * - */ @@ -42620,13 +42620,13 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { * {DOMElement} */ rendererRoot: null, - + /** * Property: root * {DOMElement} */ root: null, - + /** * Property: vectorRoot * {DOMElement} @@ -42642,9 +42642,9 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { /** * Property: xmlns * {String} - */ + */ xmlns: null, - + /** * Property: xOffset * {Number} Offset to apply to the renderer viewport translation in x @@ -42657,7 +42657,7 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { * that the same is true for the renderer extent in pixel space as well. */ xOffset: 0, - + /** * Property: rightOfDateLine * {Boolean} Keeps track of the location of the map extent relative to the @@ -42666,27 +42666,27 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { * extent relative to the date line and updates the xOffset when the extent * has moved from one side of the date line to the other. */ - + /** * Property: Indexer - * {} An instance of OpenLayers.ElementsIndexer + * {} An instance of OpenLayers.ElementsIndexer * created upon initialization if the zIndexing or yOrdering options * passed to this renderer's constructor are set to true. */ - indexer: null, - + indexer: null, + /** * Constant: BACKGROUND_ID_SUFFIX * {String} */ BACKGROUND_ID_SUFFIX: "_background", - + /** * Constant: LABEL_ID_SUFFIX * {String} */ LABEL_ID_SUFFIX: "_label", - + /** * Constant: LABEL_OUTLINE_SUFFIX * {String} @@ -42695,10 +42695,10 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { /** * Constructor: OpenLayers.Renderer.Elements - * + * * Parameters: * containerID - {String} - * options - {Object} options for this renderer. + * options - {Object} options for this renderer. * * Supported options are: * yOrdering - {Boolean} Whether to use y-ordering @@ -42712,24 +42712,24 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { this.root = this.createRoot("_root"); this.vectorRoot = this.createRoot("_vroot"); this.textRoot = this.createRoot("_troot"); - + this.root.appendChild(this.vectorRoot); this.root.appendChild(this.textRoot); - + this.rendererRoot.appendChild(this.root); this.container.appendChild(this.rendererRoot); - + if(options && (options.zIndexing || options.yOrdering)) { this.indexer = new OpenLayers.ElementsIndexer(options.yOrdering); } }, - + /** * Method: destroy */ destroy: function() { - this.clear(); + this.clear(); this.rendererRoot = null; this.root = null; @@ -42737,11 +42737,11 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { OpenLayers.Renderer.prototype.destroy.apply(this, arguments); }, - + /** * Method: clear * Remove all the elements from the root - */ + */ clear: function() { var child; var root = this.vectorRoot; @@ -42760,7 +42760,7 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { this.indexer.clear(); } }, - + /** * Method: setExtent * Set the visible part of the layer. @@ -42797,26 +42797,26 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { return coordSysUnchanged; }, - /** + /** * Method: getNodeType * This function is in charge of asking the specific renderer which type * of node to create for the given geometry and style. All geometries * in an Elements-based renderer consist of one node and some * attributes. We have the nodeFactory() function which creates a node * for us, but it takes a 'type' as input, and that is precisely what - * this function tells us. - * + * this function tells us. + * * Parameters: * geometry - {} * style - {Object} - * + * * Returns: * {String} The corresponding node type for the specified geometry */ getNodeType: function(geometry, style) { }, - /** - * Method: drawGeometry + /** + * Method: drawGeometry * Draw the geometry, creating new nodes, setting paths, setting style, * setting featureId on the node. This method should only be called * by the renderer itself. @@ -42825,7 +42825,7 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { * geometry - {} * style - {Object} * featureId - {String} - * + * * Returns: * {Boolean} true if the geometry has been drawn completely; null if * incomplete; false otherwise @@ -42874,16 +42874,16 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { } return rendered; }, - + /** * Method: redrawNode - * + * * Parameters: * id - {String} * geometry - {} * style - {Object} * featureId - {String} - * + * * Returns: * {Boolean} true if the complete geometry could be drawn, null if parts of * the geometry could not be drawn, false otherwise @@ -42892,7 +42892,7 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { style = this.applyDefaultSymbolizer(style); // Get the node if it's already on the map. var node = this.nodeFactory(id, this.getNodeType(geometry, style)); - + // Set the data for the node, then draw it. node._featureId = featureId; node._boundsBottom = geometry.getBounds().bottom; @@ -42903,9 +42903,9 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { if(drawResult === false) { return false; } - + node = drawResult.node; - + // Insert the node into the indexer so it can show us where to // place it. Note that this operation is O(log(n)). If there's a // performance problem (when dragging, for instance) this is @@ -42920,39 +42920,39 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { } else { // if there's no indexer, simply append the node to root, // but only if the node is a new one - if (node.parentNode !== this.vectorRoot){ + if (node.parentNode !== this.vectorRoot){ this.vectorRoot.appendChild(node); } } - + this.postDraw(node); - + return drawResult.complete; }, - + /** * Method: redrawBackgroundNode * Redraws the node using special 'background' style properties. Basically - * just calls redrawNode(), but instead of directly using the - * 'externalGraphic', 'graphicXOffset', 'graphicYOffset', and - * 'graphicZIndex' properties directly from the specified 'style' - * parameter, we create a new style object and set those properties - * from the corresponding 'background'-prefixed properties from + * just calls redrawNode(), but instead of directly using the + * 'externalGraphic', 'graphicXOffset', 'graphicYOffset', and + * 'graphicZIndex' properties directly from the specified 'style' + * parameter, we create a new style object and set those properties + * from the corresponding 'background'-prefixed properties from * specified 'style' parameter. - * + * * Parameters: * id - {String} * geometry - {} * style - {Object} * featureId - {String} - * + * * Returns: * {Boolean} true if the complete geometry could be drawn, null if parts of * the geometry could not be drawn, false otherwise */ redrawBackgroundNode: function(id, geometry, style, featureId) { var backgroundStyle = OpenLayers.Util.extend({}, style); - + // Set regular style attributes to apply to the background styles. backgroundStyle.externalGraphic = backgroundStyle.backgroundGraphic; backgroundStyle.graphicXOffset = backgroundStyle.backgroundXOffset; @@ -42960,17 +42960,17 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { backgroundStyle.graphicZIndex = backgroundStyle.backgroundGraphicZIndex; backgroundStyle.graphicWidth = backgroundStyle.backgroundWidth || backgroundStyle.graphicWidth; backgroundStyle.graphicHeight = backgroundStyle.backgroundHeight || backgroundStyle.graphicHeight; - + // Erase background styles. backgroundStyle.backgroundGraphic = null; backgroundStyle.backgroundXOffset = null; backgroundStyle.backgroundYOffset = null; backgroundStyle.backgroundGraphicZIndex = null; - + return this.redrawNode( - id + this.BACKGROUND_ID_SUFFIX, - geometry, - backgroundStyle, + id + this.BACKGROUND_ID_SUFFIX, + geometry, + backgroundStyle, null ); }, @@ -42985,7 +42985,7 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { * node - {DOMElement} * geometry - {} * style - {Object} - * + * * Returns: * {Object} a hash with properties "node" (the drawn node) and "complete" * (null if parts of the geometry could not be drawn, false if nothing @@ -43028,7 +43028,7 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { break; } - node._options = options; + node._options = options; //set style //TBD simplify this @@ -43041,114 +43041,114 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { return false; } }, - + /** * Method: postDraw * Things that have do be done after the geometry node is appended * to its parent node. To be overridden by subclasses. - * + * * Parameters: * node - {DOMElement} */ postDraw: function(node) {}, - + /** * Method: drawPoint - * Virtual function for drawing Point Geometry. + * Virtual function for drawing Point Geometry. * Should be implemented by subclasses. * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * node - {DOMElement} * geometry - {} - * + * * Returns: * {DOMElement} or false if the renderer could not draw the point - */ + */ drawPoint: function(node, geometry) {}, /** * Method: drawLineString - * Virtual function for drawing LineString Geometry. + * Virtual function for drawing LineString Geometry. * Should be implemented by subclasses. * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * node - {DOMElement} * geometry - {} - * + * * Returns: * {DOMElement} or null if the renderer could not draw all components of * the linestring, or false if nothing could be drawn - */ + */ drawLineString: function(node, geometry) {}, /** * Method: drawLinearRing - * Virtual function for drawing LinearRing Geometry. + * Virtual function for drawing LinearRing Geometry. * Should be implemented by subclasses. * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * node - {DOMElement} * geometry - {} - * + * * Returns: * {DOMElement} or null if the renderer could not draw all components * of the linear ring, or false if nothing could be drawn - */ + */ drawLinearRing: function(node, geometry) {}, /** * Method: drawPolygon - * Virtual function for drawing Polygon Geometry. + * Virtual function for drawing Polygon Geometry. * Should be implemented by subclasses. * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * node - {DOMElement} * geometry - {} - * + * * Returns: * {DOMElement} or null if the renderer could not draw all components * of the polygon, or false if nothing could be drawn - */ + */ drawPolygon: function(node, geometry) {}, /** * Method: drawRectangle - * Virtual function for drawing Rectangle Geometry. + * Virtual function for drawing Rectangle Geometry. * Should be implemented by subclasses. * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * node - {DOMElement} * geometry - {} - * + * * Returns: * {DOMElement} or false if the renderer could not draw the rectangle - */ + */ drawRectangle: function(node, geometry) {}, /** * Method: drawCircle - * Virtual function for drawing Circle Geometry. + * Virtual function for drawing Circle Geometry. * Should be implemented by subclasses. * This method is only called by the renderer itself. - * - * Parameters: + * + * Parameters: * node - {DOMElement} * geometry - {} - * + * * Returns: * {DOMElement} or false if the renderer could not draw the circle - */ + */ drawCircle: function(node, geometry) {}, /** * Method: removeText * Removes a label - * + * * Parameters: * featureId - {String} */ @@ -43165,7 +43165,7 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { /** * Method: getFeatureIdFromEvent - * + * * Parameters: * evt - {Object} An object * @@ -43179,13 +43179,13 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { return node._featureId; }, - /** + /** * Method: eraseGeometry - * Erase a geometry from the renderer. In the case of a multi-geometry, - * we cycle through and recurse on ourselves. Otherwise, we look for a + * Erase a geometry from the renderer. In the case of a multi-geometry, + * we cycle through and recurse on ourselves. Otherwise, we look for a * node with the geometry.id, destroy its geometry, and remove it from * the DOM. - * + * * Parameters: * geometry - {} * featureId - {String} @@ -43198,7 +43198,7 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { for (var i=0, len=geometry.components.length; i} target renderer for the moved root */ @@ -43292,27 +43292,27 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { root.parentNode.removeChild(root); renderer.rendererRoot.appendChild(root); }, - + /** * Method: getRenderLayerId * Gets the layer that this renderer's output appears on. If moveRoot was * used, this will be different from the id of the layer containing the * features rendered by this renderer. - * + * * Returns: * {String} the id of the output layer. */ getRenderLayerId: function() { return this.root.parentNode.parentNode.id; }, - + /** * Method: isComplexSymbol * Determines if a symbol cannot be rendered using drawCircle - * + * * Parameters: * graphicName - {String} - * + * * Returns * {Boolean} true if the symbol is complex, false if not */ @@ -43339,11 +43339,11 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { /** * Class: OpenLayers.Control.ArgParser - * The ArgParser control adds location bar query string parsing functionality + * The ArgParser control adds location bar query string parsing functionality * to an OpenLayers Map. - * When added to a Map control, on a page load/refresh, the Map will - * automatically take the href string and parse it for lon, lat, zoom, and - * layers information. + * When added to a Map control, on a page load/refresh, the Map will + * automatically take the href string and parse it for lon, lat, zoom, and + * layers information. * * Inherits from: * - @@ -43355,7 +43355,7 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, { * {} */ center: null, - + /** * Property: zoom * {int} @@ -43364,14 +43364,14 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, { /** * Property: layers - * {String} Each character represents the state of the corresponding layer + * {String} Each character represents the state of the corresponding layer * on the map. */ layers: null, - - /** + + /** * APIProperty: displayProjection - * {} Requires proj4js support. + * {} Requires proj4js support. * Projection used when reading the coordinates from the URL. This will * reproject the map coordinates from the URL into the map's * projection. @@ -43379,9 +43379,9 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, { * If you are using this functionality, be aware that any permalink * which is added to the map will determine the coordinate type which * is read from the URL, which means you should not add permalinks with - * different displayProjections to the same map. + * different displayProjections to the same map. */ - displayProjection: null, + displayProjection: null, /** * Constructor: OpenLayers.Control.ArgParser @@ -43392,7 +43392,7 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, { /** * Method: getParameters - */ + */ getParameters: function(url) { url = url || window.location.href; var parameters = OpenLayers.Util.getParameters(url); @@ -43408,13 +43408,13 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, { } return parameters; }, - + /** * Method: setMap - * Set the map property for the control. - * + * Set the map property for the control. + * * Parameters: - * map - {} + * map - {} */ setMap: function(map) { OpenLayers.Control.prototype.setMap.apply(this, arguments); @@ -43424,14 +43424,14 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, { var control = this.map.controls[i]; if ( (control != this) && (control.CLASS_NAME == "OpenLayers.Control.ArgParser") ) { - - // If a second argparser is added to the map, then we + + // If a second argparser is added to the map, then we // override the displayProjection to be the one added to the - // map. + // map. if (control.displayProjection != this.displayProjection) { this.displayProjection = control.displayProjection; - } - + } + break; } } @@ -43441,9 +43441,9 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, { // Be careful to set layer first, to not trigger unnecessary layer loads if (args.layers) { this.layers = args.layers; - - // when we add a new layer, set its visibility - this.map.events.register('addlayer', this, + + // when we add a new layer, set its visibility + this.map.events.register('addlayer', this, this.configureLayers); this.configureLayers(); } @@ -43453,51 +43453,51 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, { if (args.zoom) { this.zoom = parseFloat(args.zoom); } - + // when we add a new baselayer to see when we can set the center - this.map.events.register('changebaselayer', this, + this.map.events.register('changebaselayer', this, this.setCenter); this.setCenter(); } } }, - - /** + + /** * Method: setCenter * As soon as a baseLayer has been loaded, we center and zoom * ...and remove the handler. */ setCenter: function() { - + if (this.map.baseLayer) { //dont need to listen for this one anymore - this.map.events.unregister('changebaselayer', this, + this.map.events.unregister('changebaselayer', this, this.setCenter); - + if (this.displayProjection) { - this.center.transform(this.displayProjection, - this.map.getProjectionObject()); - } + this.center.transform(this.displayProjection, + this.map.getProjectionObject()); + } this.map.setCenter(this.center, this.zoom); } }, - /** + /** * Method: configureLayers - * As soon as all the layers are loaded, cycle through them and - * hide or show them. + * As soon as all the layers are loaded, cycle through them and + * hide or show them. */ configureLayers: function() { - if (this.layers.length == this.map.layers.length) { + if (this.layers.length == this.map.layers.length) { this.map.events.unregister('addlayer', this, this.configureLayers); for(var i=0, len=this.layers.length; i */ OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, { - + /** * APIProperty: argParserClass * {Class} The ArgParser control class (not instance) to use with this @@ -43544,13 +43544,13 @@ OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, { */ argParserClass: OpenLayers.Control.ArgParser, - /** - * Property: element + /** + * Property: element * {DOMElement} */ element: null, - - /** + + /** * APIProperty: anchor * {Boolean} This option changes 3 things: * the character '#' is used in place of the character '?', @@ -43560,13 +43560,13 @@ OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, { */ anchor: false, - /** + /** * APIProperty: base * {String} */ base: '', - /** + /** * APIProperty: displayProjection * {} Requires proj4js support. Projection used * when creating the coordinates in the link. This will reproject the @@ -43574,16 +43574,16 @@ OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, { * functionality, the permalink which is last added to the map will * determine the coordinate type which is read from the URL, which * means you should not add permalinks with different - * displayProjections to the same map. + * displayProjections to the same map. */ - displayProjection: null, + displayProjection: null, /** * Constructor: OpenLayers.Control.Permalink * - * Parameters: - * element - {DOMElement} - * base - {String} + * Parameters: + * element - {DOMElement} + * base - {String} * options - {Object} options to the control. * * Or for anchor: @@ -43604,7 +43604,7 @@ OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, { this.base = base || document.location.href; } }, - + /** * APIMethod: destroy */ @@ -43617,15 +43617,15 @@ OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, { this.map.events.unregister('moveend', this, this.updateLink); } - OpenLayers.Control.prototype.destroy.apply(this, arguments); + OpenLayers.Control.prototype.destroy.apply(this, arguments); }, /** * Method: setMap - * Set the map property for the control. - * + * Set the map property for the control. + * * Parameters: - * map - {} + * map - {} */ setMap: function(map) { OpenLayers.Control.prototype.setMap.apply(this, arguments); @@ -43634,20 +43634,20 @@ OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, { for(var i=0, len=this.map.controls.length; i} center to encode in the permalink. * Defaults to the current map center. @@ -43718,55 +43718,55 @@ OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, { * current map zoom level. * layers - {Array()} layers to encode in the permalink. * Defaults to the current map layers. - * + * * Returns: * {Object} Hash of parameters that will be url-encoded into the * permalink. */ createParams: function(center, zoom, layers) { center = center || this.map.getCenter(); - + var params = OpenLayers.Util.getParameters(this.base); - - // If there's still no center, map is not initialized yet. + + // If there's still no center, map is not initialized yet. // Break out of this function, and simply return the params from the // base link. - if (center) { + if (center) { //zoom - params.zoom = zoom || this.map.getZoom(); + params.zoom = zoom || this.map.getZoom(); //lon,lat var lat = center.lat; var lon = center.lon; - + if (this.displayProjection) { var mapPosition = OpenLayers.Projection.transform( - { x: lon, y: lat }, - this.map.getProjectionObject(), + { x: lon, y: lat }, + this.map.getProjectionObject(), this.displayProjection ); - lon = mapPosition.x; - lat = mapPosition.y; - } + lon = mapPosition.x; + lat = mapPosition.y; + } params.lat = Math.round(lat*100000)/100000; params.lon = Math.round(lon*100000)/100000; - - //layers - layers = layers || this.map.layers; + + //layers + layers = layers || this.map.layers; params.layers = ''; for (var i=0, len=layers.length; i */ @@ -43812,9 +43812,9 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { /** * APIProperty: layername - * {String} The identifier for the as advertised by the service. - * For example, if the service advertises a with - * 'href="http://tms.osgeo.org/1.0.0/vmap0"', the property + * {String} The identifier for the as advertised by the service. + * For example, if the service advertises a with + * 'href="http://tms.osgeo.org/1.0.0/vmap0"', the property * would be set to "vmap0". */ layername: null, @@ -43822,8 +43822,8 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { /** * APIProperty: type * {String} The format extension corresponding to the requested tile image - * type. This is advertised in a element as the - * "extension" attribute. For example, if the service advertises a + * type. This is advertised in a element as the + * "extension" attribute. For example, if the service advertises a * with , * the property would be set to "jpg". */ @@ -43850,7 +43850,7 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { * "My Layer", * "http://tilecache.osgeo.org/wms-c/Basic.py/", * { - * layername: "basic", + * layername: "basic", * type: "png", * // set if different than the bottom left of map.maxExtent * tileOrigin: new OpenLayers.LonLat(-180, -90) @@ -43889,10 +43889,10 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { * of the server resolutions. */ zoomOffset: 0, - + /** * Constructor: OpenLayers.Layer.TMS - * + * * Parameters: * name - {String} Title to be displayed in a * url - {String} Service endpoint (without the version number). E.g. @@ -43904,7 +43904,7 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { var newArguments = []; newArguments.push(name, url, {}, options); OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); - }, + }, /** * APIMethod: clone @@ -43913,12 +43913,12 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { * Parameters: * obj - {Object} Should only be provided by subclasses that call this * method. - * + * * Returns: * {} An exact clone of this */ clone: function (obj) { - + if (obj == null) { obj = new OpenLayers.Layer.TMS(this.name, this.url, @@ -43931,17 +43931,17 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { // copy/set any non-init, non-simple values here return obj; - }, - + }, + /** * Method: getURL - * + * * Parameters: * bounds - {} - * + * * Returns: - * {String} A string with the layer's url and parameters and also the - * passed-in bounds and appropriate tile size specified as + * {String} A string with the layer's url and parameters and also the + * passed-in bounds and appropriate tile size specified as * parameters */ getURL: function (bounds) { @@ -43950,7 +43950,7 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { var x = Math.round((bounds.left - this.tileOrigin.lon) / (res * this.tileSize.w)); var y = Math.round((bounds.bottom - this.tileOrigin.lat) / (res * this.tileSize.h)); var z = this.getServerZoom(); - var path = this.serviceVersion + "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type; + var path = this.serviceVersion + "/" + this.layername + "/" + z + "/" + x + "/" + y + "." + this.type; var url = this.url; if (OpenLayers.Util.isArray(url)) { url = this.selectUrl(path, url); @@ -43958,20 +43958,20 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { return url + path; }, - /** + /** * Method: setMap - * When the layer is added to a map, then we can fetch our origin - * (if we don't have one.) - * + * When the layer is added to a map, then we can fetch our origin + * (if we don't have one.) + * * Parameters: * map - {} */ setMap: function(map) { OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments); - if (!this.tileOrigin) { + if (!this.tileOrigin) { this.tileOrigin = new OpenLayers.LonLat(this.map.maxExtent.left, this.map.maxExtent.bottom); - } + } }, CLASS_NAME: "OpenLayers.Layer.TMS" @@ -43992,12 +43992,12 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { /** * Class: OpenLayers.Format.WCSCapabilities * Read WCS Capabilities. - * + * * Inherits from: * - */ OpenLayers.Format.WCSCapabilities = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { - + /** * APIProperty: defaultVersion * {String} Version number to assume if none found. Default is "1.1.0". @@ -44015,16 +44015,16 @@ OpenLayers.Format.WCSCapabilities = OpenLayers.Class(OpenLayers.Format.XML.Versi /** * APIMethod: read - * Read capabilities data from a string, and return a list of coverages. - * - * Parameters: + * Read capabilities data from a string, and return a list of coverages. + * + * Parameters: * data - {String} or {DOMElement} data to read/parse. * * Returns: * {Array} List of named coverages. */ - - CLASS_NAME: "OpenLayers.Format.WCSCapabilities" + + CLASS_NAME: "OpenLayers.Format.WCSCapabilities" }); /* ====================================================================== @@ -44043,7 +44043,7 @@ OpenLayers.Format.WCSCapabilities = OpenLayers.Class(OpenLayers.Format.XML.Versi /** * Class: OpenLayers.Format.WCSCapabilities.v1 * Abstract class not to be instantiated directly. - * + * * Inherits from: * - */ @@ -44062,9 +44062,9 @@ OpenLayers.Format.WCSCapabilities.v1 = OpenLayers.Class( /** * APIMethod: read - * Read capabilities data from a string, and return a list of coverages. - * - * Parameters: + * Read capabilities data from a string, and return a list of coverages. + * + * Parameters: * data - {String} or {DOMElement} data to read/parse. * * Returns: @@ -44083,7 +44083,7 @@ OpenLayers.Format.WCSCapabilities.v1 = OpenLayers.Class( return capabilities; }, - CLASS_NAME: "OpenLayers.Format.WCSCapabilities.v1" + CLASS_NAME: "OpenLayers.Format.WCSCapabilities.v1" }); /* ====================================================================== @@ -44103,13 +44103,13 @@ OpenLayers.Format.WCSCapabilities.v1 = OpenLayers.Class( /** * Class: OpenLayers.Format.WCSCapabilities/v1_0_0 * Read WCS Capabilities version 1.0.0. - * + * * Inherits from: * - */ OpenLayers.Format.WCSCapabilities.v1_0_0 = OpenLayers.Class( OpenLayers.Format.WCSCapabilities.v1, { - + /** * Constructor: OpenLayers.Format.WCSCapabilities.v1_0_0 * Create a new parser for WCS capabilities version 1.0.0. @@ -44149,30 +44149,30 @@ OpenLayers.Format.WCSCapabilities.v1_0_0 = OpenLayers.Class( */ readers: { "wcs": { - "WCS_Capabilities": function(node, obj) { + "WCS_Capabilities": function(node, obj) { this.readChildNodes(node, obj); }, "Service": function(node, obj) { obj.service = {}; this.readChildNodes(node, obj.service); }, - "name": function(node, service) { + "name": function(node, service) { service.name = this.getChildValue(node); }, - "label": function(node, service) { + "label": function(node, service) { service.label = this.getChildValue(node); }, - "keywords": function(node, service) { - service.keywords = []; + "keywords": function(node, service) { + service.keywords = []; this.readChildNodes(node, service.keywords); }, - "keyword": function(node, keywords) { + "keyword": function(node, keywords) { // Append the keyword to the keywords list - keywords.push(this.getChildValue(node)); + keywords.push(this.getChildValue(node)); }, "responsibleParty": function(node, service) { service.responsibleParty = {}; - this.readChildNodes(node, service.responsibleParty); + this.readChildNodes(node, service.responsibleParty); }, "individualName": function(node, responsibleParty) { responsibleParty.individualName = this.getChildValue(node); @@ -44256,8 +44256,8 @@ OpenLayers.Format.WCSCapabilities.v1_0_0 = OpenLayers.Class( } } }, - - CLASS_NAME: "OpenLayers.Format.WCSCapabilities.v1_0_0" + + CLASS_NAME: "OpenLayers.Format.WCSCapabilities.v1_0_0" }); /* ====================================================================== @@ -44281,7 +44281,7 @@ OpenLayers.Format.WCSCapabilities.v1_0_0 = OpenLayers.Class( * - */ OpenLayers.Strategy.Fixed = OpenLayers.Class(OpenLayers.Strategy, { - + /** * APIProperty: preload * {Boolean} Load data before layer made visible. Enabling this may result @@ -44325,11 +44325,11 @@ OpenLayers.Strategy.Fixed = OpenLayers.Class(OpenLayers.Strategy, { } return activated; }, - + /** * Method: deactivate * Deactivate the strategy. Undo what is done in . - * + * * Returns: * {Boolean} The strategy was successfully deactivated. */ @@ -44421,7 +44421,7 @@ OpenLayers.Strategy.Fixed = OpenLayers.Class(OpenLayers.Strategy, { * - */ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, { - + /** * APIProperty: zoomInText * {String} @@ -44432,7 +44432,7 @@ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, { /** * APIProperty: zoomInId * {String} - * Instead of having the control create a zoom in link, you can provide + * Instead of having the control create a zoom in link, you can provide * the identifier for an anchor element already added to the document. * By default, an element with id "olZoomInLink" will be searched for * and used if it exists. @@ -44449,7 +44449,7 @@ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, { /** * APIProperty: zoomOutId * {String} - * Instead of having the control create a zoom out link, you can provide + * Instead of having the control create a zoom out link, you can provide * the identifier for an anchor element already added to the document. * By default, an element with id "olZoomOutLink" will be searched for * and used if it exists. @@ -44468,25 +44468,25 @@ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, { zoomIn = links.zoomIn, zoomOut = links.zoomOut, eventsInstance = this.map.events; - + if (zoomOut.parentNode !== div) { eventsInstance = this.events; eventsInstance.attachToElement(zoomOut.parentNode); } eventsInstance.register("buttonclick", this, this.onZoomClick); - + this.zoomInLink = zoomIn; this.zoomOutLink = zoomOut; return div; }, - + /** * Method: getOrCreateLinks - * + * * Parameters: * el - {DOMElement} * - * Return: + * Return: * {Object} Object with zoomIn and zoomOut properties referencing links. */ getOrCreateLinks: function(el) { @@ -44512,7 +44512,7 @@ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, { zoomIn: zoomIn, zoomOut: zoomOut }; }, - + /** * Method: onZoomClick * Called when zoomin/out link is clicked. @@ -44526,7 +44526,7 @@ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, { } }, - /** + /** * Method: destroy * Clean up. */ @@ -44560,10 +44560,10 @@ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, { * LineString feature for each pair of two points. * * Inherits from: - * - + * - */ OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, { - + /** * APIProperty: dataFrom * {} or @@ -44572,7 +44572,7 @@ OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, { * composed of, which one should it be? */ dataFrom: null, - + /** * APIProperty: styleFrom * {} or @@ -44581,7 +44581,7 @@ OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, { * which one should it be? */ styleFrom: null, - + /** * Constructor: OpenLayers.PointTrack * Constructor for a new OpenLayers.PointTrack instance. @@ -44590,18 +44590,18 @@ OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, { * name - {String} name of the layer * options - {Object} Optional object with properties to tag onto the * instance. - */ - + */ + /** * APIMethod: addNodes * Adds point features that will be used to create lines from, using point * pairs. The first point of a pair will be the source node, the second * will be the target node. - * + * * Parameters: * pointFeatures - {Array()} * options - {Object} - * + * * Supported options: * silent - {Boolean} true to suppress (before)feature(s)added events */ @@ -44610,21 +44610,21 @@ OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, { throw new Error("At least two point features have to be added to " + "create a line from"); } - + var lines = new Array(pointFeatures.length-1); - + var pointFeature, startPoint, endPoint; for(var i=0, len=pointFeatures.length; i 0) { var attributes = (this.dataFrom != null) ? (pointFeatures[i+this.dataFrom].data || @@ -44635,17 +44635,17 @@ OpenLayers.Layer.PointTrack = OpenLayers.Class(OpenLayers.Layer.Vector, { null; var line = new OpenLayers.Geometry.LineString([startPoint, endPoint]); - + lines[i-1] = new OpenLayers.Feature.Vector(line, attributes, style); } - + startPoint = endPoint; } this.addFeatures(lines, options); }, - + CLASS_NAME: "OpenLayers.Layer.PointTrack" }); @@ -44720,11 +44720,11 @@ OpenLayers.Protocol.WFS = function(options) { * the assumption that a WFS requests can be issued at the same URL as * WMS requests and that a WFS featureType exists with the same name as the * WMS layer. - * + * * This function is designed to auto-configure , , * and for WFS 1.1.0. Note that * srsName matching with the WMS layer will not work with WFS 1.0.0. - * + * * Parameters: * layer - {} WMS layer that has a matching WFS * FeatureType at the same server url with the same typename. @@ -44776,49 +44776,49 @@ OpenLayers.Protocol.WFS.DEFAULTS = { /** * Class: OpenLayers.Layer.Markers - * + * * Inherits from: - * - + * - */ OpenLayers.Layer.Markers = OpenLayers.Class(OpenLayers.Layer, { - - /** - * APIProperty: isBaseLayer - * {Boolean} Markers layer is never a base layer. + + /** + * APIProperty: isBaseLayer + * {Boolean} Markers layer is never a base layer. */ isBaseLayer: false, - - /** - * APIProperty: markers - * {Array()} internal marker list + + /** + * APIProperty: markers + * {Array()} internal marker list */ markers: null, - /** - * Property: drawn + /** + * Property: drawn * {Boolean} internal state of drawing. This is a workaround for the fact * that the map does not call moveTo with a zoomChanged when the map is * first starting up. This lets us catch the case where we have *never* * drawn the layer, and draw it even if the zoom hasn't changed. */ drawn: false, - + /** - * Constructor: OpenLayers.Layer.Markers + * Constructor: OpenLayers.Layer.Markers * Create a Markers layer. * * Parameters: - * name - {String} + * name - {String} * options - {Object} Hashtable of extra options to tag onto the layer */ initialize: function(name, options) { OpenLayers.Layer.prototype.initialize.apply(this, arguments); this.markers = []; }, - + /** - * APIMethod: destroy + * APIMethod: destroy */ destroy: function() { this.clearMarkers(); @@ -44829,7 +44829,7 @@ OpenLayers.Layer.Markers = OpenLayers.Class(OpenLayers.Layer, { /** * APIMethod: setOpacity * Sets the opacity for all the markers. - * + * * Parameters: * opacity - {Float} */ @@ -44842,13 +44842,13 @@ OpenLayers.Layer.Markers = OpenLayers.Class(OpenLayers.Layer, { } }, - /** + /** * Method: moveTo * * Parameters: - * bounds - {} - * zoomChanged - {Boolean} - * dragging - {Boolean} + * bounds - {} + * zoomChanged - {Boolean} + * dragging - {Boolean} */ moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.prototype.moveTo.apply(this, arguments); @@ -44865,7 +44865,7 @@ OpenLayers.Layer.Markers = OpenLayers.Class(OpenLayers.Layer, { * APIMethod: addMarker * * Parameters: - * marker - {} + * marker - {} */ addMarker: function(marker) { this.markers.push(marker); @@ -44884,7 +44884,7 @@ OpenLayers.Layer.Markers = OpenLayers.Class(OpenLayers.Layer, { * APIMethod: removeMarker * * Parameters: - * marker - {} + * marker - {} */ removeMarker: function(marker) { if (this.markers && this.markers.length) { @@ -44906,13 +44906,13 @@ OpenLayers.Layer.Markers = OpenLayers.Class(OpenLayers.Layer, { } }, - /** + /** * Method: drawMarker - * Calculate the pixel location for the marker, create it, and + * Calculate the pixel location for the marker, create it, and * add it to the layer's div * * Parameters: - * marker - {} + * marker - {} */ drawMarker: function(marker) { var px = this.map.getLayerPxFromLonLat(marker.lonlat); @@ -44927,17 +44927,17 @@ OpenLayers.Layer.Markers = OpenLayers.Class(OpenLayers.Layer, { } } }, - - /** + + /** * APIMethod: getDataExtent * Calculates the max extent which includes all of the markers. - * + * * Returns: * {} */ getDataExtent: function () { var maxExtent = null; - + if ( this.markers && (this.markers.length > 0)) { var maxExtent = new OpenLayers.Bounds(); for(var i=0, len=this.markers.length; i instead. */ slideFactor: 50, - /** + /** * APIProperty: slideRatio - * {Number} The fraction of map width/height by which we'll pan the map + * {Number} The fraction of map width/height by which we'll pan the map * on clicking the arrow buttons. Default is null. If set, will * override . E.g. if slideRatio is .5, then Pan Up will - * pan up half the map height. + * pan up half the map height. */ slideRatio: null, - /** + /** * Property: direction * {String} in {'North', 'South', 'East', 'West'} */ direction: null, /** - * Constructor: OpenLayers.Control.Pan + * Constructor: OpenLayers.Control.Pan * Control which handles the panning (in any of the cardinal directions) - * of the map by a set px distance. + * of the map by a set px distance. * * Parameters: * direction - {String} The direction this button should pan. @@ -45008,13 +45008,13 @@ OpenLayers.Control.Pan = OpenLayers.Class(OpenLayers.Control.Button, { * to extend the control. */ initialize: function(direction, options) { - + this.direction = direction; this.CLASS_NAME += this.direction; - + OpenLayers.Control.prototype.initialize.apply(this, [options]); }, - + /** * Method: trigger */ @@ -45025,21 +45025,21 @@ OpenLayers.Control.Pan = OpenLayers.Class(OpenLayers.Control.Button, { this.map.getSize()[dim] * this.slideRatio : this.slideFactor; }, this); - + switch (this.direction) { - case OpenLayers.Control.Pan.NORTH: + case OpenLayers.Control.Pan.NORTH: this.map.pan(0, -getSlideFactor("h")); break; - case OpenLayers.Control.Pan.SOUTH: + case OpenLayers.Control.Pan.SOUTH: this.map.pan(0, getSlideFactor("h")); break; - case OpenLayers.Control.Pan.WEST: + case OpenLayers.Control.Pan.WEST: this.map.pan(-getSlideFactor("w"), 0); break; - case OpenLayers.Control.Pan.EAST: + case OpenLayers.Control.Pan.EAST: this.map.pan(getSlideFactor("w"), 0); break; - } + } } }, @@ -45104,7 +45104,7 @@ OpenLayers.Format.CSWGetDomain.DEFAULTS = { /** * Class: OpenLayers.Format.CSWGetDomain.v2_0_2 - * A format for creating CSWGetDomain v2.0.2 transactions. + * A format for creating CSWGetDomain v2.0.2 transactions. * Create a new instance with the * constructor. * @@ -45112,7 +45112,7 @@ OpenLayers.Format.CSWGetDomain.DEFAULTS = { * - */ OpenLayers.Format.CSWGetDomain.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, { - + /** * Property: namespaces * {Object} Mapping of namespace aliases to namespace URIs. @@ -45128,13 +45128,13 @@ OpenLayers.Format.CSWGetDomain.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, * {String} The default prefix (used by Format.XML). */ defaultPrefix: "csw", - + /** * Property: version * {String} CSW version number. */ version: "2.0.2", - + /** * Property: schemaLocation * {String} http://www.opengis.net/cat/csw/2.0.2 @@ -45155,7 +45155,7 @@ OpenLayers.Format.CSWGetDomain.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, * writing a GetDomain document. */ ParameterName: null, - + /** * Constructor: OpenLayers.Format.CSWGetDomain.v2_0_2 * A class for parsing and generating CSWGetDomain v2.0.2 transactions. @@ -45174,7 +45174,7 @@ OpenLayers.Format.CSWGetDomain.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, * Parse the response from a GetDomain request. */ read: function(data) { - if(typeof data == "string") { + if(typeof data == "string") { data = OpenLayers.Format.XML.prototype.read.apply(this, [data]); } if(data && data.nodeType == 9) { @@ -45184,7 +45184,7 @@ OpenLayers.Format.CSWGetDomain.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, this.readNode(data, obj); return obj; }, - + /** * Property: readers * Contains public functions, grouped by namespace prefix, that will @@ -45268,10 +45268,10 @@ OpenLayers.Format.CSWGetDomain.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, } } }, - + /** * APIMethod: write - * Given an configuration js object, write a CSWGetDomain request. + * Given an configuration js object, write a CSWGetDomain request. * * Parameters: * options - {Object} A object mapping the request. @@ -45329,8 +45329,8 @@ OpenLayers.Format.CSWGetDomain.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, } } }, - - CLASS_NAME: "OpenLayers.Format.CSWGetDomain.v2_0_2" + + CLASS_NAME: "OpenLayers.Format.CSWGetDomain.v2_0_2" }); /* ====================================================================== OpenLayers/Format/ArcXML/Features.js @@ -45347,9 +45347,9 @@ OpenLayers.Format.CSWGetDomain.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML, /** * Class: OpenLayers.Format.ArcXML.Features - * Read/Write ArcXML features. Create a new instance with the + * Read/Write ArcXML features. Create a new instance with the * constructor. - * + * * Inherits from: * - */ @@ -45364,11 +45364,11 @@ OpenLayers.Format.ArcXML.Features = OpenLayers.Class(OpenLayers.Format.XML, { * options - {Object} An optional object whose properties will be set on * this instance. */ - + /** * APIMethod: read - * Read data from a string of ArcXML, and return a set of OpenLayers features. - * + * Read data from a string of ArcXML, and return a set of OpenLayers features. + * * Parameters: * data - {String} or {DOMElement} data to read/parse. * @@ -45378,7 +45378,7 @@ OpenLayers.Format.ArcXML.Features = OpenLayers.Class(OpenLayers.Format.XML, { read: function(data) { var axl = new OpenLayers.Format.ArcXML(); var parsed = axl.read(data); - + return parsed.features.feature; } }); @@ -45405,7 +45405,7 @@ OpenLayers.Format.ArcXML.Features = OpenLayers.Class(OpenLayers.Format.XML, { */ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { - /** + /** * APIProperty: events * {} Events instance for listeners and triggering * control specific events. @@ -45432,7 +45432,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { * unsnap - Triggered when a vertex is unsnapped. Listeners receive an * event with a *point* property. */ - + /** * CONSTANT: DEFAULTS * Default target properties. @@ -45443,47 +45443,47 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { edge: true, vertex: true }, - + /** * Property: greedy * {Boolean} Snap to closest feature in first layer with an eligible * feature. Default is true. */ greedy: true, - + /** * Property: precedence * {Array} List representing precedence of different snapping types. * Default is "node", "vertex", "edge". */ precedence: ["node", "vertex", "edge"], - + /** * Property: resolution * {Float} The map resolution for the previously considered snap. */ resolution: null, - + /** * Property: geoToleranceCache * {Object} A cache of geo-tolerances. Tolerance values (in map units) are * calculated when the map resolution changes. */ geoToleranceCache: null, - + /** * Property: layer * {} The current editable layer. Set at * construction or after construction with . */ layer: null, - + /** * Property: feature * {} The current editable feature. */ feature: null, - + /** * Property: point * {} The currently snapped vertex. @@ -45550,7 +45550,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { * used. * filter - {} Optional filter to evaluate to determine if * feature is eligible for snapping. If filter evaluates to true for a - * target feature a vertex may be snapped to the feature. + * target feature a vertex may be snapped to the feature. * minResolution - {Number} If a minResolution is provided, snapping to this * target will only be considered if the map resolution is greater than * or equal to this value (the minResolution is inclusive). Default is @@ -45563,7 +45563,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { initialize: function(options) { OpenLayers.Control.prototype.initialize.apply(this, [options]); this.options = options || {}; // TODO: this could be done by the super - + // set the editable layer if provided if(this.options.layer) { this.setLayer(this.options.layer); @@ -45578,7 +45578,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { this.geoToleranceCache = {}; }, - + /** * APIMethod: setLayer * Set the editable layer. Call the setLayer method if the editable layer @@ -45598,7 +45598,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { this.layer = layer; } }, - + /** * Method: setTargets * Set the targets for the snapping agent. @@ -45620,7 +45620,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { } } }, - + /** * Method: addTargetLayer * Add a target layer with the default target config. @@ -45631,7 +45631,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { addTargetLayer: function(layer) { this.addTarget({layer: layer}); }, - + /** * Method: addTarget * Add a configured target layer. @@ -45646,7 +45646,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { target.edgeTolerance = target.edgeTolerance || target.tolerance; this.targets.push(target); }, - + /** * Method: removeTargetLayer * Remove a target layer. @@ -45663,7 +45663,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { } } }, - + /** * Method: removeTarget * Remove a target. @@ -45677,7 +45677,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { removeTarget: function(target) { return OpenLayers.Util.removeItem(this.targets, target); }, - + /** * APIMethod: activate * Activate the control. Activating the control registers listeners for @@ -45698,7 +45698,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { } return activated; }, - + /** * APIMethod: deactivate * Deactivate the control. Deactivating the control unregisters listeners @@ -45720,7 +45720,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { this.point = null; return deactivated; }, - + /** * Method: onSketchModified * Registered as a listener for the sketchmodified event on the editable @@ -45733,7 +45733,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { this.feature = event.feature; this.considerSnapping(event.vertex, event.vertex); }, - + /** * Method: onVertexModified * Registered as a listener for the vertexmodified event on the editable @@ -45773,7 +45773,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { if(result) { if(this.greedy) { best = result; - best.target = target; + best.target = target; snapped = true; break; } else { @@ -45812,7 +45812,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { this.events.triggerEvent("unsnap", {point: point}); } }, - + /** * Method: testTarget * @@ -45904,13 +45904,13 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { } return eligible ? result : null; }, - + /** * Method: getGeoTolerance * Calculate a tolerance in map units given a tolerance in pixels. This * takes advantage of the when the map resolution * has not changed. - * + * * Parameters: * tolerance - {Number} A tolerance value in pixels. * resolution - {Number} Map resolution. @@ -45930,7 +45930,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, { } return geoTolerance; }, - + /** * Method: destroy * Clean up the control. @@ -45975,8 +45975,8 @@ OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo namespaces: { ows: "http://www.opengis.net/ows/1.1", xlink: "http://www.w3.org/1999/xlink" - }, - + }, + /** * Property: readers * Contains public functions, grouped by namespace prefix, that will @@ -46087,7 +46087,7 @@ OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo * - */ OpenLayers.Format.WCSGetCoverage = OpenLayers.Class(OpenLayers.Format.XML, { - + /** * Property: namespaces * {Object} Mapping of namespace aliases to namespace URIs. @@ -46146,7 +46146,7 @@ OpenLayers.Format.WCSGetCoverage = OpenLayers.Class(OpenLayers.Format.XML, { "xsi:schemaLocation", this.schemaLocation ); return OpenLayers.Format.XML.prototype.write.apply(this, [node]); - }, + }, /** * Property: writers @@ -46161,12 +46161,12 @@ OpenLayers.Format.WCSGetCoverage = OpenLayers.Class(OpenLayers.Format.XML, { attributes: { version: options.version || this.VERSION, service: 'WCS' - } - }); + } + }); this.writeNode("ows:Identifier", options.identifier, node); this.writeNode("wcs:DomainSubset", options.domainSubset, node); this.writeNode("wcs:Output", options.output, node); - return node; + return node; }, "DomainSubset": function(domainSubset) { var node = this.createElementNSPlus("wcs:DomainSubset", {}); @@ -46265,8 +46265,8 @@ OpenLayers.Format.WCSGetCoverage = OpenLayers.Class(OpenLayers.Format.XML, { }, "ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.writers.ows }, - - CLASS_NAME: "OpenLayers.Format.WCSGetCoverage" + + CLASS_NAME: "OpenLayers.Format.WCSGetCoverage" }); /* ====================================================================== @@ -46293,13 +46293,13 @@ OpenLayers.Format.WCSGetCoverage = OpenLayers.Class(OpenLayers.Format.XML, { /** * Class: OpenLayers.Format.KML * Read/Write KML. Create a new instance with the - * constructor. - * + * constructor. + * * Inherits from: * - */ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { - + /** * Property: namespaces * {Object} Mapping of namespace aliases to namespace URIs. @@ -46314,36 +46314,36 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { * {String} KML Namespace to use. Defaults to 2.0 namespace. */ kmlns: "http://earth.google.com/kml/2.0", - - /** + + /** * APIProperty: placemarksDesc * {String} Name of the placemarks. Default is "No description available". */ placemarksDesc: "No description available", - - /** + + /** * APIProperty: foldersName * {String} Name of the folders. Default is "OpenLayers export". * If set to null, no name element will be created. */ foldersName: "OpenLayers export", - - /** + + /** * APIProperty: foldersDesc * {String} Description of the folders. Default is "Exported on [date]." * If set to null, no description element will be created. */ foldersDesc: "Exported on " + new Date(), - + /** * APIProperty: extractAttributes * {Boolean} Extract attributes from KML. Default is true. * Extracting styleUrls requires this to be set to true - * Note that currently only Data and SimpleData + * Note that currently only Data and SimpleData * elements are handled. */ extractAttributes: true, - + /** * APIProperty: kvpAttributes * {Boolean} Only used if extractAttributes is true. @@ -46357,7 +46357,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { * Default is false. */ kvpAttributes: false, - + /** * Property: extractStyles * {Boolean} Extract styles from KML. Default is false. @@ -46365,7 +46365,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { * set to true */ extractStyles: false, - + /** * APIProperty: extractTracks * {Boolean} Extract gx:Track elements from Placemark elements. Default @@ -46377,36 +46377,36 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { * an altitude attribute with the third coordinate value. */ extractTracks: false, - + /** * APIProperty: trackAttributes - * {Array} If is true, points within gx:Track elements will + * {Array} If is true, points within gx:Track elements will * be parsed as features with when, heading, tilt, and roll attributes. * Any additional attribute names can be provided in . */ trackAttributes: null, - + /** * Property: internalns * {String} KML Namespace to use -- defaults to the namespace of the - * Placemark node being parsed, but falls back to kmlns. + * Placemark node being parsed, but falls back to kmlns. */ internalns: null, /** * Property: features * {Array} Array of features - * + * */ features: null, /** * Property: styles * {Object} Storage of style objects - * + * */ styles: null, - + /** * Property: styleBaseUrl * {String} @@ -46422,7 +46422,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { /** * APIProperty: maxDepth - * {Integer} Maximum depth for recursive loading external KML URLs + * {Integer} Maximum depth for recursive loading external KML URLs * Defaults to 0: do no external fetching */ maxDepth: 0, @@ -46454,9 +46454,9 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { /** * APIMethod: read - * Read data from a string, and return a list of features. - * - * Parameters: + * Read data from a string, and return a list of features. + * + * Parameters: * data - {String} or {DOMElement} data to read/parse. * * Returns: @@ -46467,7 +46467,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { this.styles = {}; this.fetched = {}; - // Set default options + // Set default options var options = { depth: 0, styleBaseUrl: this.styleBaseUrl @@ -46478,9 +46478,9 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { /** * Method: parseData - * Read data from a string, and return a list of features. - * - * Parameters: + * Read data from a string, and return a list of features. + * + * Parameters: * data - {String} or {DOMElement} data to read/parse. * options - {Object} Hash of options * @@ -46493,7 +46493,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { } // Loop throught the following node types in this order and - // process the nodes found + // process the nodes found var types = ["Link", "NetworkLink", "Style", "StyleMap", "Placemark"]; for(var i=0, len=types.length; i and // Don't do anything if we have reached our maximum depth for recursion if (options.depth >= this.maxDepth) { @@ -46564,7 +46564,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { if (data) { this.parseData(data, newOptions); } - } + } } }, @@ -46572,10 +46572,10 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { /** * Method: fetchLink * Fetches a URL and returns the result - * - * Parameters: + * + * Parameters: * href - {String} url to be fetched - * + * */ fetchLink: function(href) { var request = OpenLayers.Request.GET({url: href, async: false}); @@ -46587,18 +46587,18 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { /** * Method: parseStyles * Parses