[OpenLayers-Users] WKT output of constructed Geometry
John Cartwright
john.c.cartwright at comcast.net
Sat Mar 14 22:52:52 EDT 2009
Hello All,
I'm constructing a geometry w/ a pair of points and then trying to
output it as a WKT text string. However, the parser is complaining that
"geometry is undefined" so I'm assuming that I'd doing something wrong
in the Geometry construction. Can someone please help me here?
Thanks!
--john
var parser = new OpenLayers.Format.WKT({
'internalProjection': map.baseLayer.projection,
'externalProjection': map.baseLayer.projection
});
var geom = new
OpenLayers.Geometry.Point(parseFloat(coords[0]),parseFloat(coords[1]));
var str = parser.write(geom, true);
More information about the Users
mailing list