<?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: How can we change draw type of Editor Widget in JS API 4.x using Editor's ViewModel::SketchViewModel? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1539842#M85708</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/129432"&gt;@Vara_PrasadM_S&lt;/a&gt;&amp;nbsp;. Can you share your code for the custom widget? Is it a lot of effort?&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2024 06:19:55 GMT</pubDate>
    <dc:creator>calin_gi</dc:creator>
    <dc:date>2024-09-18T06:19:55Z</dc:date>
    <item>
      <title>How can we change draw type of Editor Widget in JS API 4.x using Editor's ViewModel::SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1525853#M85461</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Our requirement is to provide additional Draw Tools like - Circle, Rectangle, Ellipse etc, when a template is selected in Editor Widget (JS API 4.X). I tried to use Editor's viewModel (of type, EditorViewModel) property of Editor Widget and from that, use sketchViewModel property (of type, SketchViewModel) and call its "cancel" function (to cancel selected polygon tool - which is default) and call "create" function by passing the desired tool name as parameter (such as "circle").&lt;/P&gt;&lt;P&gt;Still, no change in the flow and same Polygon tool is continued to be active and could not draw any other shape.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could not understand where Im going wrong. I did not find much help/documentation on how to use the view models of Editor and its SketchViewModel. I also tried setting new instance of SketchViewModel, still no use.&lt;/P&gt;&lt;P&gt;Any help would be highly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Vara Prasad&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 15:21:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1525853#M85461</guid>
      <dc:creator>Vara_PrasadM_S</dc:creator>
      <dc:date>2024-08-22T15:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can we change draw type of Editor Widget in JS API 4.x using Editor's ViewModel::SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1532253#M85555</link>
      <description>&lt;P&gt;Hi Vara,&lt;/P&gt;&lt;P&gt;have you tried this property:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html#supportingWidgetDefaults&lt;/A&gt;&lt;/P&gt;&lt;P&gt;we used successfully to set defaultUpdateOptions and defaultCreateOptions, maybe this could help you too.&lt;/P&gt;&lt;P&gt;Andre&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 09:17:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1532253#M85555</guid>
      <dc:creator>AndreV</dc:creator>
      <dc:date>2024-08-30T09:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can we change draw type of Editor Widget in JS API 4.x using Editor's ViewModel::SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1538781#M85680</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/40167"&gt;@AndreV&lt;/a&gt;&amp;nbsp;, Thank you for your response. I have gone through 'defaultUpdateOptions' and 'defaultCreateOptions'. I did not find any option to set the draw type as Circle or Ellipse.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 05:24:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1538781#M85680</guid>
      <dc:creator>Vara_PrasadM_S</dc:creator>
      <dc:date>2024-09-16T05:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: How can we change draw type of Editor Widget in JS API 4.x using Editor's ViewModel::SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1538785#M85681</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/129432"&gt;@Vara_PrasadM_S&lt;/a&gt;&amp;nbsp;. I have the same issue. I didn't find a solution (yet), but as a workaround I listen to the sketch-create event on the Editor widget. Here I will draw an additional graphic as circle in the graphicslayer on state = active and on state=complete I change out the polygon geometry for a circle. I do this when the user has drawn three vertices. You can just use the first point as center point and the length of the first segment as radius, alternatively you can find the center point and radius by a formula of a circle going through the three vertices. When the user draws more vertices I go back to standard functionality. This way, at least a circle can be drawn, but as an added bonus a polygon as well.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 06:26:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1538785#M85681</guid>
      <dc:creator>calin_gi</dc:creator>
      <dc:date>2024-09-16T06:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can we change draw type of Editor Widget in JS API 4.x using Editor's ViewModel::SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1539817#M85707</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/512800"&gt;@calin_gi&lt;/a&gt;, Thank you so much for the work around. I implemented it. However, I had to follow another approach for single graphic while creating a new feature. So, I had created a custom widget, where I used the FeaturesTemplate widget and on select event, gave option to select tool from Sketch Widget, and then upon creating the graphic, pushed the feature to DB through applyEdits call.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Vara Prasad&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 04:19:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1539817#M85707</guid>
      <dc:creator>Vara_PrasadM_S</dc:creator>
      <dc:date>2024-09-18T04:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can we change draw type of Editor Widget in JS API 4.x using Editor's ViewModel::SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1539842#M85708</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/129432"&gt;@Vara_PrasadM_S&lt;/a&gt;&amp;nbsp;. Can you share your code for the custom widget? Is it a lot of effort?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 06:19:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-can-we-change-draw-type-of-editor-widget-in-js/m-p/1539842#M85708</guid>
      <dc:creator>calin_gi</dc:creator>
      <dc:date>2024-09-18T06:19:55Z</dc:date>
    </item>
  </channel>
</rss>

