<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi everyone,<BR> <BR>I'm not sure this is the channel to send doubts to the community....anyway, let's go! (If not, im sorry and please tell me the correct way to do it.)<BR> <BR>My question is how to include a download button for downloadind a vector layer with lines/pol draw by user. explain:<BR> <BR>I have a map developed with geoext with several functions. <BR>With the drawing controls, user is able to draw polygon and lines and stores it in a vector layer (called vector1). I need to give the user the possibility to download that vector layer containing its own draw, but I have no idea how to do it!<BR>The idea is to create a json layer and browse to save it in local user pc....<BR> <BR>Some help or idea please?<BR> <BR>Thanks a lot<BR> <BR> <BR>My code is:<BR> <BR> <BR> var vector = new OpenLayers.Layer.Vector("vector1");<br> map.addLayers([vector]);<BR> <BR> var ctrl, toolbarItems = [], action, actions = {};<BR> action = new GeoExt.Action({<br> text: "Dibuja polígono",<br> control: new OpenLayers.Control.DrawFeature(<br> vector, OpenLayers.Handler.Polygon<br> ),<br> map: map,<br> // button options<br> toggleGroup: "draw",<br> allowDepress: true,<br> tooltip: "draw polygon",<br> // check item options<br> group: "draw"<br> });<br> actions["draw_poly"] = action;<br> toolbarItems.push(action);<br><BR> <BR>Thank again!<BR> <BR>                                            </div></body>
</html>