Merge all changes from the naturaldocs sandbox. This brings all the work that

has been done in the NaturalDocs branch back to trunk. Thanks to everyone who
helped out in making this happen. (I could list people, but the list would
be long, and I'm already mentally on vacation.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-06-29 15:59:20 +00:00
parent f1c61fd0d6
commit 3948913bfc
107 changed files with 8658 additions and 4011 deletions

View File

@@ -3,42 +3,49 @@
* for the full text of the license. */
/**
* @class
* @requires OpenLayers/Geometry/Collection.js
*
* Class: OpenLayers.Geometry.Polygon
* Polygon is a collection of Geometry.LinearRings.
*
* The first ring (this.component[0])is the outer bounds of the polygon and
* all subsequent rings (this.component[1-n]) are internal holes.
*
* @requires OpenLayers/Geometry/Collection.js
* Inherits from:
* - <OpenLayers.Geometry.Collection>
* - <OpenLayers.Geometry>
*/
OpenLayers.Geometry.Polygon = OpenLayers.Class.create();
OpenLayers.Geometry.Polygon.prototype =
OpenLayers.Class.inherit(OpenLayers.Geometry.Collection, {
/**
* An array of class names representing the types of components that
* the collection can include. A null value means the component types
* are not restricted.
* @type Array(String)
* Property: componentTypes
* {Array(String)} An array of class names representing the types of
* components that the collection can include. A null value means the
* component types are not restricted.
*/
componentTypes: ["OpenLayers.Geometry.LinearRing"],
/**
* @constructor
* Constructor: OpenLayers.Geometry.Polygon
* Constructor for a Polygon geometry.
* The first ring (this.component[0])is the outer bounds of the polygon and
* all subsequent rings (this.component[1-n]) are internal holes.
*
* @param {Array(OpenLayers.Geometry.LinearRing)}
*
* Parameters:
* components - Array({<OpenLayers.Geometry.LinearRing>})
*/
initialize: function(components) {
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
arguments);
},
/** Calculated by subtracting the areas of the internal holes from the
/**
* APIMethod: getArea
* Calculated by subtracting the areas of the internal holes from the
* area of the outer hole.
*
* @returns The area of the geometry
* @type float
* Return:
* {float} The area of the geometry
*/
getArea: function() {
var area = 0.0;
@@ -51,6 +58,9 @@ OpenLayers.Geometry.Polygon.prototype =
return area;
},
/** @final @type String */
/**
* Constant: CLASS_NAME
* {String} Name of class.
*/
CLASS_NAME: "OpenLayers.Geometry.Polygon"
});