#611: let all geometry inherit toString from the superclass - geometry.toString returns well-known text based on Format.WKT.write()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2945 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
/**
|
||||
* @class
|
||||
* @requires OpenLayers/Format/WKT.js
|
||||
*/
|
||||
OpenLayers.Geometry = OpenLayers.Class.create();
|
||||
OpenLayers.Geometry.prototype = {
|
||||
@@ -160,6 +161,14 @@ OpenLayers.Geometry.prototype = {
|
||||
return 0.0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns the Well-Known Text representation of a geometry
|
||||
* @type String
|
||||
*/
|
||||
toString: function() {
|
||||
return OpenLayers.Format.WKT.prototype.write(this);
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Geometry"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user