AnsweredAssumed Answered

Create a button to meaure an area

Question asked by MayMay on Jul 29, 2014
Latest reply on Jul 30, 2014 by MayMay


I try to modify a sample by creating a button and see here: Edit fiddle - JSFiddle

Not sure how to create a button to call the following code:

Original one:

map.on("load", function() {

        var tb = new Draw(map);

        tb.on("draw-end", lang.hitch(map, getAreaAndLength));

        tb.activate(Draw.FREEHAND_POLYGON);

      });

 

Please help.  Thanks.

 

 

Outcomes