Yep, that was the case, I had a geometry and tried to build GML out of it without creating the feature first. Silly me. Now it's working.
Thanks, mika > > var gml = new OpenLayers.Format.GML().write(features); > > If you have your features on a layer, you can access them by saying > layer.features. *If you just have a geometry, you have to create a > feature with that geometry first*, e.g. > > var feature = new OpenLayers.Feature.Vector(geometry); > var gml = new OpenLayers.Format.GML().write([feature]); > > Regards, > Andreas. > > On Tue, Sep 9, 2008 at 10:26 PM, Lehtonen, Mika <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> one more beginners question: >> >> If I have let's say a Point Geometry in OL. How can I serialize or build >> a GML out of it. I tried it in many ways, but didn't succeed. >> >> - mika - >> _______________________________________________ >> Users mailing list >> [email protected] >> http://openlayers.org/mailman/listinfo/users >> >> _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
