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:
@@ -3,30 +3,33 @@
|
||||
* for the full text of the license. */
|
||||
|
||||
/**
|
||||
* @class
|
||||
* @requires OpenLayers/Geometry/MultiPoint.js
|
||||
*
|
||||
* Class: OpenLayers.Geometry.Curve
|
||||
* A Curve is a MultiPoint, whose points are assumed to be connected. To
|
||||
* this end, we provide a "getLength()" function, which iterates through
|
||||
* the points, summing the distances between them.
|
||||
*
|
||||
* @requires OpenLayers/Geometry/MultiPoint.js
|
||||
*
|
||||
* Inherits:
|
||||
* - <OpenLayers.Geometry.MultiPoint>
|
||||
*/
|
||||
OpenLayers.Geometry.Curve = OpenLayers.Class.create();
|
||||
OpenLayers.Geometry.Curve.prototype =
|
||||
OpenLayers.Class.inherit(OpenLayers.Geometry.MultiPoint, {
|
||||
|
||||
/**
|
||||
* 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.Point"],
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {Array(OpenLayers.Geometry.Point)} points
|
||||
* Constructor: OpenLayers.Geometry.Curve
|
||||
*
|
||||
* Parameters:
|
||||
* point - {Array(<OpenLayers.Geometry.Point>)}
|
||||
*/
|
||||
initialize: function(points) {
|
||||
OpenLayers.Geometry.MultiPoint.prototype.initialize.apply(this,
|
||||
@@ -34,8 +37,10 @@ OpenLayers.Geometry.Curve.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns The length of the curve
|
||||
* @type float
|
||||
* APIMethod: getLength
|
||||
*
|
||||
* Return:
|
||||
* {Float} The length of the curve
|
||||
*/
|
||||
getLength: function() {
|
||||
var length = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user