[OpenLayers-Users] Vector/GML Question

Christopher Schmidt crschmidt at metacarta.com
Tue Mar 27 20:22:47 EDT 2007


On Tue, Mar 27, 2007 at 10:13:32AM -0700, Roger Kunkel wrote:
> 
> Is a geometry.toGML function in the works? Perhaps it already exists.  
> Seems like this would be very handy for posting user created/edited  
> geometries.

See gml-serialize.html in the examples directory. Specifically, you can
serialize any list of features to GML via:

  gml = new OpenLayers.Format.GML();
  data = gml.write([feature,feature]);

You can use layer.features to access the features drawn on a layer.  

Let me know if this doesn't help you.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list