added support for text labels. This also adds getCentroid methods to all
geometries. Thanks crschmidt for the great help with this patch, and thanks to camptocamp for the initial work on this and rcoup for creating the first patches. r=crschmidt (closes #1895) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9262 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -186,6 +186,16 @@ OpenLayers.Geometry.Point = OpenLayers.Class(OpenLayers.Geometry, {
|
||||
this.y = origin.y + (radius * Math.sin(theta));
|
||||
this.clearBounds();
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: getCentroid
|
||||
*
|
||||
* Returns:
|
||||
* {<OpenLayers.Geometry.Point>} The centroid of the collection
|
||||
*/
|
||||
getCentroid: function() {
|
||||
return new OpenLayers.Geometry.Point(this.x, this.y);
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: resize
|
||||
|
||||
Reference in New Issue
Block a user