Drawing polygon problem

320
3
Jump to solution
02-13-2020 05:04 AM
HaticeKorkulu2
New Contributor II

Hi,

We want to create a polygon in the application that we created with ArcGIS API for Javascript.
However, when we want to zoom in-out or pan while drawing a polygon, it does not allow these steps and it still continue to enter vertex.
I attached video about our problem. You can see that we tried zoom out after 8 second and pan it after 14 second on the map.

Please let me know if you have any ideas, how we can we figure out this situation.Thank you!

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

Are you trying to zoom and pan on the touch devices? If so then it is not possible to do so when you are creating graphics with hybrid or freehand create modes. You need to set the create mode to click as shown below and you should be able to pan and zoom in/out while creating the graphic. 

 sketchViewModel.create("polygon", {mode: "click"});

-Undral

View solution in original post

3 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

Are you trying to zoom and pan on the touch devices? If so then it is not possible to do so when you are creating graphics with hybrid or freehand create modes. You need to set the create mode to click as shown below and you should be able to pan and zoom in/out while creating the graphic. 

 sketchViewModel.create("polygon", {mode: "click"});

-Undral

View solution in original post

HaticeKorkulu2
New Contributor II

Hi Undral,

You're right, we use with touch devices. We tried your advice, now it is better than before. Thank you for your helps!

Hati

0 Kudos
HaticeKorkulu2
New Contributor II

Hi Undral Batsukh,

We have another problem. When we changed the system as what you said, we got problem for samsung devices.iOS and Xaimo devices is ok.

Before when we used this sketchViewModel.create("polygon"); everyting is ok for all devices.

After we change like this sketchViewModel.create("polygon", { mode: 'click' }); we have a problem about click event with samsung devices to draw polygon.

I also attached our app link: https://iotapiw.hektas.com.tr/Home/FarmView

Do you have any idea? What should we do?

Thank you,

Hati

0 Kudos