<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Freehand polygon drawing with SketchViewModel - change the default active drawing segment rendering? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322705#M82082</link>
    <description>&lt;P&gt;i saw that and tried it. thank you - your suggestion worked!&lt;/P&gt;&lt;P&gt;one thing is the cursor still has a dangling orange circle that follows wherever the cursor goes.&amp;nbsp; do you know if that is another undocumented property on sketchviewmodel that could be manipulated similarly?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_0-1692997393977.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/79193i2B19A815FACED038/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanTiu_0-1692997393977.png" alt="JonathanTiu_0-1692997393977.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 21:05:02 GMT</pubDate>
    <dc:creator>JonathanTiu</dc:creator>
    <dc:date>2023-08-25T21:05:02Z</dc:date>
    <item>
      <title>Freehand polygon drawing with SketchViewModel - change the default active drawing segment rendering?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1320384#M82031</link>
      <description>&lt;P&gt;When using the SketchViewModel and drawing a freehand polygon in Esri 4.x, i see it renders all these little circles (vertices?) of the active drawing segment being drawn. It looks very busy and quite jarring.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_1-1692421435767.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78574iA1AB3C8903544A3D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanTiu_1-1692421435767.png" alt="JonathanTiu_1-1692421435767.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In our Esri 3.x application, when we are drawing, we are able to just render a plain line as we draw the freehand polygon which is very nice.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_0-1692421376907.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78573i035B7C50D0475A1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanTiu_0-1692421376907.png" alt="JonathanTiu_0-1692421376907.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to customize .&amp;nbsp; Those little circles for each vertex are quite annoying and are completely different from what we were able to render with our 3.x application.&amp;nbsp; we are trying to migrate to 4.x and maintain the same UI feedback as a requirement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Aug 2023 05:08:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1320384#M82031</guid>
      <dc:creator>JonathanTiu</dc:creator>
      <dc:date>2023-08-19T05:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Freehand polygon drawing with SketchViewModel - change the default active drawing segment rendering?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1320809#M82044</link>
      <description>&lt;P&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html" target="_self"&gt;SketchViewModel&lt;/A&gt;&amp;nbsp;has an undocumented property called "vertexSymbol" which, by default, it is set to a circular &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html" target="_self"&gt;SimpleMarkerSymbol&lt;/A&gt;&amp;nbsp;with a white background and a dark grey border.&amp;nbsp; I would recommend setting the opacity of the symbol in order to show and hide it as desired:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function hideVertexSymbol(sketchViewModel) {
	sketchViewModel.set("vertexSymbol.outline.color.a", 0);
	sketchViewModel.set("vertexSymbol.color.a", 0);
}

