I'm currently working with POLYLINE, and I want to make a straight line and when I edit that line it shouldn't show 3 vertices. Having mid-point vertex, the user may move that vertex and the line will become polyline. Please help me with this one I am a beginner in ARCGIS javascript. Thank you
Thank you!
Hi there,
It cannot be done. However, you can disable the reshape operation while only leaving the transform operation enabled as shown below:
<SPAN class="keyword token">const</SPAN> sketch <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">Sketch</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN> layer<SPAN class="punctuation token">:</SPAN> layer<SPAN class="punctuation token">,</SPAN> view<SPAN class="punctuation token">:</SPAN> view<SPAN class="punctuation token">,</SPAN> creationMode<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"update"</SPAN><SPAN class="punctuation token">,</SPAN> defaultUpdateOptions<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN> toggleToolOnClick<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">,</SPAN> tool<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"transform"</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Here is a test app shows how it is done: https://codepen.io/U_B_U/pen/ExVBvZK?editors=1000
Hope this helps,
-Undral
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.