1

this is the setup of the FeatureLayer:

 on(MallaFeatureLayer.getFeatureLayer(), "before-apply-edits", lang.hitch(this, this.asignarUnidadLecturaMalla));

how could I link it to a button?

1 Answer 1

1

To link an action with a button your need to add your button to your html page

<button id="select" data-dojo-type="dijit/form/Button">Sélectionner une zone</button>

After go to your map.js :

var selectionTool = dijit.byId("select");
    selectionTool.on("click",startSelect);

you declare your button with dijit.byid and after active the event on click to go to a function who provide your action/ call to a module :

function startSelect(){
        select.activate(Draw.POLYGON);
    };

hope i anser to your question if not give us precisions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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