<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
If you mean "export the features as text" then you need to pick
a format in which you want to export your data, for example
GeoJSON, KML, etc. Here's a live example doing it in KML :<br>
<br>
<a class="moz-txt-link-freetext" href="http://dev.geoext.org/geoext/sandbox/redlining/ux/FeatureEditing/examples/ControlerOnlyExample.html">http://dev.geoext.org/geoext/sandbox/redlining/ux/FeatureEditing/examples/ControlerOnlyExample.html</a><br>
<br>
Start by drawing a feature (any first 3 tools). A popup will
appear in which there's an export button at the bottom left of the
bottom toolbar. You could also use the one in the map toolbar.
Here's the code that actualy does the KML writing :<br>
<br>
<a class="moz-txt-link-freetext" href="http://dev.geoext.org/geoext/sandbox/redlining/ux_externals/layermanager/ux/data/Export.js">http://dev.geoext.org/geoext/sandbox/redlining/ux_externals/layermanager/ux/data/Export.js</a><br>
<br>
Feel free to use any portion of this widget.<br>
<br>
HTH,<br>
<br>
Alexandre<br>
<br>
<br>
On 12-11-21 03:19 AM, nacho barandalla wrote:<br>
</div>
<blockquote cite="mid:SNT107-W6CBDF0013D6E8027F60CDBE540@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@geoext.org">Users@geoext.org</a>
<a class="moz-txt-link-freetext" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Dubé
Mapgears
<a class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
</body>
</html>