Select to view content in your preferred language

Draw polygon feature when ever use click on the map

4203
15
Jump to solution
04-14-2017 10:25 AM
Sai_AnandPeketi1
Deactivated User

Hi everyone,

                 I am using this example for creating the buffer and passing the geometry into feature layer by using applyedits function. 

 Now, I want to use editing widget tool but not need to change or add the vertices to that draw feature.  By passing the geometry to the featurelayer.applyedits function I cannot control on the geometry. Which say i can move the draw geometry into any direction. I need some help for how to achieve this.

Thanks for the help.

0 Kudos
15 Replies
RobertScheitlin__GISP
MVP Emeritus

for what reason?

0 Kudos
Sai_AnandPeketi1
Deactivated User

Actually, I set a switch case for the geometry. So, Whenever need to change the geometry type. Im reset the function and calling once again at that time the click handler id is updating and result is getting twice the geometry with same click. the function dobuffer was calling with respect to the clickHandler.Id. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Make sure you remove the click handler before you you add it again then

0 Kudos
Sai_AnandPeketi1
Deactivated User

Thanks Robert. 

My question was same how can i remove the click handler. I am doing like this , but no luck it was updating the id of clickhandler event.

clickHandler = null; 
clickHandler = on.pausable(map, "click", doBuffer);

I am newbie to javascript, this will help me to go ahead.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus
clickHandler.remove();
Sai_AnandPeketi1
Deactivated User

Thanks Robert

0 Kudos