[Users] how to include a download button for downloadind a vector layer with lines/pol draw by user
nacho barandalla
nachobarandalla at hotmail.com
Wed Nov 21 09:19:36 CET 2012
Hi everyone, 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.) My question is how to include a download button for downloadind a vector layer with lines/pol draw by user. explain: I have a map developed with geoext with several functions. 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!The idea is to create a json layer and browse to save it in local user pc.... Some help or idea please? Thanks a lot My code is: var vector = new OpenLayers.Layer.Vector("vector1");
map.addLayers([vector]); var ctrl, toolbarItems = [], action, actions = {}; action = new GeoExt.Action({
text: "Dibuja polígono",
control: new OpenLayers.Control.DrawFeature(
vector, OpenLayers.Handler.Polygon
),
map: map,
// button options
toggleGroup: "draw",
allowDepress: true,
tooltip: "draw polygon",
// check item options
group: "draw"
});
actions["draw_poly"] = action;
toolbarItems.push(action);
Thank again!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20121121/7571afff/attachment.htm
More information about the Users
mailing list