function showVertexSymbol(sketchViewModel) {
	sketchViewModel.set("vertexSymbol.outline.color.a", 1);
	sketchViewModel.set("vertexSymbol.color.a", 1);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 17:27:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1320809#M82044</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-08-21T17:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Freehand polygon drawing with SketchViewModel - change the default active drawing segment rendering?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322628#M82080</link>
      <description>&lt;P&gt;I don't see a set() api on SketchViewModel? is it just a direct access&lt;/P&gt;&lt;P&gt;ie.&amp;nbsp; &amp;nbsp;sketchViewModel.vertexSymbol ?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 18:34:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322628#M82080</guid>
      <dc:creator>JonathanTiu</dc:creator>
      <dc:date>2023-08-25T18:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Freehand polygon drawing with SketchViewModel - change the default active drawing segment rendering?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322675#M82081</link>
      <description>&lt;P&gt;SketchViewModel extends &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html" target="_self"&gt;Accessor&lt;/A&gt;, and therefore has the "&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#set" target="_self"&gt;set&lt;/A&gt;" method.&amp;nbsp; More info &lt;A href="https://developers.arcgis.com/javascript/latest/implementing-accessor/" target="_self"&gt;here&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/javascript/latest/programming-patterns/#properties" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 19:59:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322675#M82081</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-08-25T19:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Freehand polygon drawing with SketchViewModel - change the default active drawing segment rendering?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322705#M82082</link>
      <description>&lt;P&gt;i saw that and tried it. thank you - your suggestion worked!&lt;/P&gt;&lt;P&gt;one thing is the cursor still has a dangling orange circle that follows wherever the cursor goes.&amp;nbsp; do you know if that is another undocumented property on sketchviewmodel that could be manipulated similarly?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_0-1692997393977.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/79193i2B19A815FACED038/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonathanTiu_0-1692997393977.png" alt="JonathanTiu_0-1692997393977.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 21:05:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322705#M82082</guid>
      <dc:creator>JonathanTiu</dc:creator>
      <dc:date>2023-08-25T21:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Freehand polygon drawing with SketchViewModel - change the default active drawing segment rendering?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322737#M82084</link>
      <description>&lt;P&gt;I have a fix for that, but it involves modifying a file on a locally hosted copy of the SDK.&amp;nbsp; That is, I &lt;A href="https://developers.arcgis.com/downloads/#javascript" target="_self"&gt;download&lt;/A&gt; and host a copy of the SDK on our own servers rather than using ESRI's server at runtime.&amp;nbsp; Here are my notes, which are specific to 4.27 (although may work in previous version as well):&lt;/P&gt;&lt;DIV&gt;esri/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Prevent vertex symbol from appearing with mouse cursor when using a freehand drawing tool.&lt;/DIV&gt;&lt;DIV&gt;Note: this behavior started in 4.21.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Search for:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.internalGraphicsLayer.add(this._visualElementGraphics.activeVertex);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Replace with:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if(this.get("drawOperation.drawingMode.updating"))this.internalGraphicsLayer.add(this._visualElementGraphics.activeVertex);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 23:00:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322737#M82084</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-08-25T23:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Freehand polygon drawing with SketchViewModel - change the default active drawing segment rendering?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322754#M82085</link>
      <description>&lt;P&gt;Interesting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attempted a variation of your fix without requiring modifying&amp;nbsp;&lt;SPAN&gt;DrawGraphicTool2D.js.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;basically i try to detect as it's moving, and try to remove the&amp;nbsp;activeVertex element.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;it almost works except it now draws a very very small circle under the cursor!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;mapView&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;on&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'pointer-move'&lt;/SPAN&gt;&lt;SPAN&gt;, (&lt;/SPAN&gt;&lt;SPAN&gt;_event&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;any&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;drawTool&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;sketchViewModelRef&lt;/SPAN&gt;&lt;SPAN&gt;?.&lt;/SPAN&gt;&lt;SPAN&gt;current&lt;/SPAN&gt;&lt;SPAN&gt;?.&lt;/SPAN&gt;&lt;SPAN&gt;activeComponent&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;drawTool&lt;/SPAN&gt; &lt;SPAN&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; &lt;SPAN&gt;!&lt;/SPAN&gt;&lt;SPAN&gt;drawTool&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;get&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"drawOperation.drawingMode.updating"&lt;/SPAN&gt;&lt;SPAN&gt;)) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;drawTool&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;internalGraphicsLayer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;remove&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;drawTool&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;_visualElementGraphics&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;activeVertex&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 26 Aug 2023 04:32:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1322754#M82085</guid>
      <dc:creator>JonathanTiu</dc:creator>
      <dc:date>2023-08-26T04:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Freehand polygon drawing with SketchViewModel - change the default active drawing segment rendering?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1323084#M82092</link>
      <description>&lt;P&gt;That's a different problem in a different module, which I also fix in the local copy.&amp;nbsp; My notes on it (specific to 4.27) are below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;esri/views/draw/DrawGraphicTool.js&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Prevent empty polygon from following mouse cursor around when starting a sketch using the regular or freehand polygon drawing tools.&lt;/DIV&gt;&lt;DIV&gt;Note that this issue doesn't apply to rectangles or circles.&lt;/DIV&gt;&lt;DIV&gt;This behavior evidently started in 4.25.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Search for:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;h._createOrUpdateGraphic=function(a){&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Replace with:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;h._createOrUpdateGraphic=function(a){if((a)&amp;amp;&amp;amp;(a.type=="polygon")&amp;amp;&amp;amp;((a.rings.length===0)||(a.rings[0].length&amp;lt;3)))return;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 17:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/freehand-polygon-drawing-with-sketchviewmodel/m-p/1323084#M82092</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-08-28T17:29:17Z</dc:date>
    </item>
  </channel>
</rss>

