#708 - make the WKT format like the other vector formats - serialize/deserialize features instead of geometries

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3158 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-05-21 14:24:55 +00:00
parent 6bbecdbb36
commit 7819bd1743
4 changed files with 165 additions and 124 deletions

View File

@@ -5,6 +5,7 @@
/**
* @class
* @requires OpenLayers/Format/WKT.js
* @requires OpenLayers/Feature/Vector.js
*/
OpenLayers.Geometry = OpenLayers.Class.create();
OpenLayers.Geometry.prototype = {
@@ -150,7 +151,9 @@ OpenLayers.Geometry.prototype = {
* @type String
*/
toString: function() {
return OpenLayers.Format.WKT.prototype.write(this);
return OpenLayers.Format.WKT.prototype.write(
new OpenLayers.Feature.Vector(this)
);
},
/** @final @type String */