disable the drawbox used in Draw widget and again enable it on check of checkbox in Web App builder

2768
4
12-21-2015 04:31 AM
IrisGreen
New Contributor

Hi All,

I need to disable the  drawbox used in Draw widget of and again enable it on check of checkbox .

Please suggest any ideas.

Thanks In Advance.

Iris

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Iris,

  In the widget use this code "this.drawBox.deactivate();" then you can use "this,drawBox.activate('POINT');

0 Kudos
IrisGreen
New Contributor

Hi Robert,

I tried adding the line of code in 'onOpen' method (as I want the drawbox to remain deactivated after opening too), however the drawBox still remains activated and I can draw graphics on the map.

Thanks

Iris

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Iris,

   OK, I am not sure I understand what you are doing then. The OTB Draw widget does not have any of the draw tools active when it first opens. So maybe you should go into more detail of your workflow and idea.

0 Kudos
IrisGreen
New Contributor

Sure , thanks !

0 Kudos