From 42ab34fdda7eb085f234afab200d2e0554537d1c Mon Sep 17 00:00:00 2001 From: crschmidt Date: Wed, 19 Sep 2007 11:44:22 +0000 Subject: [PATCH] Tag 2.5-RC2. git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.5-rc2@4391 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- build/license.txt | 4 +- examples/proxy.cgi | 59 +++++--- lib/OpenLayers.js | 4 +- lib/OpenLayers/Ajax.js | 4 +- lib/OpenLayers/BaseTypes.js | 33 +++-- lib/OpenLayers/BaseTypes/Bounds.js | 88 +++++------ lib/OpenLayers/BaseTypes/Class.js | 4 +- lib/OpenLayers/BaseTypes/Element.js | 4 +- lib/OpenLayers/BaseTypes/LonLat.js | 4 +- lib/OpenLayers/BaseTypes/Pixel.js | 4 +- lib/OpenLayers/BaseTypes/Size.js | 4 +- lib/OpenLayers/Console.js | 4 +- lib/OpenLayers/Control.js | 6 +- lib/OpenLayers/Control/ArgParser.js | 4 +- lib/OpenLayers/Control/Attribution.js | 4 +- lib/OpenLayers/Control/DragFeature.js | 42 +++--- lib/OpenLayers/Control/DragPan.js | 4 +- lib/OpenLayers/Control/DrawFeature.js | 4 +- lib/OpenLayers/Control/EditingToolbar.js | 4 +- lib/OpenLayers/Control/KeyboardDefaults.js | 4 +- lib/OpenLayers/Control/LayerSwitcher.js | 4 +- lib/OpenLayers/Control/ModifyFeature.js | 10 +- lib/OpenLayers/Control/MouseDefaults.js | 4 +- lib/OpenLayers/Control/MousePosition.js | 4 +- lib/OpenLayers/Control/MouseToolbar.js | 4 +- lib/OpenLayers/Control/NavToolbar.js | 4 +- lib/OpenLayers/Control/Navigation.js | 4 +- lib/OpenLayers/Control/OverviewMap.js | 6 +- lib/OpenLayers/Control/PanZoom.js | 28 +++- lib/OpenLayers/Control/PanZoomBar.js | 4 +- lib/OpenLayers/Control/Panel.js | 4 +- lib/OpenLayers/Control/Permalink.js | 4 +- lib/OpenLayers/Control/Scale.js | 4 +- lib/OpenLayers/Control/SelectFeature.js | 4 +- lib/OpenLayers/Control/ZoomBox.js | 4 +- lib/OpenLayers/Control/ZoomToMaxExtent.js | 4 +- lib/OpenLayers/Events.js | 4 +- lib/OpenLayers/Feature.js | 4 +- lib/OpenLayers/Feature/Vector.js | 4 +- lib/OpenLayers/Feature/WFS.js | 4 +- lib/OpenLayers/Format.js | 4 +- lib/OpenLayers/Format/GML.js | 11 +- lib/OpenLayers/Format/GeoJSON.js | 11 +- lib/OpenLayers/Format/GeoRSS.js | 9 +- lib/OpenLayers/Format/JSON.js | 4 +- lib/OpenLayers/Format/KML.js | 12 +- lib/OpenLayers/Format/WFS.js | 4 +- lib/OpenLayers/Format/WKT.js | 9 +- lib/OpenLayers/Format/XML.js | 4 +- lib/OpenLayers/Geometry.js | 4 +- lib/OpenLayers/Geometry/Collection.js | 4 +- lib/OpenLayers/Geometry/Curve.js | 4 +- lib/OpenLayers/Geometry/LineString.js | 4 +- lib/OpenLayers/Geometry/LinearRing.js | 4 +- lib/OpenLayers/Geometry/MultiLineString.js | 4 +- lib/OpenLayers/Geometry/MultiPoint.js | 4 +- lib/OpenLayers/Geometry/MultiPolygon.js | 4 +- lib/OpenLayers/Geometry/Point.js | 4 +- lib/OpenLayers/Geometry/Polygon.js | 4 +- lib/OpenLayers/Geometry/Rectangle.js | 4 +- lib/OpenLayers/Geometry/Surface.js | 4 +- lib/OpenLayers/Handler.js | 4 +- lib/OpenLayers/Handler/Box.js | 4 +- lib/OpenLayers/Handler/Drag.js | 13 +- lib/OpenLayers/Handler/Feature.js | 4 +- lib/OpenLayers/Handler/Keyboard.js | 4 +- lib/OpenLayers/Handler/MouseWheel.js | 4 +- lib/OpenLayers/Handler/Path.js | 4 +- lib/OpenLayers/Handler/Point.js | 4 +- lib/OpenLayers/Handler/Polygon.js | 4 +- lib/OpenLayers/Handler/RegularPolygon.js | 6 +- lib/OpenLayers/Icon.js | 4 +- lib/OpenLayers/Layer.js | 26 ++-- lib/OpenLayers/Layer/Boxes.js | 4 +- lib/OpenLayers/Layer/EventPane.js | 4 +- lib/OpenLayers/Layer/FixedZoomLevels.js | 4 +- lib/OpenLayers/Layer/GML.js | 4 +- lib/OpenLayers/Layer/GeoRSS.js | 4 +- lib/OpenLayers/Layer/Google.js | 18 +-- lib/OpenLayers/Layer/Grid.js | 4 +- lib/OpenLayers/Layer/HTTPRequest.js | 4 +- lib/OpenLayers/Layer/Image.js | 6 +- lib/OpenLayers/Layer/KaMap.js | 4 +- lib/OpenLayers/Layer/MapServer.js | 4 +- lib/OpenLayers/Layer/MapServer/Untiled.js | 4 +- lib/OpenLayers/Layer/Markers.js | 4 +- lib/OpenLayers/Layer/MultiMap.js | 4 +- lib/OpenLayers/Layer/TMS.js | 4 +- lib/OpenLayers/Layer/Text.js | 4 +- lib/OpenLayers/Layer/TileCache.js | 4 +- lib/OpenLayers/Layer/Vector.js | 4 +- lib/OpenLayers/Layer/VirtualEarth.js | 4 +- lib/OpenLayers/Layer/WFS.js | 4 +- lib/OpenLayers/Layer/WMS.js | 4 +- lib/OpenLayers/Layer/WMS/Untiled.js | 4 +- lib/OpenLayers/Layer/WorldWind.js | 4 +- lib/OpenLayers/Layer/Yahoo.js | 4 +- lib/OpenLayers/Map.js | 6 +- lib/OpenLayers/Marker.js | 4 +- lib/OpenLayers/Marker/Box.js | 4 +- lib/OpenLayers/Popup.js | 4 +- lib/OpenLayers/Popup/Anchored.js | 4 +- lib/OpenLayers/Popup/AnchoredBubble.js | 4 +- lib/OpenLayers/Renderer.js | 4 +- lib/OpenLayers/Renderer/Elements.js | 4 +- lib/OpenLayers/Renderer/SVG.js | 4 +- lib/OpenLayers/Renderer/VML.js | 4 +- lib/OpenLayers/SingleFile.js | 4 +- lib/OpenLayers/Tile.js | 4 +- lib/OpenLayers/Tile/Image.js | 4 +- lib/OpenLayers/Tile/WFS.js | 4 +- lib/OpenLayers/Util.js | 4 +- repository-license.txt | 35 ----- tests/Control/test_OverviewMap.html | 22 ++- tests/Handler/test_Drag.html | 37 ++--- tests/Layer/test_GeoRSS.html | 24 +-- tests/Layer/test_Grid.html | 28 +++- tests/Layer/test_Image.html | 4 +- tests/Layer/test_KaMap.html | 22 ++- tests/Layer/test_TMS.html | 21 ++- tests/Layer/test_Text.html | 2 +- tests/Layer/test_TileCache.html | 20 ++- tests/Layer/test_Vector.html | 164 ++++++++++----------- tests/Layer/test_WrapDateLine.html | 18 +-- tests/test_Layer.html | 4 +- 125 files changed, 630 insertions(+), 542 deletions(-) delete mode 100644 repository-license.txt diff --git a/build/license.txt b/build/license.txt index 369af6a5a6..91f00da32d 100644 --- a/build/license.txt +++ b/build/license.txt @@ -2,8 +2,8 @@ OpenLayers.js -- OpenLayers Map Viewer Library - Copyright 2005-2007 MetaCarta, Inc., released under a modified BSD license. - Please see http://svn.openlayers.org/trunk/openlayers/repository-license.txt + Copyright 2005-2007 MetaCarta, Inc., released under the BSD license. + Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt for the full text of the license. Includes compressed code under the following licenses: diff --git a/examples/proxy.cgi b/examples/proxy.cgi index fca4766c4f..8743894a97 100755 --- a/examples/proxy.cgi +++ b/examples/proxy.cgi @@ -6,22 +6,31 @@ restrictions that prevent the Javascript from loading pages not on the same server as the Javascript. This has several problems: it's less efficient, it might break some sites, and it's a security risk because people can use this proxy to browse the web and possibly do bad stuff -with it. If you can get your code signed (see: -http://trac.openlayers.org/wiki/HowToSignJavascript), then you should -modify Parameters.js so that this isn't used. Otherwise, you're stuck with it. It only loads pages via http and https, but it can load any -content type. XML and HTML are both currently used by Openlayers.""" +content type. It supports GET and POST requests.""" -import urllib +import urllib2 import cgi - -fs = cgi.FieldStorage() -url = fs.getvalue('url', "http://openlayers.org") +import sys, os # Designed to prevent Open Proxy type stuff. -allowedHosts = ['www.openlayers.org', 'openlayers.org', 'octo.metacarta.com', 'merrimack.metacarta.com', 'labs.metacarta.com', 'world.freemap.in', - 'prototype.openmnnd.org'] +allowedHosts = ['www.openlayers.org', 'openlayers.org', + 'labs.metacarta.com', 'world.freemap.in', + 'prototype.openmnnd.org', 'geo.openplans.org'] + +method = os.environ["REQUEST_METHOD"] + +if method == "POST": + qs = os.environ["QUERY_STRING"] + d = cgi.parse_qs(qs) + if d.has_key("url"): + url = d["url"][0] + else: + url = "http://www.openlayers.org" +else: + fs = cgi.FieldStorage() + url = fs.getvalue('url', "http://www.openlayers.org") try: host = url.split("/")[2] @@ -30,24 +39,36 @@ try: print "Content-Type: text/plain" print print "This proxy does not allow you to access that location." - + print + print os.environ + elif url.startswith("http://") or url.startswith("https://"): - y = urllib.urlopen(url) + if method == "POST": + length = int(os.environ["CONTENT_LENGTH"]) + headers = {"Content-Type": os.environ["CONTENT_TYPE"]} + body = sys.stdin.read(length) + r = urllib2.Request(url, body, headers) + y = urllib2.urlopen(r) + else: + y = urllib2.urlopen(url) - headers = str(y.info()).split('\n') - for h in headers: - if h.startswith("Content-Type:"): - print h + # print content type header + i = y.info() + if i.has_key("Content-Type"): + print "Content-Type: %s" % (i["Content-Type"]) + else: + print "Content-Type: text/plain" print print y.read() y.close() else: - print """Content-Type: text/plain - -Illegal request.""" + print "Content-Type: text/plain" + print + print "Illegal request." + except Exception, E: print "Status: 500 Unexpected Error" print "Content-Type: text/plain" diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js index cdc53dd9db..75ae432b4d 100644 --- a/lib/OpenLayers.js +++ b/lib/OpenLayers.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /* diff --git a/lib/OpenLayers/Ajax.js b/lib/OpenLayers/Ajax.js index d0ab1dec24..d2663c2dab 100644 --- a/lib/OpenLayers/Ajax.js +++ b/lib/OpenLayers/Ajax.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index c3450afbb9..3aa86247e6 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -1,8 +1,15 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** + * @requires OpenLayers/BaseTypes/Class.js + * @requires OpenLayers/BaseTypes/LonLat.js + * @requires OpenLayers/BaseTypes/Size.js + * @requires OpenLayers/BaseTypes/Pixel.js + * @requires OpenLayers/BaseTypes/Bounds.js + * @requires OpenLayers/BaseTypes/Element.js + * * Header: OpenLayers Base Types * OpenLayers custom string, number and function functions are described here. */ @@ -16,7 +23,7 @@ OpenLayers.String = { /** * APIMethod: OpenLayers.String.startsWith - * Whether or not a string starts with another string. + * Test whether a string starts with another string. * * Parameters: * str - {String} The string to test. @@ -31,7 +38,7 @@ OpenLayers.String = { /** * APIMethod: OpenLayers.String.contains - * Whether or not a string contains another string. + * Test whether a string contains another string. * * Parameters: * str - {String} The string to test. @@ -53,7 +60,7 @@ OpenLayers.String = { * modified. * * Returns: - * {String} A trimmed version of the string - all leading and + * {String} A trimmed version of the string with all leading and * trailing spaces removed. */ trim: function(str) { @@ -86,7 +93,7 @@ OpenLayers.String = { if (!String.prototype.startsWith) { /** * APIMethod: String.startsWith - * Deprecated. Whether or not a string starts with another string. + * *Deprecated*. Whether or not a string starts with another string. * * Parameters: * sStart - {Sring} The string we're testing for. @@ -106,7 +113,7 @@ if (!String.prototype.startsWith) { if (!String.prototype.contains) { /** * APIMethod: String.contains - * Deprecated. Whether or not a string contains another string. + * *Deprecated*. Whether or not a string contains another string. * * Parameters: * str - {String} The string that we're testing for. @@ -126,7 +133,7 @@ if (!String.prototype.contains) { if (!String.prototype.trim) { /** * APIMethod: String.trim - * Deprecated. Removes leading and trailing whitespace characters from a string. + * *Deprecated*. Removes leading and trailing whitespace characters from a string. * * Returns: * {String} A trimmed version of the string - all leading and @@ -143,8 +150,8 @@ if (!String.prototype.trim) { if (!String.prototype.camelize) { /** - * APIMethod: camelize - * Deprecated. Camel-case a hyphenated string. + * APIMethod: String.camelize + * *Deprecated*. Camel-case a hyphenated string. * Ex. "chicken-head" becomes "chickenHead", and * "-chicken-head" becomes "ChickenHead". * @@ -193,7 +200,7 @@ OpenLayers.Number = { if (!Number.prototype.limitSigDigs) { /** * APIMethod: Number.limitSigDigs - * Deprecated. Limit the number of significant digits on an integer. Does *not* + * *Deprecated*. Limit the number of significant digits on an integer. Does *not* * work with floats! * * Parameters: @@ -266,7 +273,7 @@ OpenLayers.Function = { if (!Function.prototype.bind) { /** * APIMethod: Function.bind - * Deprecated. Bind a function to an object. + * *Deprecated*. Bind a function to an object. * Method to easily create closures with 'this' altered. * * Parameters: @@ -290,7 +297,7 @@ if (!Function.prototype.bind) { if (!Function.prototype.bindAsEventListener) { /** * APIMethod: Function.bindAsEventListener - * Deprecated. Bind a function to an object, and configure it to receive the + * *Deprecated*. Bind a function to an object, and configure it to receive the * event object as first parameter when called. * * Parameters: diff --git a/lib/OpenLayers/BaseTypes/Bounds.js b/lib/OpenLayers/BaseTypes/Bounds.js index 511e97868a..0388cad9e1 100644 --- a/lib/OpenLayers/BaseTypes/Bounds.js +++ b/lib/OpenLayers/BaseTypes/Bounds.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** @@ -7,12 +7,12 @@ * 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: - * * > bounds = new OpenLayers.Bounds(); * > bounds.extend(new OpenLayers.LonLat(4,5)); * > bounds.extend(new OpenLayers.LonLat(5,6)); - * > bounds.toBBOX() // returns 4,5,5,6 + * > bounds.toBBOX(); // returns 4,5,5,6 */ OpenLayers.Bounds = OpenLayers.Class({ @@ -81,13 +81,13 @@ OpenLayers.Bounds = OpenLayers.Class({ /** * Method: equals - * Test a two bounds for equivalence + * Test a two bounds for equivalence. * * Parameters: * bounds - {} * * Returns: - * {Boolean} The passed-in OpenLayers.Bounds object has the same left, + * {Boolean} The passed-in bounds object has the same left, * right, top, bottom components as this. Note that if bounds * passed in is null, returns false. */ @@ -106,7 +106,7 @@ OpenLayers.Bounds = OpenLayers.Class({ * APIMethod: toString * * Returns: - * {String} String representation of OpenLayers.Bounds object. + * {String} String representation of bounds object. * (ex."left-bottom=(5,42) right-top=(10,45)") */ toString:function() { @@ -132,7 +132,7 @@ OpenLayers.Bounds = OpenLayers.Class({ * Default is 6 * * Returns: - * {String} Simple String representation of OpenLayers.Bounds object. + * {String} Simple String representation of bounds object. * (ex. "5,42,10,45") */ toBBOX:function(decimal) { @@ -162,7 +162,7 @@ OpenLayers.Bounds = OpenLayers.Class({ * APIMethod: getHeight * * Returns: - * {Float} The height of the bounds + * {Float} The height of the bounds (top minus bottom). */ getHeight:function() { return (this.top - this.bottom); @@ -172,7 +172,7 @@ OpenLayers.Bounds = OpenLayers.Class({ * APIMethod: getSize * * Returns: - * {} An which represents the size of the box + * {} The size of the box. */ getSize:function() { return new OpenLayers.Size(this.getWidth(), this.getHeight()); @@ -182,8 +182,7 @@ OpenLayers.Bounds = OpenLayers.Class({ * APIMethod: getCenterPixel * * Returns: - * {} An which represents the center - * of the bounds + * {} The center of the bounds in pixel space. */ getCenterPixel:function() { return new OpenLayers.Pixel( (this.left + this.right) / 2, @@ -194,8 +193,7 @@ OpenLayers.Bounds = OpenLayers.Class({ * APIMethod: getCenterLonLat * * Returns: - * {} An which represents the center - * of the bounds + * {} The center of the bounds in map space. */ getCenterLonLat:function() { return new OpenLayers.LonLat( (this.left + this.right) / 2, @@ -210,9 +208,8 @@ OpenLayers.Bounds = OpenLayers.Class({ * y - {Float} * * Returns: - * {} A new whose coordinates are - * the same as this, but shifted by the passed-in - * x and y values + * {} A new bounds whose coordinates are the same as + * this, but shifted by the passed-in x and y values. */ add:function(x, y) { if ( (x == null) || (y == null) ) { @@ -227,8 +224,7 @@ OpenLayers.Bounds = OpenLayers.Class({ /** * APIMethod: extend * Extend the bounds to include the point, lonlat, or bounds specified. - * Note: This function assumes that left} - * inclusive - {Boolean} Whether or not to include the border. - * Default is true. + * inclusive - {Boolean} Whether or not to include the border. + * Default is true. * * Returns: - * {Boolean} Whether or not the passed-in lonlat is within this bounds. + * {Boolean} The passed-in lonlat is within this bounds. */ containsLonLat:function(ll, inclusive) { return this.contains(ll.lon, ll.lat, inclusive); @@ -288,11 +284,11 @@ OpenLayers.Bounds = OpenLayers.Class({ * * Parameters: * px - {} - * inclusive - {Boolean} Whether or not to include the border. - * Default is true. + * inclusive - {Boolean} Whether or not to include the border. Default is + * true. * * Returns: - * {Boolean} Whether or not the passed-in pixel is within this bounds. + * {Boolean} The passed-in pixel is within this bounds. */ containsPixel:function(px, inclusive) { return this.contains(px.x, px.y, inclusive); @@ -304,12 +300,12 @@ OpenLayers.Bounds = OpenLayers.Class({ * Parameters: * x - {Float} * y - {Float} - * inclusive - {Boolean} Whether or not to include the border. - * Default is true. + * inclusive - {Boolean} Whether or not to include the border. Default is + * true. * * Returns: * {Boolean} Whether or not the passed-in coordinates are within this - * bounds. + * bounds. */ contains:function(x, y, inclusive) { @@ -334,13 +330,13 @@ OpenLayers.Bounds = OpenLayers.Class({ * * Parameters: * bounds - {} - * inclusive - {} Whether or not to include the border. - * Default is true. + * inclusive - {} Whether or not to include the border. Default + * is true. * * Returns: - * {Boolean} Whether or not the passed-in OpenLayers.Bounds object - * intersects this bounds. Simple math just check if either - * contains the other, allowing for partial. + * {Boolean} The passed-in OpenLayers.Bounds object intersects this bounds. + * Simple math just check if either contains the other, allowing for + * partial. */ intersectsBounds:function(bounds, inclusive) { @@ -369,16 +365,14 @@ OpenLayers.Bounds = OpenLayers.Class({ * APIMethod: containsBounds * * bounds - {} - * partial - {} If true, only part of passed-in - * needs be within this bounds. - * If false, the entire passed-in bounds must be - * within. Default is false - * inclusive - {} Whether or not to include the border. - * Default is true. + * partial - {} If true, only part of passed-in bounds needs be + * within this bounds. If false, the entire passed-in bounds must be + * within. Default is false + * inclusive - {} Whether or not to include the border. Default is + * true. * * Returns: - * {Boolean} Whether or not the passed-in OpenLayers.Bounds object is - * contained within this bounds. + * {Boolean} The passed-in bounds object is contained within this bounds. */ containsBounds:function(bounds, partial, inclusive) { @@ -418,8 +412,8 @@ OpenLayers.Bounds = OpenLayers.Class({ * lonlat - {} * * Returns: - * {String} The quadrant ("br" "tr" "tl" "bl") of the bounds in which - * the coordinate lies. + * {String} The quadrant ("br" "tr" "tl" "bl") of the bounds in which the + * coordinate lies. */ determineQuadrant: function(lonlat) { @@ -495,7 +489,7 @@ OpenLayers.Bounds = OpenLayers.Class({ * str - {String}Comma-separated bounds string. (ex. "5,42,10,45") * * Returns: - * {} New object built from the + * {} New bounds object built from the * passed-in String. */ OpenLayers.Bounds.fromString = function(str) { @@ -512,8 +506,7 @@ OpenLayers.Bounds.fromString = function(str) { * bbox - {Array(Float)} Array of bounds values (ex. [5,42,10,45]) * * Returns: - * {} New object built from the - * passed-in Array. + * {} New bounds object built from the passed-in Array. */ OpenLayers.Bounds.fromArray = function(bbox) { return new OpenLayers.Bounds(parseFloat(bbox[0]), @@ -531,8 +524,7 @@ OpenLayers.Bounds.fromArray = function(bbox) { * size - {} * * Returns: - * {} New object built from the - * passed-in size. + * {} New bounds object built from the passed-in size. */ OpenLayers.Bounds.fromSize = function(size) { return new OpenLayers.Bounds(0, diff --git a/lib/OpenLayers/BaseTypes/Class.js b/lib/OpenLayers/BaseTypes/Class.js index 664bbfb0b0..98df0209b3 100644 --- a/lib/OpenLayers/BaseTypes/Class.js +++ b/lib/OpenLayers/BaseTypes/Class.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/BaseTypes/Element.js b/lib/OpenLayers/BaseTypes/Element.js index de12e41448..0ab2b429f6 100644 --- a/lib/OpenLayers/BaseTypes/Element.js +++ b/lib/OpenLayers/BaseTypes/Element.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/BaseTypes/LonLat.js b/lib/OpenLayers/BaseTypes/LonLat.js index f881d65ee3..922e7a9ae0 100644 --- a/lib/OpenLayers/BaseTypes/LonLat.js +++ b/lib/OpenLayers/BaseTypes/LonLat.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/BaseTypes/Pixel.js b/lib/OpenLayers/BaseTypes/Pixel.js index 028e16a959..05af7df866 100644 --- a/lib/OpenLayers/BaseTypes/Pixel.js +++ b/lib/OpenLayers/BaseTypes/Pixel.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/BaseTypes/Size.js b/lib/OpenLayers/BaseTypes/Size.js index 9ff11a3d07..4f3dde956f 100644 --- a/lib/OpenLayers/BaseTypes/Size.js +++ b/lib/OpenLayers/BaseTypes/Size.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Console.js b/lib/OpenLayers/Console.js index e59419fc9d..e7903913d3 100644 --- a/lib/OpenLayers/Console.js +++ b/lib/OpenLayers/Console.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Control.js b/lib/OpenLayers/Control.js index 03eb8f00fd..1db8d57f66 100644 --- a/lib/OpenLayers/Control.js +++ b/lib/OpenLayers/Control.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** @@ -93,7 +93,7 @@ OpenLayers.Control = OpenLayers.Class({ /** * Property: handler - * { null + * {} null */ handler: null, diff --git a/lib/OpenLayers/Control/ArgParser.js b/lib/OpenLayers/Control/ArgParser.js index a0261c7dd2..93eff5ab76 100644 --- a/lib/OpenLayers/Control/ArgParser.js +++ b/lib/OpenLayers/Control/ArgParser.js @@ -1,5 +1,5 @@ -/* Cpyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Cpyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Control/Attribution.js b/lib/OpenLayers/Control/Attribution.js index fa686ac327..3cd23a18ae 100644 --- a/lib/OpenLayers/Control/Attribution.js +++ b/lib/OpenLayers/Control/Attribution.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Control/DragFeature.js b/lib/OpenLayers/Control/DragFeature.js index 9728cac155..e5373cbbf8 100644 --- a/lib/OpenLayers/Control/DragFeature.js +++ b/lib/OpenLayers/Control/DragFeature.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ @@ -31,9 +31,9 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * that is about to be dragged and the pixel location of the mouse. * * Parameters: - * feature - {OpenLayers.Feature.Vector} The feature that is about to be + * feature - {} The feature that is about to be * dragged. - * pixel - {OpenLayers.Pixel} The pixel location of the mouse. + * pixel - {} The pixel location of the mouse. */ onStart: function(feature, pixel) {}, @@ -44,8 +44,8 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * feature that is being dragged and the pixel location of the mouse. * * Parameters: - * feature - {OpenLayers.Feature.Vector} The feature that was dragged. - * pixel - {OpenLayers.Pixel} The pixel location of the mouse. + * feature - {} The feature that was dragged. + * pixel - {} The pixel location of the mouse. */ onDrag: function(feature, pixel) {}, @@ -57,26 +57,26 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * mouse. * * Parameters: - * feature - {OpenLayers.Feature.Vector} The feature that was dragged. - * pixel - {OpenLayers.Pixel} The pixel location of the mouse. + * feature - {} The feature that was dragged. + * pixel - {} The pixel location of the mouse. */ onComplete: function(feature, pixel) {}, /** * Property: layer - * {OpenLayers.Layer.Vector} + * {} */ layer: null, /** * Property: feature - * {OpenLayers.Feature.Vector} + * {} */ feature: null, /** * Property: dragHandler - * {OpenLayers.Handler.Drag} + * {} */ dragHandler: null, @@ -88,7 +88,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { /** * Property: featureHandler - * {OpenLayers.Handler.Feature} + * {} */ featureHandler: null, @@ -100,7 +100,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { /** * Property: lastPixel - * {OpenLayers.Pixel} + * {} */ lastPixel: null, @@ -109,7 +109,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * Create a new control to drag features. * * Parameters: - * layer - {OpenLayers.Layer.Vector} The layer containing features to be + * layer - {} The layer containing features to be * dragged. * options - {Object} Optional object whose properties will be set on the * control. @@ -179,7 +179,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * This activates the drag handler. * * Parameters: - * feature - {OpenLayers.Feature.Vector} The selected feature. + * feature - {} The selected feature. */ overFeature: function(feature) { if(!this.dragHandler.dragging) { @@ -202,7 +202,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * Called when the drag handler detects a mouse-down. * * Parameters: - * pixel - {OpenLayers.Pixel} Location of the mouse event. + * pixel - {} Location of the mouse event. */ downFeature: function(pixel) { this.lastPixel = pixel; @@ -215,7 +215,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * optional onDrag method. * * Parameters: - * pixel - {OpenLayers.Pixel} Location of the mouse event. + * pixel - {} Location of the mouse event. */ moveFeature: function(pixel) { var res = this.map.getResolution(); @@ -232,7 +232,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * optional onComplete method. * * Parameters: - * pixel - {OpenLayers.Pixel} Location of the mouse event. + * pixel - {} Location of the mouse event. */ upFeature: function(pixel) { if(!this.over) { @@ -248,7 +248,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * Called when the drag handler is done dragging. * * Parameters: - * pixel - {OpenLayers.Pixel} The last event pixel location. If this event + * pixel - {} The last event pixel location. If this event * came from a mouseout, this may not be in the map viewport. */ doneDragging: function(pixel) { @@ -260,7 +260,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * Called when the feature handler detects a mouse-out on a feature. * * Parameters: - * feature - {OpenLayers.Feature.Vector} The feature that the mouse left. + * feature - {} The feature that the mouse left. */ outFeature: function(feature) { if(!this.dragHandler.dragging) { @@ -290,7 +290,7 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, { * Set the map property for the control and all handlers. * * Parameters: - * map - {OpenLayers.Map} The control's map. + * map - {} The control's map. */ setMap: function(map) { this.dragHandler.setMap(map); diff --git a/lib/OpenLayers/Control/DragPan.js b/lib/OpenLayers/Control/DragPan.js index 66499d9729..56916d7940 100644 --- a/lib/OpenLayers/Control/DragPan.js +++ b/lib/OpenLayers/Control/DragPan.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Control/DrawFeature.js b/lib/OpenLayers/Control/DrawFeature.js index 9743235170..0ae947184e 100644 --- a/lib/OpenLayers/Control/DrawFeature.js +++ b/lib/OpenLayers/Control/DrawFeature.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Control/EditingToolbar.js b/lib/OpenLayers/Control/EditingToolbar.js index aa8b1f5c07..5c9ab534ff 100644 --- a/lib/OpenLayers/Control/EditingToolbar.js +++ b/lib/OpenLayers/Control/EditingToolbar.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Control/KeyboardDefaults.js b/lib/OpenLayers/Control/KeyboardDefaults.js index 8480e6aaed..4805afefbe 100644 --- a/lib/OpenLayers/Control/KeyboardDefaults.js +++ b/lib/OpenLayers/Control/KeyboardDefaults.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Control/LayerSwitcher.js b/lib/OpenLayers/Control/LayerSwitcher.js index 32363f94db..08cc42ffd2 100644 --- a/lib/OpenLayers/Control/LayerSwitcher.js +++ b/lib/OpenLayers/Control/LayerSwitcher.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Control/ModifyFeature.js b/lib/OpenLayers/Control/ModifyFeature.js index 963dceb4ad..9fa1471545 100644 --- a/lib/OpenLayers/Control/ModifyFeature.js +++ b/lib/OpenLayers/Control/ModifyFeature.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ @@ -30,7 +30,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { /** * Property: layer - * {OpenLayers.Layer.Vector} + * {} */ layer: null, @@ -116,7 +116,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * Create a new modify feature control. * * Parameters: - * layer - {OpenLayers.Layer.Vector} Layer that contains features that + * layer - {} Layer that contains features that * will be modified. * options - {Object} Optional object whose properties will be set on the * control. @@ -450,7 +450,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * Set the map property for the control and all handlers. * * Parameters: - * map - {OpenLayers.Map} The control's map. + * map - {} The control's map. */ setMap: function(map) { this.selectControl.setMap(map); diff --git a/lib/OpenLayers/Control/MouseDefaults.js b/lib/OpenLayers/Control/MouseDefaults.js index 4429af89b3..02dc943480 100644 --- a/lib/OpenLayers/Control/MouseDefaults.js +++ b/lib/OpenLayers/Control/MouseDefaults.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Control/MousePosition.js b/lib/OpenLayers/Control/MousePosition.js index d7e310f0ec..d6fc82fca1 100644 --- a/lib/OpenLayers/Control/MousePosition.js +++ b/lib/OpenLayers/Control/MousePosition.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Control/MouseToolbar.js b/lib/OpenLayers/Control/MouseToolbar.js index 47bff32d34..5ad3b36954 100644 --- a/lib/OpenLayers/Control/MouseToolbar.js +++ b/lib/OpenLayers/Control/MouseToolbar.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Control/NavToolbar.js b/lib/OpenLayers/Control/NavToolbar.js index 3f27416903..b2d3fef457 100644 --- a/lib/OpenLayers/Control/NavToolbar.js +++ b/lib/OpenLayers/Control/NavToolbar.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Control/Navigation.js b/lib/OpenLayers/Control/Navigation.js index 2aa6668420..b2502d8822 100644 --- a/lib/OpenLayers/Control/Navigation.js +++ b/lib/OpenLayers/Control/Navigation.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Control/OverviewMap.js b/lib/OpenLayers/Control/OverviewMap.js index 9cfead4ad0..383a28fdb8 100644 --- a/lib/OpenLayers/Control/OverviewMap.js +++ b/lib/OpenLayers/Control/OverviewMap.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** @@ -53,7 +53,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, { /** * APIProperty: minRatio - * {Numver} The ratio of the overview map resolution to the main map + * {Float} The ratio of the overview map resolution to the main map * resolution at which to zoom farther out on the overview map. */ minRatio: 8, diff --git a/lib/OpenLayers/Control/PanZoom.js b/lib/OpenLayers/Control/PanZoom.js index 6beeb28e8a..6fbcf71916 100644 --- a/lib/OpenLayers/Control/PanZoom.js +++ b/lib/OpenLayers/Control/PanZoom.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ @@ -15,13 +15,13 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { /** * APIProperty: slideFactor - * {Float} + * {Integer} */ slideFactor: 50, /** * Property: buttons - * Array of Button Divs + * {Array(DOMElement)} Array of Button Divs */ buttons: null, @@ -32,9 +32,12 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { position: null, /** - * Constructor: OpenLayers.PanZoom + * Constructor: OpenLayers.Control.PanZoom + * + * Parameters: + * options - {Object} */ - initialize: function() { + initialize: function(options) { this.position = new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X, OpenLayers.Control.PanZoom.Y); OpenLayers.Control.prototype.initialize.apply(this, arguments); @@ -61,7 +64,7 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { * px - {} * * Returns: - * {DOMElement} A reference to the container div for the PanZoom control + * {DOMElement} A reference to the container div for the PanZoom control. */ draw: function(px) { // initialize our internal div @@ -100,7 +103,7 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { * * Returns: * {DOMElement} A Div (an alphaImageDiv, to be precise) that contains the - * image of the button, and has all the proper event handlers set. + * image of the button, and has all the proper event handlers set. */ _addButton:function(id, img, xy, sz) { var imgLocation = OpenLayers.Util.getImagesLocation() + img; @@ -179,5 +182,14 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, { CLASS_NAME: "OpenLayers.Control.PanZoom" }); +/** + * Constant: X + * {Integer} + */ OpenLayers.Control.PanZoom.X = 4; + +/** + * Constant: Y + * {Integer} + */ OpenLayers.Control.PanZoom.Y = 4; diff --git a/lib/OpenLayers/Control/PanZoomBar.js b/lib/OpenLayers/Control/PanZoomBar.js index 987e2c16a8..f6ea803d71 100644 --- a/lib/OpenLayers/Control/PanZoomBar.js +++ b/lib/OpenLayers/Control/PanZoomBar.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Control/Panel.js b/lib/OpenLayers/Control/Panel.js index d62599636a..2e20139383 100644 --- a/lib/OpenLayers/Control/Panel.js +++ b/lib/OpenLayers/Control/Panel.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Control/Permalink.js b/lib/OpenLayers/Control/Permalink.js index 0a372f8205..e019eb8d7a 100644 --- a/lib/OpenLayers/Control/Permalink.js +++ b/lib/OpenLayers/Control/Permalink.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Control/Scale.js b/lib/OpenLayers/Control/Scale.js index 857e83d75c..db5de57617 100644 --- a/lib/OpenLayers/Control/Scale.js +++ b/lib/OpenLayers/Control/Scale.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Control/SelectFeature.js b/lib/OpenLayers/Control/SelectFeature.js index c711cfc899..284de14dae 100644 --- a/lib/OpenLayers/Control/SelectFeature.js +++ b/lib/OpenLayers/Control/SelectFeature.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Control/ZoomBox.js b/lib/OpenLayers/Control/ZoomBox.js index 0b5b55f0b1..cbb20c49c9 100644 --- a/lib/OpenLayers/Control/ZoomBox.js +++ b/lib/OpenLayers/Control/ZoomBox.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Control/ZoomToMaxExtent.js b/lib/OpenLayers/Control/ZoomToMaxExtent.js index ff67bead07..e52269db75 100644 --- a/lib/OpenLayers/Control/ZoomToMaxExtent.js +++ b/lib/OpenLayers/Control/ZoomToMaxExtent.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Events.js b/lib/OpenLayers/Events.js index d4c4a620da..ed6b9890dc 100644 --- a/lib/OpenLayers/Events.js +++ b/lib/OpenLayers/Events.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Feature.js b/lib/OpenLayers/Feature.js index 2004a45591..9f6ef35a01 100644 --- a/lib/OpenLayers/Feature.js +++ b/lib/OpenLayers/Feature.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Feature/Vector.js b/lib/OpenLayers/Feature/Vector.js index dec6a753da..942cd5ad4c 100644 --- a/lib/OpenLayers/Feature/Vector.js +++ b/lib/OpenLayers/Feature/Vector.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ // TRASH THIS diff --git a/lib/OpenLayers/Feature/WFS.js b/lib/OpenLayers/Feature/WFS.js index b2b974e32e..eda89da53b 100644 --- a/lib/OpenLayers/Feature/WFS.js +++ b/lib/OpenLayers/Feature/WFS.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Format.js b/lib/OpenLayers/Format.js index 2339aa11f7..b02a935d81 100644 --- a/lib/OpenLayers/Format.js +++ b/lib/OpenLayers/Format.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Format/GML.js b/lib/OpenLayers/Format/GML.js index 926bfb7d5c..302491f727 100644 --- a/lib/OpenLayers/Format/GML.js +++ b/lib/OpenLayers/Format/GML.js @@ -1,11 +1,16 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** * @requires OpenLayers/Format/XML.js * @requires OpenLayers/Feature/Vector.js - * @requires OpenLayers/Geometry.js + * @requires OpenLayers/Geometry/Point.js + * @requires OpenLayers/Geometry/MultiPoint.js + * @requires OpenLayers/Geometry/LineString.js + * @requires OpenLayers/Geometry/MultiLineString.js + * @requires OpenLayers/Geometry/Polygon.js + * @requires OpenLayers/Geometry/MultiPolygon.js * * Class: OpenLayers.Format.GML * Read/Wite GML. Create a new instance with the diff --git a/lib/OpenLayers/Format/GeoJSON.js b/lib/OpenLayers/Format/GeoJSON.js index 3574305a33..2d61f5628c 100644 --- a/lib/OpenLayers/Format/GeoJSON.js +++ b/lib/OpenLayers/Format/GeoJSON.js @@ -1,9 +1,16 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** * @requires OpenLayers/Format/JSON.js + * @requires OpenLayers/Feature/Vector.js + * @requires OpenLayers/Geometry/Point.js + * @requires OpenLayers/Geometry/MultiPoint.js + * @requires OpenLayers/Geometry/LineString.js + * @requires OpenLayers/Geometry/MultiLineString.js + * @requires OpenLayers/Geometry/Polygon.js + * @requires OpenLayers/Geometry/MultiPolygon.js * * Class: OpenLayers.Format.GeoJSON * Read and write GeoJSON. Create a new parser with the diff --git a/lib/OpenLayers/Format/GeoRSS.js b/lib/OpenLayers/Format/GeoRSS.js index 039d138c69..22d1a74f03 100644 --- a/lib/OpenLayers/Format/GeoRSS.js +++ b/lib/OpenLayers/Format/GeoRSS.js @@ -1,10 +1,13 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** - * @requires OpenLayers/Format.js * @requires OpenLayers/Format/XML.js + * @requires OpenLayers/Feature/Vector.js + * @requires OpenLayers/Geometry/Point.js + * @requires OpenLayers/Geometry/LineString.js + * @requires OpenLayers/Geometry/Polygon.js * * Class: OpenLayers.Format.GeoRSS * Read/write GeoRSS parser. Create a new instance with the diff --git a/lib/OpenLayers/Format/JSON.js b/lib/OpenLayers/Format/JSON.js index c9f2011e58..171b08625b 100644 --- a/lib/OpenLayers/Format/JSON.js +++ b/lib/OpenLayers/Format/JSON.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Format/KML.js b/lib/OpenLayers/Format/KML.js index 48b35fb1bb..82c4e6215a 100644 --- a/lib/OpenLayers/Format/KML.js +++ b/lib/OpenLayers/Format/KML.js @@ -1,10 +1,14 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** - * @requires OpenLayers/Format.js + * @requires OpenLayers/Format/XML.js * @requires OpenLayers/Feature/Vector.js + * @requires OpenLayers/Geometry/Point.js + * @requires OpenLayers/Geometry/LineString.js + * @requires OpenLayers/Geometry/Polygon.js + * @requires OpenLayers/Geometry/Collection.js * * Class: OpenLayers.Format.KML * Read/Wite KML. Create a new instance with the @@ -279,7 +283,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, { * node - {DOMElement} A KML MultiGeometry node. * * Returns: - * {} A geometry collection. + * {} A geometry collection. */ multigeometry: function(node) { var child, parser; diff --git a/lib/OpenLayers/Format/WFS.js b/lib/OpenLayers/Format/WFS.js index 6b86c206e4..43ef4733e0 100644 --- a/lib/OpenLayers/Format/WFS.js +++ b/lib/OpenLayers/Format/WFS.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Format/WKT.js b/lib/OpenLayers/Format/WKT.js index 2e7979357e..854fa5c8d1 100644 --- a/lib/OpenLayers/Format/WKT.js +++ b/lib/OpenLayers/Format/WKT.js @@ -1,9 +1,10 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** * @requires OpenLayers/Format.js + * @requires OpenLayers/Feature/Vector.js * * Class: OpenLayers.Format.WKT * Class for reading and writing Well-Known Text. Create a new instance @@ -38,8 +39,8 @@ OpenLayers.Format.WKT = OpenLayers.Class(OpenLayers.Format, { /** * Method: read - * Deserialize a WKT string and return an OpenLayers.Feature.Vector or an - * array of OpenLayers.Feature.Vector. Supports WKT for POINT, MULTIPOINT, + * Deserialize a WKT string and return a vector feature or an + * array of vector features. Supports WKT for POINT, MULTIPOINT, * LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, and * GEOMETRYCOLLECTION. * diff --git a/lib/OpenLayers/Format/XML.js b/lib/OpenLayers/Format/XML.js index 44920e06a8..4e8edba257 100644 --- a/lib/OpenLayers/Format/XML.js +++ b/lib/OpenLayers/Format/XML.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry.js b/lib/OpenLayers/Geometry.js index 481c3e2da5..8ac4e58fb0 100644 --- a/lib/OpenLayers/Geometry.js +++ b/lib/OpenLayers/Geometry.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/Collection.js b/lib/OpenLayers/Geometry/Collection.js index 8c1c589695..d3c7e1fae0 100644 --- a/lib/OpenLayers/Geometry/Collection.js +++ b/lib/OpenLayers/Geometry/Collection.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/Curve.js b/lib/OpenLayers/Geometry/Curve.js index 5a618031f2..10daeb2302 100644 --- a/lib/OpenLayers/Geometry/Curve.js +++ b/lib/OpenLayers/Geometry/Curve.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/LineString.js b/lib/OpenLayers/Geometry/LineString.js index 0c3ebcf064..91170f78d1 100644 --- a/lib/OpenLayers/Geometry/LineString.js +++ b/lib/OpenLayers/Geometry/LineString.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/LinearRing.js b/lib/OpenLayers/Geometry/LinearRing.js index 081c0c3eb2..b0b7d31bc5 100644 --- a/lib/OpenLayers/Geometry/LinearRing.js +++ b/lib/OpenLayers/Geometry/LinearRing.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/MultiLineString.js b/lib/OpenLayers/Geometry/MultiLineString.js index 77bdffc089..2c47fc9955 100644 --- a/lib/OpenLayers/Geometry/MultiLineString.js +++ b/lib/OpenLayers/Geometry/MultiLineString.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/MultiPoint.js b/lib/OpenLayers/Geometry/MultiPoint.js index 4c851343db..b90a4ab43b 100644 --- a/lib/OpenLayers/Geometry/MultiPoint.js +++ b/lib/OpenLayers/Geometry/MultiPoint.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/MultiPolygon.js b/lib/OpenLayers/Geometry/MultiPolygon.js index 8eb27f556b..9d9012b38a 100644 --- a/lib/OpenLayers/Geometry/MultiPolygon.js +++ b/lib/OpenLayers/Geometry/MultiPolygon.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/Point.js b/lib/OpenLayers/Geometry/Point.js index 9950fa2ba2..565b254be5 100644 --- a/lib/OpenLayers/Geometry/Point.js +++ b/lib/OpenLayers/Geometry/Point.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/Polygon.js b/lib/OpenLayers/Geometry/Polygon.js index 3599c8a353..60d304045c 100644 --- a/lib/OpenLayers/Geometry/Polygon.js +++ b/lib/OpenLayers/Geometry/Polygon.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/Rectangle.js b/lib/OpenLayers/Geometry/Rectangle.js index dbf02b31ab..23f4242edc 100644 --- a/lib/OpenLayers/Geometry/Rectangle.js +++ b/lib/OpenLayers/Geometry/Rectangle.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Geometry/Surface.js b/lib/OpenLayers/Geometry/Surface.js index 269491a5a5..fb5f08ce2a 100644 --- a/lib/OpenLayers/Geometry/Surface.js +++ b/lib/OpenLayers/Geometry/Surface.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Handler.js b/lib/OpenLayers/Handler.js index a0176b6d45..6d34f26a9a 100644 --- a/lib/OpenLayers/Handler.js +++ b/lib/OpenLayers/Handler.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Handler/Box.js b/lib/OpenLayers/Handler/Box.js index f334c8d09a..64b4db15d4 100644 --- a/lib/OpenLayers/Handler/Box.js +++ b/lib/OpenLayers/Handler/Box.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Handler/Drag.js b/lib/OpenLayers/Handler/Drag.js index 9e1c875550..7890edc065 100644 --- a/lib/OpenLayers/Handler/Drag.js +++ b/lib/OpenLayers/Handler/Drag.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** @@ -253,13 +253,8 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, { * {Boolean} Let the event propagate. */ click: function (evt) { - // throw away the first left click event that happens after a mouse up - if (this.dragging) { - this.dragging = false; - return false; - } - this.started = false; - return true; + // let the click event propagate only if the mouse moved + return (this.start == this.last); }, /** diff --git a/lib/OpenLayers/Handler/Feature.js b/lib/OpenLayers/Handler/Feature.js index ed952e7e57..5975e29191 100644 --- a/lib/OpenLayers/Handler/Feature.js +++ b/lib/OpenLayers/Handler/Feature.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Handler/Keyboard.js b/lib/OpenLayers/Handler/Keyboard.js index 3e39551de2..7ff48a7a72 100644 --- a/lib/OpenLayers/Handler/Keyboard.js +++ b/lib/OpenLayers/Handler/Keyboard.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Handler/MouseWheel.js b/lib/OpenLayers/Handler/MouseWheel.js index 20b9d9d713..8d1c5746a8 100644 --- a/lib/OpenLayers/Handler/MouseWheel.js +++ b/lib/OpenLayers/Handler/MouseWheel.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Handler/Path.js b/lib/OpenLayers/Handler/Path.js index 50f6f6eee1..1c2565d315 100644 --- a/lib/OpenLayers/Handler/Path.js +++ b/lib/OpenLayers/Handler/Path.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Handler/Point.js b/lib/OpenLayers/Handler/Point.js index f74a86c6bd..be85732ceb 100644 --- a/lib/OpenLayers/Handler/Point.js +++ b/lib/OpenLayers/Handler/Point.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Handler/Polygon.js b/lib/OpenLayers/Handler/Polygon.js index 5d72dabdfd..9e28490c87 100644 --- a/lib/OpenLayers/Handler/Polygon.js +++ b/lib/OpenLayers/Handler/Polygon.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Handler/RegularPolygon.js b/lib/OpenLayers/Handler/RegularPolygon.js index e45b74f218..e708dc1299 100644 --- a/lib/OpenLayers/Handler/RegularPolygon.js +++ b/lib/OpenLayers/Handler/RegularPolygon.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ @@ -284,7 +284,7 @@ OpenLayers.Handler.RegularPolygon = OpenLayers.Class(OpenLayers.Handler.Drag, { * Calculate the angle based on settings. * * Parameters: - * point - {OpenLayers.Geometry.Point} + * point - {} * evt - {Event} */ calculateAngle: function(point, evt) { diff --git a/lib/OpenLayers/Icon.js b/lib/OpenLayers/Icon.js index 6fbc0ca149..48b03cdf7f 100644 --- a/lib/OpenLayers/Icon.js +++ b/lib/OpenLayers/Icon.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index 42ec6a38ba..93e62fbb8c 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ @@ -736,8 +736,7 @@ OpenLayers.Layer = OpenLayers.Class({ * {Integer} The index of the zoomLevel (entry in the resolutions array) * that still contains the passed-in extent. We do this by calculating * the ideal resolution for the given exteng (based on the map size) - * and then find the smallest resolution that is greater than this - * ideal resolution. + * and then find the closest resolution to this ideal resolution. */ getZoomForExtent: function(extent) { var viewSize = this.map.getSize(); @@ -761,23 +760,28 @@ OpenLayers.Layer = OpenLayers.Class({ /** * APIMethod: getZoomForResolution + * Get the index for the closest resolution in the layers resolutions array. * * Parameters: - * resolution - {Float} + * resolution - {Float} Map units per pixel. * * Returns: * {Integer} The index of the zoomLevel (entry in the resolutions array) - * that is the smallest resolution that is greater than the passed-in - * resolution. + * that is the closest to the passed-in resolution. */ getZoomForResolution: function(resolution) { - - for(var i=1; i < this.resolutions.length; i++) { - if ( this.resolutions[i] < resolution) { + var zoom, diff; + var minDiff = Number.POSITIVE_INFINITY; + for(var i=0; i < this.resolutions.length; i++) { + diff = Math.abs(this.resolutions[i] - resolution); + if(diff < minDiff) { + zoom = i; + minDiff = diff; + } else if(diff > minDiff) { break; } } - return (i - 1); + return zoom; }, /** diff --git a/lib/OpenLayers/Layer/Boxes.js b/lib/OpenLayers/Layer/Boxes.js index 98d6a75d0a..34e3c4213a 100644 --- a/lib/OpenLayers/Layer/Boxes.js +++ b/lib/OpenLayers/Layer/Boxes.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/EventPane.js b/lib/OpenLayers/Layer/EventPane.js index 893205f5d6..1eacd4aa08 100644 --- a/lib/OpenLayers/Layer/EventPane.js +++ b/lib/OpenLayers/Layer/EventPane.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/FixedZoomLevels.js b/lib/OpenLayers/Layer/FixedZoomLevels.js index 2900aaea36..32fce575f3 100644 --- a/lib/OpenLayers/Layer/FixedZoomLevels.js +++ b/lib/OpenLayers/Layer/FixedZoomLevels.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Layer/GML.js b/lib/OpenLayers/Layer/GML.js index a86614ac86..3be33eb3cd 100644 --- a/lib/OpenLayers/Layer/GML.js +++ b/lib/OpenLayers/Layer/GML.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Layer/GeoRSS.js b/lib/OpenLayers/Layer/GeoRSS.js index fb3ba5e20c..534aa4a63a 100644 --- a/lib/OpenLayers/Layer/GeoRSS.js +++ b/lib/OpenLayers/Layer/GeoRSS.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/Google.js b/lib/OpenLayers/Layer/Google.js index 6359696f8f..a7d315210f 100644 --- a/lib/OpenLayers/Layer/Google.js +++ b/lib/OpenLayers/Layer/Google.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ @@ -264,18 +264,18 @@ OpenLayers.Layer.Google = OpenLayers.Class( * {GPoint} A GPoint specifying gLatLng translated into "Container" coords */ addContainerPxFunction: function() { - if (typeof GMap2 != "undefined" && !GMap2.fromLatLngToContainerPixel) { + if ( (typeof GMap2 != "undefined") && + !GMap2.prototype.fromLatLngToContainerPixel) { GMap2.prototype.fromLatLngToContainerPixel = function(gLatLng) { // first we translate into "DivPixel" - var gPoint = this.fromLatLngToDivPixel(gLatLng); + var gPoint = this.fromLatLngToDivPixel(gLatLng); - // locate the sliding "Div" div - // it seems like "b" is the main div - var div = this.b.firstChild.firstChild; - - // adjust by the offset of "Div" and voila! + // locate the sliding "Div" div + var div = this.getContainer().firstChild.firstChild; + + // adjust by the offset of "Div" and voila! gPoint.x += div.offsetLeft; gPoint.y += div.offsetTop; diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 1eb7b93021..a966aea7ea 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/HTTPRequest.js b/lib/OpenLayers/Layer/HTTPRequest.js index d12e0df98d..b45e7b67a2 100644 --- a/lib/OpenLayers/Layer/HTTPRequest.js +++ b/lib/OpenLayers/Layer/HTTPRequest.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/Image.js b/lib/OpenLayers/Layer/Image.js index 31b1890756..4d7d58b6a9 100644 --- a/lib/OpenLayers/Layer/Image.js +++ b/lib/OpenLayers/Layer/Image.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** @@ -186,7 +186,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { */ setUrl: function(newUrl) { this.url = newUrl; - this.draw(); + this.tile.draw(); }, /** diff --git a/lib/OpenLayers/Layer/KaMap.js b/lib/OpenLayers/Layer/KaMap.js index 9f9a8d6dc6..455195f648 100644 --- a/lib/OpenLayers/Layer/KaMap.js +++ b/lib/OpenLayers/Layer/KaMap.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/MapServer.js b/lib/OpenLayers/Layer/MapServer.js index 27492810be..cc1dc022d8 100644 --- a/lib/OpenLayers/Layer/MapServer.js +++ b/lib/OpenLayers/Layer/MapServer.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Layer/MapServer/Untiled.js b/lib/OpenLayers/Layer/MapServer/Untiled.js index 886c9e4101..4393c68cb8 100644 --- a/lib/OpenLayers/Layer/MapServer/Untiled.js +++ b/lib/OpenLayers/Layer/MapServer/Untiled.js @@ -1,5 +1,5 @@ -/* Copyright 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/Markers.js b/lib/OpenLayers/Layer/Markers.js index c5c891271e..006f7fbcfd 100644 --- a/lib/OpenLayers/Layer/Markers.js +++ b/lib/OpenLayers/Layer/Markers.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/MultiMap.js b/lib/OpenLayers/Layer/MultiMap.js index 87c42ea931..66c00ab48d 100644 --- a/lib/OpenLayers/Layer/MultiMap.js +++ b/lib/OpenLayers/Layer/MultiMap.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Layer/TMS.js b/lib/OpenLayers/Layer/TMS.js index 437bfd79b5..dab3d7b5bf 100644 --- a/lib/OpenLayers/Layer/TMS.js +++ b/lib/OpenLayers/Layer/TMS.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD licence. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD licence. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/Text.js b/lib/OpenLayers/Layer/Text.js index 9c62590369..ca89ac9e73 100644 --- a/lib/OpenLayers/Layer/Text.js +++ b/lib/OpenLayers/Layer/Text.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/TileCache.js b/lib/OpenLayers/Layer/TileCache.js index f5ca846b1d..4d24107b0b 100644 --- a/lib/OpenLayers/Layer/TileCache.js +++ b/lib/OpenLayers/Layer/TileCache.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD licence. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD licence. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/Vector.js b/lib/OpenLayers/Layer/Vector.js index 35080f4063..6de2d6a0a0 100644 --- a/lib/OpenLayers/Layer/Vector.js +++ b/lib/OpenLayers/Layer/Vector.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Layer/VirtualEarth.js b/lib/OpenLayers/Layer/VirtualEarth.js index 2aad877dc4..466d36086b 100644 --- a/lib/OpenLayers/Layer/VirtualEarth.js +++ b/lib/OpenLayers/Layer/VirtualEarth.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/WFS.js b/lib/OpenLayers/Layer/WFS.js index a8af580fe2..cefc0728bd 100644 --- a/lib/OpenLayers/Layer/WFS.js +++ b/lib/OpenLayers/Layer/WFS.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/WMS.js b/lib/OpenLayers/Layer/WMS.js index 518ab68284..e929db4695 100644 --- a/lib/OpenLayers/Layer/WMS.js +++ b/lib/OpenLayers/Layer/WMS.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/WMS/Untiled.js b/lib/OpenLayers/Layer/WMS/Untiled.js index 5dd8c00b38..fb6706432e 100644 --- a/lib/OpenLayers/Layer/WMS/Untiled.js +++ b/lib/OpenLayers/Layer/WMS/Untiled.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/WorldWind.js b/lib/OpenLayers/Layer/WorldWind.js index f8c46173cb..cb1f7366ed 100644 --- a/lib/OpenLayers/Layer/WorldWind.js +++ b/lib/OpenLayers/Layer/WorldWind.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Layer/Yahoo.js b/lib/OpenLayers/Layer/Yahoo.js index fd68a7192e..b2ed441f18 100644 --- a/lib/OpenLayers/Layer/Yahoo.js +++ b/lib/OpenLayers/Layer/Yahoo.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 0090b2a654..80af284d4f 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ @@ -1352,7 +1352,7 @@ OpenLayers.Map = OpenLayers.Class({ /** - * APIMethod: getZoomForExteng + * APIMethod: getZoomForExtent * * Parameters: * bounds - {} diff --git a/lib/OpenLayers/Marker.js b/lib/OpenLayers/Marker.js index 59cab53532..5c8333b20f 100644 --- a/lib/OpenLayers/Marker.js +++ b/lib/OpenLayers/Marker.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Marker/Box.js b/lib/OpenLayers/Marker/Box.js index 8c2674dd43..48c805e034 100644 --- a/lib/OpenLayers/Marker/Box.js +++ b/lib/OpenLayers/Marker/Box.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Popup.js b/lib/OpenLayers/Popup.js index c1335befd5..6f5f77654b 100644 --- a/lib/OpenLayers/Popup.js +++ b/lib/OpenLayers/Popup.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Popup/Anchored.js b/lib/OpenLayers/Popup/Anchored.js index 3c3009adc0..b2387d3867 100644 --- a/lib/OpenLayers/Popup/Anchored.js +++ b/lib/OpenLayers/Popup/Anchored.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Popup/AnchoredBubble.js b/lib/OpenLayers/Popup/AnchoredBubble.js index ae3ee3eb42..4575f6fcff 100644 --- a/lib/OpenLayers/Popup/AnchoredBubble.js +++ b/lib/OpenLayers/Popup/AnchoredBubble.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Renderer.js b/lib/OpenLayers/Renderer.js index b2c82af3ba..2f624ae8a5 100644 --- a/lib/OpenLayers/Renderer.js +++ b/lib/OpenLayers/Renderer.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Renderer/Elements.js b/lib/OpenLayers/Renderer/Elements.js index 43c0e41bbd..9940acb045 100644 --- a/lib/OpenLayers/Renderer/Elements.js +++ b/lib/OpenLayers/Renderer/Elements.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Renderer/SVG.js b/lib/OpenLayers/Renderer/SVG.js index 525bb749c6..0922afbc96 100644 --- a/lib/OpenLayers/Renderer/SVG.js +++ b/lib/OpenLayers/Renderer/SVG.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/Renderer/VML.js b/lib/OpenLayers/Renderer/VML.js index 08f65e25a0..cbd1853e31 100644 --- a/lib/OpenLayers/Renderer/VML.js +++ b/lib/OpenLayers/Renderer/VML.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ /** diff --git a/lib/OpenLayers/SingleFile.js b/lib/OpenLayers/SingleFile.js index 1eda25e2fb..3bab31aaf6 100644 --- a/lib/OpenLayers/SingleFile.js +++ b/lib/OpenLayers/SingleFile.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ OpenLayers = { diff --git a/lib/OpenLayers/Tile.js b/lib/OpenLayers/Tile.js index fef62dcefb..e911874a15 100644 --- a/lib/OpenLayers/Tile.js +++ b/lib/OpenLayers/Tile.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index acf7c9598e..c09f2f0e5a 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Tile/WFS.js b/lib/OpenLayers/Tile/WFS.js index 2df96555f1..073571ec07 100644 --- a/lib/OpenLayers/Tile/WFS.js +++ b/lib/OpenLayers/Tile/WFS.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index ccbe7e2b54..4a01504127 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -1,5 +1,5 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. - * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt +/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. + * See http://svn.openlayers.org/trunk/openlayers/release-license.txt * for the full text of the license. */ diff --git a/repository-license.txt b/repository-license.txt deleted file mode 100644 index 446113705b..0000000000 --- a/repository-license.txt +++ /dev/null @@ -1,35 +0,0 @@ -This license applies to all code and content in the OpenLayers code -repository at svn.openlayers.org: - -Copyright (c) 2005-2007 MetaCarta, Inc. -All rights reserved. - -Redistribution and use 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 MetaCarta, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -This license grants no rights to any components related to natural language -processing, free text querying, or unstructured information retrieval. This -license grants no rights to components that implement inventions on which -MetaCarta has patents or has filed applications for patents. - -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 ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 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 POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/Control/test_OverviewMap.html b/tests/Control/test_OverviewMap.html index 92cd01bb94..911272757e 100644 --- a/tests/Control/test_OverviewMap.html +++ b/tests/Control/test_OverviewMap.html @@ -43,21 +43,33 @@ var overviewZoom = control.ovmap.getZoom(); t.eq(overviewCenter.lon, -71, "Overviewmap center lon correct"); t.eq(overviewCenter.lat, 42, "Overviewmap center lat correct"); - t.eq(overviewZoom, 8, "Overviewmap zoomcorrect"); + t.eq(overviewZoom, 9, "Overviewmap zoomcorrect"); control.mapDivClick({'xy':new OpenLayers.Pixel(5,5)}); + // There are box model issues that keep browsers from giving us + // identical results here. Test the normalized difference against + // a tolerance instead of testing equality. + function normalizedDiff(a, b) { + return Math.abs((a - b) / (a + b)); + } + var tolerance = 1e-4; + var cent = map.getCenter(); - t.eq(cent.lon, -71.3515625, "Clicking on the Overview Map has the correct effect on map lon"); - t.eq(cent.lat, 42.17578125, "Clicking on the Overview Map has the correct effect on map lat"); + t.ok(normalizedDiff(cent.lon, -71.00390625) < tolerance, + "Clicking on the Overview Map has the correct effect on map lon"); + t.ok(normalizedDiff(cent.lat, 42.00390625) < tolerance, + "Clicking on the Overview Map has the correct effect on map lat"); control.rectMouseDown({'xy':new OpenLayers.Pixel(5,5), 'which':1}); control.rectMouseMove({'xy':new OpenLayers.Pixel(15,15), 'which':1}); control.rectMouseUp({'xy':new OpenLayers.Pixel(15,15), 'which':1}); var cent = map.getCenter(); - t.eq(cent.lon, -71.2734375, "Dragging on the Overview Map has the correct effect on map lon"); - t.eq(cent.lat, 42.09765625, "Dragging on the Overview Map has the correct effect on map lat"); + t.ok(normalizedDiff(cent.lon, -70.83984375) < tolerance, + "Dragging on the Overview Map has the correct effect on map lon"); + t.ok(normalizedDiff(cent.lat, 41.84765625) < tolerance, + "Dragging on the Overview Map has the correct effect on map lat"); map.setCenter(new OpenLayers.LonLat(0,0), 0); var overviewCenter = control.ovmap.getCenter(); diff --git a/tests/Handler/test_Drag.html b/tests/Handler/test_Drag.html index 6f7cc63781..843e9dd1e7 100644 --- a/tests/Handler/test_Drag.html +++ b/tests/Handler/test_Drag.html @@ -87,7 +87,7 @@ } function test_Handler_Drag_callbacks(t) { - t.plan(30); + t.plan(27); var map = new OpenLayers.Map('map', {controls: []}); @@ -227,24 +227,25 @@ t.ok(!handler.dragging, "mouseout sets dragging flag to false"); OpenLayers.Util.mouseLeft = oldMouseLeft; - // test click - handler.dragging = true; - handler.started = "foo"; - map.events.triggerEvent("click", null); - t.ok(!handler.dragging, - "click while dragging sets dragging to false"); - t.eq(handler.started, "foo", - "click while dragging doesn't mess with started"); - - handler.dragging = null; - handler.started = true; - map.events.triggerEvent("click", null); - t.ok(handler.dragging == null, - "click while not dragging doesn't mess with dragging flag"); - t.ok(!handler.started, - "click while not dragging sets started to false"); + // test click with the click.html example - the click method on the + // drag handler returns (handler.start == handler.last), stopping + // propagation of the click event if the mouse moved during a drag. - + // regression tests will assure that the drag handler doesn't mess + // with anything else on a click + function getProperties(obj) { + var props = {}; + for(key in obj) { + if(typeof obj[key] != "function" && typeof obj[key] != "object") { + props[key] = obj[key]; + } + } + return props; + } + var before = getProperties(handler); + map.events.triggerEvent("click", null); + var after = getProperties(handler); + t.eq(before, after, "click doesn't mess with handler"); } diff --git a/tests/Layer/test_GeoRSS.html b/tests/Layer/test_GeoRSS.html index ba96130965..345f2cd20f 100644 --- a/tests/Layer/test_GeoRSS.html +++ b/tests/Layer/test_GeoRSS.html @@ -140,25 +140,25 @@ }); } - function test_04_Layer_GeoRSS_icon(t) { - t.plan( 3 ); - layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt); + function test_04_Layer_GeoRSS_icon(t) { + t.plan( 3 ); + layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt); var the_icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png'); - var otherLayer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt,{icon:the_icon}); - var map = new OpenLayers.Map('map'); + var otherLayer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt,{icon:the_icon}); + var map = new OpenLayers.Map('map'); var baseLayer = new OpenLayers.Layer.WMS("Test Layer", "http://octo.metacarta.com/cgi-bin/mapserv?", {map: "/mapdata/vmap_wms.map", layers: "basic"}); map.addLayer(baseLayer); map.addLayers([layer,otherLayer]); map.setCenter(new OpenLayers.LonLat(0,0),0); - var defaultIcon = OpenLayers.Marker.defaultIcon(); - t.delay_call( 1, function() { - t.ok(layer.markers[0].icon, "The layer has a icon"); - t.eq(layer.markers[0].icon.url, defaultIcon.url, "The layer without icon has the default icon."); - t.eq(otherLayer.markers[0].icon.url, the_icon.url,"The layer with an icon has that icon."); - }); - } + var defaultIcon = OpenLayers.Marker.defaultIcon(); + t.delay_call( 1, function() { + t.ok(layer.markers[0].icon, "The layer has a icon"); + t.eq(layer.markers[0].icon.url, defaultIcon.url, "The layer without icon has the default icon."); + t.eq(otherLayer.markers[0].icon.url, the_icon.url,"The layer with an icon has that icon."); + }); + } function test_Layer_GeoRSS_loadend_Event(t) { var browserCode = OpenLayers.Util.getBrowserName(); if (browserCode == "msie") { diff --git a/tests/Layer/test_Grid.html b/tests/Layer/test_Grid.html index c99231dd71..c4164bf4be 100644 --- a/tests/Layer/test_Grid.html +++ b/tests/Layer/test_Grid.html @@ -150,12 +150,26 @@ bounds = new OpenLayers.Bounds(10,10,12,12); zoom = layer.getZoomForExtent(bounds); - t.eq( zoom, 8, "getZoomForExtent() returns correct value"); + /** + * ideal resolution: 2 map units / 500px = 0.004 + * layer.resolutions = [1.40625, 0.703125, 0.3515625, 0.17578125, + * 0.087890625, 0.0439453125, 0.02197265625, + * 0.010986328125, 0.0054931640625, 0.00274658203125, + * 0.001373291015625, 0.0006866455078125, 0.00034332275390625, + * 0.000171661376953125, 0.0000858306884765625, 0.00004291534423828125] + * + * So, we expect a zoom of 9 because it is the closest resolution. + */ + t.eq( zoom, 9, "getZoomForExtent() returns correct value"); bounds = new OpenLayers.Bounds(10,10,100,100); zoom = layer.getZoomForExtent(bounds); - t.eq( zoom, 2, "getZoomForExtent() returns correct value"); + /** + * ideal resolution: 90 map units / 500px = 0.18 + * So, we expect a zoom of 3 because it is the closest. + */ + t.eq( zoom, 3, "getZoomForExtent() returns correct value"); } function test_07_Layer_Grid_moveTo(t) { @@ -515,10 +529,10 @@ } function test_16_Layer_Grid_tileSizeIsInteger(t) { - t.plan(1); - + t.plan(1); + var map = new OpenLayers.Map('map'); - var layer = new OpenLayers.Layer.Grid(name, url, params, { + var layer = new OpenLayers.Layer.Grid(name, url, params, { singleTile: true, ratio: 1.5 }); @@ -541,10 +555,10 @@ map.zoomToMaxExtent(); map.zoomIn(); var bounds = layer.getTileBounds(new OpenLayers.Pixel(200,200)); - t.eq(bounds.toBBOX(), "-180,-90,0,90", "get tile bounds returns correct bounds"); + t.eq(bounds.toBBOX(), "-90,0,0,90", "get tile bounds returns correct bounds"); map.pan(200,0); var bounds = layer.getTileBounds(new OpenLayers.Pixel(200,200)); - t.eq(bounds.toBBOX(), "0,-90,180,90", "get tile bounds returns correct bounds after pan"); + t.eq(bounds.toBBOX(), "0,0,90,90", "get tile bounds returns correct bounds after pan"); } function test_Layer_Grid_moveTo_buffer_calculation (t) { diff --git a/tests/Layer/test_Image.html b/tests/Layer/test_Image.html index b851e5884b..21da2c13df 100644 --- a/tests/Layer/test_Image.html +++ b/tests/Layer/test_Image.html @@ -39,7 +39,7 @@ } function test_50_Layer_Image_tileTests (t) { - t.plan(6); + t.plan(7); var map = new OpenLayers.Map('map'); layer = new OpenLayers.Layer.Image('Test Layer', @@ -63,6 +63,8 @@ t.eq(layer.tile.imgDiv.src, "http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif", "URL is correct"); map.zoomIn(); t.eq(layer.tile.imgDiv.src, "http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif", "URL is correct"); + layer.setUrl('http://labs.metacarta.com/wms/vmap0?LAYERS=basic&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT=256'); + t.eq(layer.tile.imgDiv.src, "http://labs.metacarta.com/wms/vmap0?LAYERS=basic&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT=256", "URL is correct after setURL"); } /****** * diff --git a/tests/Layer/test_KaMap.html b/tests/Layer/test_KaMap.html index a79bd7d50a..54c82c6fed 100644 --- a/tests/Layer/test_KaMap.html +++ b/tests/Layer/test_KaMap.html @@ -128,12 +128,26 @@ bounds = new OpenLayers.Bounds(10,10,12,12); zoom = layer.getZoomForExtent(bounds); - t.eq( zoom, 8, "getZoomForExtent() returns correct value"); + /** + * ideal resolution: 2 map units / 500px = 0.004 + * layer.resolutions = [1.40625, 0.703125, 0.3515625, 0.17578125, + * 0.087890625, 0.0439453125, 0.02197265625, + * 0.010986328125, 0.0054931640625, 0.00274658203125, + * 0.001373291015625, 0.0006866455078125, 0.00034332275390625, + * 0.000171661376953125, 0.0000858306884765625, 0.00004291534423828125] + * + * So, we expect a zoom of 9 because it is the closest resolution. + */ + t.eq( zoom, 9, "getZoomForExtent() returns correct value"); bounds = new OpenLayers.Bounds(10,10,100,100); zoom = layer.getZoomForExtent(bounds); - t.eq( zoom, 2, "getZoomForExtent() returns correct value"); + /** + * ideal resolution: 90 map units / 500px = 0.18 + * So, we expect a zoom of 3 because it is the closest. + */ + t.eq( zoom, 3, "getZoomForExtent() returns correct value"); } function test_06_Layer_kaMap_mergeNewParams (t) { @@ -236,10 +250,10 @@ map.zoomToMaxExtent(); map.zoomIn(); var bounds = layer.getTileBounds(new OpenLayers.Pixel(200,200)); - t.eq(bounds.toBBOX(), "-180,0,0,180", "get tile bounds returns correct bounds"); + t.eq(bounds.toBBOX(), "-90,0,0,90", "get tile bounds returns correct bounds"); map.pan(200,0); var bounds = layer.getTileBounds(new OpenLayers.Pixel(200,200)); - t.eq(bounds.toBBOX(), "0,0,180,180", "get tile bounds returns correct bounds after pan"); + t.eq(bounds.toBBOX(), "0,0,90,90", "get tile bounds returns correct bounds after pan"); } function test_99_Layer_KaMap_destroy (t) { diff --git a/tests/Layer/test_TMS.html b/tests/Layer/test_TMS.html index dbcb54cc52..17dc55a803 100644 --- a/tests/Layer/test_TMS.html +++ b/tests/Layer/test_TMS.html @@ -77,13 +77,26 @@ bounds = new OpenLayers.Bounds(10,10,12,12); zoom = layer.getZoomForExtent(bounds); - - t.eq( zoom, 8, "getZoomForExtent() returns correct value"); + /** + * ideal resolution: 2 map units / 500px = 0.004 + * layer.resolutions = [1.40625, 0.703125, 0.3515625, 0.17578125, + * 0.087890625, 0.0439453125, 0.02197265625, + * 0.010986328125, 0.0054931640625, 0.00274658203125, + * 0.001373291015625, 0.0006866455078125, 0.00034332275390625, + * 0.000171661376953125, 0.0000858306884765625, 0.00004291534423828125] + * + * So, we expect a zoom of 9 because it is the closest resolution. + */ + + t.eq( zoom, 9, "getZoomForExtent() returns correct value"); bounds = new OpenLayers.Bounds(10,10,100,100); zoom = layer.getZoomForExtent(bounds); - - t.eq( zoom, 2, "getZoomForExtent() returns correct value"); + /** + * ideal resolution: 90 map units / 500px = 0.18 + * So, we expect a zoom of 3 because it is the closest. + */ + t.eq( zoom, 3, "getZoomForExtent() returns correct value"); } diff --git a/tests/Layer/test_Text.html b/tests/Layer/test_Text.html index 4538617333..3a1b8c3e4b 100644 --- a/tests/Layer/test_Text.html +++ b/tests/Layer/test_Text.html @@ -120,7 +120,7 @@ } function test_Layer_Text_loadend_Event(t) { t.plan(2); - layer = new OpenLayers.Layer.Text('Test Layer', {location:datafile}); + layer = new OpenLayers.Layer.Text('Test Layer', {location:datafile}); t.delay_call(2, function() { layer.events.register('loadend', layer, function() { t.ok(true, "Loadend event fired"); diff --git a/tests/Layer/test_TileCache.html b/tests/Layer/test_TileCache.html index db3a6a7438..78bae8d4cb 100644 --- a/tests/Layer/test_TileCache.html +++ b/tests/Layer/test_TileCache.html @@ -78,13 +78,27 @@ bounds = new OpenLayers.Bounds(10,10,12,12); zoom = layer.getZoomForExtent(bounds); - - t.eq( zoom, 7, "getZoomForExtent() returns correct value"); + /** + * ideal resolution: 2 map units / 500px = 0.004 + * layer.resolutions = [0.703125, 0.3515625, 0.17578125, + * 0.087890625, 0.0439453125, 0.02197265625, + * 0.010986328125, 0.0054931640625, 0.00274658203125, + * 0.001373291015625, 0.0006866455078125, 0.00034332275390625, + * 0.000171661376953125, 0.0000858306884765625, 0.00004291534423828125, + * 0.000021457672119140625] + * + * So, we expect a zoom of 8 because it is the closest resolution. + */ + t.eq( zoom, 8, "getZoomForExtent() returns correct value"); bounds = new OpenLayers.Bounds(10,10,100,100); zoom = layer.getZoomForExtent(bounds); + /** + * ideal resolution: 90 map units / 500px = 0.18 + * So, we expect a zoom of 2 because it is the closest. + */ - t.eq( zoom, 1, "getZoomForExtent() returns correct value"); + t.eq( zoom, 2, "getZoomForExtent() returns correct value"); } diff --git a/tests/Layer/test_Vector.html b/tests/Layer/test_Vector.html index ec950dfdb2..3e1aab251d 100644 --- a/tests/Layer/test_Vector.html +++ b/tests/Layer/test_Vector.html @@ -165,9 +165,9 @@ var baseLayer = new OpenLayers.Layer.WMS("Base Layer", "http://octo.metacarta.com/cgi-bin/mapserv", { map: '/mapdata/vmap_wms.map', - layers: 'basic', - format: 'image/png'}); - + layers: 'basic', + format: 'image/png'}); + var layer = new OpenLayers.Layer.Vector("Test Layer"); var renderer = layer.renderer; var map = new OpenLayers.Map('map'); @@ -181,25 +181,25 @@ map.zoomToMaxExtent(); var customStyle1 = new Object({ - externalGraphic: 'test.png', - pointRadius: 10 + externalGraphic: 'test.png', + pointRadius: 10 }); var customStyle2 = new Object({ - externalGraphic: 'test.png', - graphicWidth: 12 + externalGraphic: 'test.png', + graphicWidth: 12 }); var customStyle3 = new Object({ - externalGraphic: 'test.png', - graphicHeight: 14 + externalGraphic: 'test.png', + graphicHeight: 14 }); var customStyle4 = new Object({ - externalGraphic: 'test.png', - graphicWidth: 24, - graphicHeight: 16 + externalGraphic: 'test.png', + graphicWidth: 24, + graphicHeight: 16 }); var customStyle5 = new Object({ externalGraphic: 'test.png', - graphicWidth: 24, + graphicWidth: 24, graphicOpacity: 1 }); var customStyle6 = new Object({ @@ -212,43 +212,43 @@ var root = renderer.root; if (layer.renderer.CLASS_NAME == 'OpenLayers.Renderer.SVG') { - feature.style = customStyle1; - layer.drawFeature(feature); - t.eq(root.firstChild.getAttributeNS(null, 'width'), - (2*customStyle1.pointRadius).toString(), - "given a pointRadius, width equals 2*pointRadius"); - t.eq(root.firstChild.getAttributeNS(null, 'height'), - (2*customStyle1.pointRadius).toString(), - "given a pointRadius, height equals 2*pointRadius"); - feature.style = customStyle2; - layer.drawFeature(feature); - t.eq(root.firstChild.getAttributeNS(null, 'width'), - root.firstChild.getAttributeNS(null, 'height'), - "given a graphicWidth, width equals height"); - t.eq(root.firstChild.getAttributeNS(null, 'width'), - customStyle2.graphicWidth.toString(), - "width is set correctly"); - feature.style = customStyle3; - layer.drawFeature(feature); - t.eq(root.firstChild.getAttributeNS(null, 'height'), - root.firstChild.getAttributeNS(null, 'width'), - "given a graphicHeight, height equals width"); - t.eq(root.firstChild.getAttributeNS(null, 'height'), - customStyle3.graphicHeight.toString(), - "height is set correctly"); - feature.style = customStyle4; - layer.drawFeature(feature); - t.eq(root.firstChild.getAttributeNS(null, 'height'), - customStyle4.graphicHeight.toString(), - "given graphicHeight and graphicWidth, both are set: height"); - t.eq(root.firstChild.getAttributeNS(null, 'width'), - customStyle4.graphicWidth.toString(), - "given graphicHeight and graphicWidth, both are set: width"); + feature.style = customStyle1; + layer.drawFeature(feature); + t.eq(root.firstChild.getAttributeNS(null, 'width'), + (2*customStyle1.pointRadius).toString(), + "given a pointRadius, width equals 2*pointRadius"); + t.eq(root.firstChild.getAttributeNS(null, 'height'), + (2*customStyle1.pointRadius).toString(), + "given a pointRadius, height equals 2*pointRadius"); + feature.style = customStyle2; + layer.drawFeature(feature); + t.eq(root.firstChild.getAttributeNS(null, 'width'), + root.firstChild.getAttributeNS(null, 'height'), + "given a graphicWidth, width equals height"); + t.eq(root.firstChild.getAttributeNS(null, 'width'), + customStyle2.graphicWidth.toString(), + "width is set correctly"); + feature.style = customStyle3; + layer.drawFeature(feature); + t.eq(root.firstChild.getAttributeNS(null, 'height'), + root.firstChild.getAttributeNS(null, 'width'), + "given a graphicHeight, height equals width"); + t.eq(root.firstChild.getAttributeNS(null, 'height'), + customStyle3.graphicHeight.toString(), + "height is set correctly"); + feature.style = customStyle4; + layer.drawFeature(feature); + t.eq(root.firstChild.getAttributeNS(null, 'height'), + customStyle4.graphicHeight.toString(), + "given graphicHeight and graphicWidth, both are set: height"); + t.eq(root.firstChild.getAttributeNS(null, 'width'), + customStyle4.graphicWidth.toString(), + "given graphicHeight and graphicWidth, both are set: width"); feature.style = customStyle5; layer.drawFeature(feature); - t.eq(root.firstChild.getAttributeNS(null, 'style'), - 'opacity: '+customStyle5.graphicOpacity.toString()+';', - "graphicOpacity correctly set"); + t.eq(root.firstChild.getAttributeNS(null, 'style'), + 'opacity: '+customStyle5.graphicOpacity.toString()+';', + "graphicOpacity correctly set"); feature.style = customStyle6; layer.drawFeature(feature); var x = geometryX / renderer.getResolution() + renderer.left; @@ -268,46 +268,46 @@ "graphicYOffset correctly set"); } if (layer.renderer.CLASS_NAME == 'OpenLayers.Renderer.VML') { - feature.style = customStyle1; - layer.drawFeature(feature); - t.eq(root.firstChild.style.width, - (2*customStyle1.pointRadius).toString()+'px', - "given a pointRadius, width equals 2*pointRadius"); - t.eq(root.firstChild.style.height, - (2*customStyle1.pointRadius).toString()+'px', - "given a pointRadius, height equals 2*pointRadius"); - feature.style = customStyle2; - layer.drawFeature(feature); - t.eq(root.firstChild.style.width, - root.firstChild.style.height, - "given a graphicWidth, width equals height"); - t.eq(root.firstChild.style.width, - customStyle2.graphicWidth.toString()+'px', - "width is set correctly"); - feature.style = customStyle3; - layer.drawFeature(feature); - t.eq(root.firstChild.style.height, - root.firstChild.style.width, - "given a graphicHeight, height equals width"); - t.eq(root.firstChild.style.height, - customStyle3.graphicHeight.toString()+'px', - "height is set correctly"); - feature.style = customStyle4; - layer.drawFeature(feature); - t.eq(root.firstChild.style.height, - customStyle4.graphicHeight.toString()+'px', - "given graphicHeight and graphicWidth, both are set: height"); - t.eq(root.firstChild.style.width, - customStyle4.graphicWidth.toString()+'px', - "given graphicHeight and graphicWidth, both are set: width"); + feature.style = customStyle1; + layer.drawFeature(feature); + t.eq(root.firstChild.style.width, + (2*customStyle1.pointRadius).toString()+'px', + "given a pointRadius, width equals 2*pointRadius"); + t.eq(root.firstChild.style.height, + (2*customStyle1.pointRadius).toString()+'px', + "given a pointRadius, height equals 2*pointRadius"); + feature.style = customStyle2; + layer.drawFeature(feature); + t.eq(root.firstChild.style.width, + root.firstChild.style.height, + "given a graphicWidth, width equals height"); + t.eq(root.firstChild.style.width, + customStyle2.graphicWidth.toString()+'px', + "width is set correctly"); + feature.style = customStyle3; + layer.drawFeature(feature); + t.eq(root.firstChild.style.height, + root.firstChild.style.width, + "given a graphicHeight, height equals width"); + t.eq(root.firstChild.style.height, + customStyle3.graphicHeight.toString()+'px', + "height is set correctly"); + feature.style = customStyle4; + layer.drawFeature(feature); + t.eq(root.firstChild.style.height, + customStyle4.graphicHeight.toString()+'px', + "given graphicHeight and graphicWidth, both are set: height"); + t.eq(root.firstChild.style.width, + customStyle4.graphicWidth.toString()+'px', + "given graphicHeight and graphicWidth, both are set: width"); feature.style = customStyle5; layer.drawFeature(feature); var fill = root.firstChild.getElementsByTagName("fill")[0]; if (fill == null) fill = root.firstChild.getElementsByTagName("v:fill"); var opacity = fill.getAttribute('opacity'); t.eq(opacity, - customStyle5.graphicOpacity, - "graphicOpacity correctly set"); + customStyle5.graphicOpacity, + "graphicOpacity correctly set"); feature.style = customStyle6; layer.drawFeature(feature); var x = geometryX / renderer.getResolution(); diff --git a/tests/Layer/test_WrapDateLine.html b/tests/Layer/test_WrapDateLine.html index 3490322c1d..cad289f4c5 100644 --- a/tests/Layer/test_WrapDateLine.html +++ b/tests/Layer/test_WrapDateLine.html @@ -131,9 +131,9 @@ var m = new OpenLayers.Map('map'); m.addLayer(layer); m.zoomToMaxExtent(); - t.eq(layer.grid[3][0].url, "http://octo.metacarta.com/cgi-bin/mapserv?MAP=%2Fmapdata%2Fvmap_wms.map&LAYERS=basic&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0%2C-90%2C180%2C90&WIDTH=256&HEIGHT=256", "cell [3][0] is wrapped around the world."); - t.eq(layer.grid[0][0].url, "http://octo.metacarta.com/cgi-bin/mapserv?MAP=%2Fmapdata%2Fvmap_wms.map&LAYERS=basic&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0%2C450%2C180%2C630&WIDTH=256&HEIGHT=256", "cell [0][0] is wrapped around the world lon, but not lat"); - t.eq(layer.grid[0][3].url, "http://octo.metacarta.com/cgi-bin/mapserv?MAP=%2Fmapdata%2Fvmap_wms.map&LAYERS=basic&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-180%2C450%2C0%2C630&WIDTH=256&HEIGHT=256", "cell [3][0] is not wrapped at all."); + t.eq(layer.grid[3][0].url, "http://octo.metacarta.com/cgi-bin/mapserv?MAP=%2Fmapdata%2Fvmap_wms.map&LAYERS=basic&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0%2C0%2C90%2C90&WIDTH=256&HEIGHT=256", "cell [3][0] is wrapped around the world."); + t.eq(layer.grid[0][0].url, "http://octo.metacarta.com/cgi-bin/mapserv?MAP=%2Fmapdata%2Fvmap_wms.map&LAYERS=basic&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0%2C270%2C90%2C360&WIDTH=256&HEIGHT=256", "cell [0][0] is wrapped around the world lon, but not lat"); + t.eq(layer.grid[0][3].url, "http://octo.metacarta.com/cgi-bin/mapserv?MAP=%2Fmapdata%2Fvmap_wms.map&LAYERS=basic&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-90%2C270%2C0%2C360&WIDTH=256&HEIGHT=256", "cell [3][0] is not wrapped at all."); } function test_Layer_WrapDateLine_KaMap (t) { @@ -146,9 +146,9 @@ var m = new OpenLayers.Map('map'); m.addLayer(layer); m.zoomToMaxExtent(); - t.eq(layer.grid[0][0].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=-1280&l=0&s=221471921.25", "grid[0][0] kamap is okay"); - t.eq(layer.grid[0][3].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=-1280&l=-256&s=221471921.25", "grid[0][3] kamap is okay"); - t.eq(layer.grid[3][0].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=-512&l=0&s=221471921.25", "grid[3][0] is okay"); + t.eq(layer.grid[0][0].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=-1280&l=0&s=110735960.625", "grid[0][0] kamap is okay"); + t.eq(layer.grid[0][3].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=-1280&l=-256&s=110735960.625", "grid[0][3] kamap is okay"); + t.eq(layer.grid[3][0].url, "http://www.openlayers.org/world/index.php?g=satellite&map=world&i=jpeg&t=-512&l=0&s=110735960.625", "grid[3][0] is okay"); } function test_Layer_WrapDateLine_WMS_Overlay (t) { t.plan( 3 ); @@ -163,9 +163,9 @@ var m = new OpenLayers.Map('map'); m.addLayers([baselayer,layer]); m.zoomToMaxExtent(); - t.eq(layer.grid[0][0].url, "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?LAYERS=bathymetry%2Cland_fn%2Cpark%2Cdrain_fn%2Cdrainage%2Cprov_bound%2Cfedlimit%2Crail%2Croad%2Cpopplace&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0%2C450%2C180%2C630&WIDTH=256&HEIGHT=256", "grid[0][0] wms overlay is okay"); - t.eq(layer.grid[0][3].url, "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?LAYERS=bathymetry%2Cland_fn%2Cpark%2Cdrain_fn%2Cdrainage%2Cprov_bound%2Cfedlimit%2Crail%2Croad%2Cpopplace&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-180%2C450%2C0%2C630&WIDTH=256&HEIGHT=256", "grid[0][3] wms overlay is okay"); - t.eq(layer.grid[3][0].url, "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?LAYERS=bathymetry%2Cland_fn%2Cpark%2Cdrain_fn%2Cdrainage%2Cprov_bound%2Cfedlimit%2Crail%2Croad%2Cpopplace&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0%2C-90%2C180%2C90&WIDTH=256&HEIGHT=256", "grid[3][0] wms overlay okay"); + t.eq(layer.grid[0][0].url, "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?LAYERS=bathymetry%2Cland_fn%2Cpark%2Cdrain_fn%2Cdrainage%2Cprov_bound%2Cfedlimit%2Crail%2Croad%2Cpopplace&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0%2C270%2C90%2C360&WIDTH=256&HEIGHT=256", "grid[0][0] wms overlay is okay"); + t.eq(layer.grid[0][3].url, "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?LAYERS=bathymetry%2Cland_fn%2Cpark%2Cdrain_fn%2Cdrainage%2Cprov_bound%2Cfedlimit%2Crail%2Croad%2Cpopplace&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-90%2C270%2C0%2C360&WIDTH=256&HEIGHT=256", "grid[0][3] wms overlay is okay"); + t.eq(layer.grid[3][0].url, "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?LAYERS=bathymetry%2Cland_fn%2Cpark%2Cdrain_fn%2Cdrainage%2Cprov_bound%2Cfedlimit%2Crail%2Croad%2Cpopplace&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=0%2C0%2C90%2C90&WIDTH=256&HEIGHT=256", "grid[3][0] wms overlay okay"); } diff --git a/tests/test_Layer.html b/tests/test_Layer.html index a88eb9970a..c143219a2a 100644 --- a/tests/test_Layer.html +++ b/tests/test_Layer.html @@ -155,7 +155,7 @@ function test_06_Layer_getZoomForResolution(t) { - t.plan(4); + t.plan(6); var layer = new OpenLayers.Layer('Test Layer'); @@ -163,6 +163,8 @@ layer.resolutions = [128, 64, 32, 16, 8, 4, 2]; t.eq(layer.getZoomForResolution(200), 0, "zoom all the way out"); + t.eq(layer.getZoomForResolution(65), 1, "index closest to 65"); + t.eq(layer.getZoomForResolution(63), 1, "index closest to 63"); t.eq(layer.getZoomForResolution(25), 2, "zoom in middle"); t.eq(layer.getZoomForResolution(3), 5, "zoom allmost all the way in"); t.eq(layer.getZoomForResolution(1), 6, "zoom all the way in");