[OpenLayers-Users] geometry.getComponentsString()

Christopher Schmidt crschmidt at metacarta.com
Thu Apr 5 16:46:22 EDT 2007


On Thu, Apr 05, 2007 at 01:39:50PM -0700, Roger Kunkel wrote:
> 
> geometry.getComponentsString()  doesn't work on a polygon?
> 
> What's the easiest way to get a polygon's coordinates?

geometry.toString() should work on anything -- returns WKT. Is that good
enough?

Otherwise, you should iterate through geometry.components, and you can
call getComponenetsString on each component of the polygon (they are
linear rings). 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list