Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want put OpenLayers controls outside a map but dont know how. I find this example http://openlayers.org/dev/examples/editingtoolbar-outside.html but its not what i want. I have a button and want to edit my WFS layer by click this button. So i need in

OpenLayers.Control.ModifyFeature(wfs, {
    title: "Modify Feature",
    displayClass: "olControlModifyFeature"
});

So how to put this in button? And i use a geoext.

share|improve this question
add comment

2 Answers

I did not go through that problem yet, but what you are asking maybe similar to this: http://lists.osgeo.org/pipermail/openlayers-users/2007-October/003093.html

regards, Joaquim Muchaxo. Portugal.

share|improve this answer
    
How can i see in your example control panel putting outside a map. But i want to call OpenLayers.Control.ModifyFeature by click on Extjs button. –  Kliver Max Jul 13 '12 at 3:46
    
Hi I have not used ExtJs to have experience to help you on that, however I can help with OL so maybe if you post more of your code, perhaps I or someone else can help. –  muchaxo Jul 13 '12 at 17:43
add comment
up vote 1 down vote accepted

Solution :

                         editButton= new Ext.Button({
                                tooltip: "Edit",
                                id: "commit_changes",
                                text: "Edit",
                                hidden: false,
                                handler: function(){
create= new OpenLayers.Control.DrawFeature(myVecLayer,
                                            OpenLayers.Handler.Polygon);
                                    app.mapPanel.map.addControl(create);
                                    create_cont=app.mapPanel.map.getControlsByClass("OpenLayers.Control.DrawFeature");
                                }

                           }

Something like this. Some controls needed for activate option.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.