Hello Mohammed, Look at the OpenLayers.Format classes.
Here's a link to the geojson format example: http://dev.openlayers.org/apidocs/files/OpenLayers/Format/GeoJSON-js.html You will probably do something like: var format = new OpenLayers.Format.GeoJSON(); // given that 'layer' is a vector layer attached to the map with some features: var jsonstring = format.write( layer.features ); // given that 'txtarea' is an HTML textarea element somewhere in your page to display the geojson: txtarea.value = jsonstring; There's no way to save the file directly via openlayers (opening a "Save File..." dialog), you have to do some copy & pasting from the browser. -z On Fri, Jan 21, 2011 at 8:51 AM, Mohammed Rashad <[email protected] > wrote: > How can I save a OpenLayers.Layer.Vector to a gml, geojson or any openlayer > supported formats without using > WFS or WFS- T( without geoserver,postgis); > > Is it possible? > > -- > Rashad > > _______________________________________________ > Dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-dev > >
_______________________________________________ Dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-dev
