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?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communitythis 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?
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.