<?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: Can I set starting geometry for SketchViewModel? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1107029#M74952</link>
    <description>&lt;P&gt;Thanks for the follow-up, Arno. That's an interesting idea to stick with &lt;FONT face="courier new,courier"&gt;SceneView&lt;/FONT&gt; and move the camera to give a top-down view. Our app switches between the 2D &lt;FONT face="courier new,courier"&gt;MapView&lt;/FONT&gt; and the 3D &lt;FONT face="courier new,courier"&gt;SceneView&lt;/FONT&gt;, and it would take some major rework to remove the 2D &lt;FONT face="courier new,courier"&gt;MapView&lt;/FONT&gt;, so I don't think we're going to do that just to get the ability to keep drawing the existing graphic when switching between 2D and 3D. But this is small stuff that we can live without. Frankly I'm impressed at how well &lt;FONT face="courier new,courier"&gt;SketchViewModel&lt;/FONT&gt; works in 3D as well as 2D. It has saved me a lot of time.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Oct 2021 13:05:29 GMT</pubDate>
    <dc:creator>GaryLSheppardJr</dc:creator>
    <dc:date>2021-10-13T13:05:29Z</dc:date>
    <item>
      <title>Can I set starting geometry for SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1106009#M74920</link>
      <description>&lt;P&gt;&lt;FONT size="6"&gt;Question&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;When activating &lt;FONT face="courier new,courier"&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html" target="_blank" rel="noopener"&gt;SketchViewModel&lt;/A&gt;&lt;/FONT&gt; by calling &lt;FONT face="courier new,courier"&gt;sketchViewModel.create('polyline')&lt;/FONT&gt;, is it possible to give it a starting geometry programmatically so that the sketch starts with one or more vertices before the user clicks the map or scene? If it is possible, how is it done?&lt;/P&gt;&lt;P&gt;&lt;FONT size="6"&gt;Use case&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The use case is that I'm adding &lt;FONT face="courier new,courier"&gt;SketchViewModel&lt;/FONT&gt; to an existing application that allows the user to switch between 2D mode (&lt;FONT face="courier new,courier"&gt;MapView&lt;/FONT&gt;) and 3D mode (&lt;FONT face="courier new,courier"&gt;SceneView&lt;/FONT&gt;). It's working really well for allowing the user to draw graphics in both 2D mode and 3D mode and see the graphics after switching the mode. When the mode changes, I recreate the &lt;FONT face="courier new,courier"&gt;SketchViewModel&lt;/FONT&gt;&amp;nbsp;object with the new view and call &lt;FONT face="courier new,courier"&gt;sketchViewModel.create('polyline')&lt;/FONT&gt;&amp;nbsp;to resume drawing. That works, but the current in-progress sketch disappears, of course. I would like to let the user continue the sketch after the 2D/3D switch. That's why I need to know if I can give &lt;FONT face="courier new,courier"&gt;SketchViewModel&lt;/FONT&gt; a starting geometry before turning it over to the user.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 17:06:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1106009#M74920</guid>
      <dc:creator>GaryLSheppardJr</dc:creator>
      <dc:date>2021-10-08T17:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set starting geometry for SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1106140#M74921</link>
      <description>&lt;P&gt;This should work. See this sample app that creates a point, line, and polygon graphic. Just create the geometry and add it to the GraphicsLayer the SketchViewModel is using.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/graphics-basic-3d/" target="_blank"&gt;Add Graphics to a SceneView | ArcGIS API for JavaScript 4.21 | ArcGIS Developer&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 20:36:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1106140#M74921</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-10-08T20:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set starting geometry for SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1106439#M74926</link>
      <description>&lt;P&gt;Gary, for this use-case, I would take the Graphic that is currently being edited in the previous view and re-created it in the GraphicsLayer being used by the SketchViewModel of the new view, then instead of 'create', call 'update' using the new Graphic you just re-created in this new view.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 15:36:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1106439#M74926</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2021-10-11T15:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set starting geometry for SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1106998#M74949</link>
      <description>&lt;P&gt;It's true that you can add any graphic to the layer, including the one that was just being drawn. But then it's a finished graphic like any other, which is not really what I need. But thank you for the idea and the graphics sample link.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 11:49:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1106998#M74949</guid>
      <dc:creator>GaryLSheppardJr</dc:creator>
      <dc:date>2021-10-13T11:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set starting geometry for SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1106999#M74950</link>
      <description>&lt;P&gt;Thanks, John. Your idea might be as good as it gets. The result is that it's a finished graphic but it is selected for updating. It saves the user a click anyway. It's not exactly what I wanted--it would be great if the user could just keep drawing the unfinished graphic--but it's not bad. I appreciate the idea.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 11:51:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1106999#M74950</guid>
      <dc:creator>GaryLSheppardJr</dc:creator>
      <dc:date>2021-10-13T11:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set starting geometry for SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1107001#M74951</link>
      <description>&lt;P&gt;Interesting scenario Gary! As John already pointed out, your best option at the moment is to add the starting geometry as a new Graphic to the SketchViewModel.layer and call SketchViewModel.update().&lt;/P&gt;&lt;P&gt;We realize that updating a geometry is different to creating a new one where you continuously place vertices. In the future we would like bring these two user experiences closer together, providing a way to update existing features using a create-like mode. No concrete timeline for that yet though.&lt;/P&gt;&lt;P&gt;Are you able to share more about the different 2D/3D modes? In what way do they differ from each other? Would you be able to achieve the same changing the camera to a top-down view, without interrupting the SketchViewModel workflow?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 11:53:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1107001#M74951</guid>
      <dc:creator>ArnoFiva</dc:creator>
      <dc:date>2021-10-13T11:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can I set starting geometry for SketchViewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1107029#M74952</link>
      <description>&lt;P&gt;Thanks for the follow-up, Arno. That's an interesting idea to stick with &lt;FONT face="courier new,courier"&gt;SceneView&lt;/FONT&gt; and move the camera to give a top-down view. Our app switches between the 2D &lt;FONT face="courier new,courier"&gt;MapView&lt;/FONT&gt; and the 3D &lt;FONT face="courier new,courier"&gt;SceneView&lt;/FONT&gt;, and it would take some major rework to remove the 2D &lt;FONT face="courier new,courier"&gt;MapView&lt;/FONT&gt;, so I don't think we're going to do that just to get the ability to keep drawing the existing graphic when switching between 2D and 3D. But this is small stuff that we can live without. Frankly I'm impressed at how well &lt;FONT face="courier new,courier"&gt;SketchViewModel&lt;/FONT&gt; works in 3D as well as 2D. It has saved me a lot of time.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 13:05:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-set-starting-geometry-for-sketchviewmodel/m-p/1107029#M74952</guid>
      <dc:creator>GaryLSheppardJr</dc:creator>
      <dc:date>2021-10-13T13:05:29Z</dc:date>
    </item>
  </channel>
</rss>

