Additional ndocs for geometry.equals.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9074 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -333,13 +333,14 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* APIMethod: equals
|
* APIMethod: equals
|
||||||
* Tests for equivalent geometries
|
* Determine whether another geometry is equivalent to this one. Geometries
|
||||||
|
* are considered equivalent if all components have the same coordinates.
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* geometry - {<OpenLayers.Geometry>}
|
* geom - {<OpenLayers.Geometry>} The geometry to test.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* {Boolean} The coordinates are equivalent
|
* {Boolean} The supplied geometry is equivalent to this geometry.
|
||||||
*/
|
*/
|
||||||
equals: function(geometry) {
|
equals: function(geometry) {
|
||||||
var equivalent = true;
|
var equivalent = true;
|
||||||
|
|||||||
@@ -123,18 +123,17 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APIMethod: equals
|
* APIMethod: equals
|
||||||
*
|
* Determine whether another geometry is equivalent to this one. Geometries
|
||||||
* Parameters:
|
* are considered equivalent if all components have the same coordinates.
|
||||||
* xy - {<OpenLayers.Geometry>}
|
*
|
||||||
*
|
* Parameters:
|
||||||
* Returns:
|
* geom - {<OpenLayers.Geometry.Point>} The geometry to test.
|
||||||
* {Boolean} Boolean value indicating whether the passed-in
|
*
|
||||||
* {<OpenLayers.Geometry>} object has the same components as this
|
* Returns:
|
||||||
* note that if ll passed in is null, returns false
|
* {Boolean} The supplied geometry is equivalent to this geometry.
|
||||||
*
|
*/
|
||||||
*/
|
equals: function(geom) {
|
||||||
equals:function(geom) {
|
|
||||||
var equals = false;
|
var equals = false;
|
||||||
if (geom != null) {
|
if (geom != null) {
|
||||||
equals = ((this.x == geom.x && this.y == geom.y) ||
|
equals = ((this.x == geom.x && this.y == geom.y) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user