<?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: 4.7 Difference between drawing polygon and circle/rectangle with sketchViewModel in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-7-difference-between-drawing-polygon-and-circle/m-p/254656#M23618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post more of your code? The SketchViewModel &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=sketch-geometries" rel="nofollow noopener noreferrer" target="_blank"&gt;sample&lt;/A&gt; shows that syntax for creating rectangles and circles working correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;// ***************************************
// activate the sketch to create a rectangle
// ***************************************
var drawRectangleButton = document.getElementById("rectangleButton");
drawRectangleButton.onclick = function() {
&amp;nbsp; // set the sketch to create a polygon geometry
&amp;nbsp; sketchViewModel.create("rectangle");
&amp;nbsp; setActiveButton(this);
};

// ***************************************
// activate the sketch to create a circle
// ***************************************
var drawCircleButton = document.getElementById("circleButton");
drawCircleButton.onclick = function() {
&amp;nbsp; // set the sketch to create a polygon geometry
&amp;nbsp; sketchViewModel.create("circle");
&amp;nbsp; setActiveButton(this);
};
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 12:34:58 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2021-12-11T12:34:58Z</dc:date>
    <item>
      <title>4.7 Difference between drawing polygon and circle/rectangle with sketchViewModel</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-7-difference-between-drawing-polygon-and-circle/m-p/254655#M23617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can draw polygon with below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;scketchViewModel.create("polygon");&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I want to draw rectangle and circle with cketchViewModel tried below codes but it seems doesn't working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;scketchViewModel.create("rectangle");&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;scketchViewModel.create("circle");&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i'm doing wrong. Is there a sample code if rectangle and circle drawing is totally different from polygon.&lt;/P&gt;&lt;P&gt;Thanks inadvance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 16:36:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-7-difference-between-drawing-polygon-and-circle/m-p/254655#M23617</guid>
      <dc:creator>TubaKumbara</dc:creator>
      <dc:date>2018-04-30T16:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: 4.7 Difference between drawing polygon and circle/rectangle with sketchViewModel</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-7-difference-between-drawing-polygon-and-circle/m-p/254656#M23618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post more of your code? The SketchViewModel &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=sketch-geometries" rel="nofollow noopener noreferrer" target="_blank"&gt;sample&lt;/A&gt; shows that syntax for creating rectangles and circles working correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;// ***************************************
// activate the sketch to create a rectangle
// ***************************************
var drawRectangleButton = document.getElementById("rectangleButton");
drawRectangleButton.onclick = function() {
&amp;nbsp; // set the sketch to create a polygon geometry
&amp;nbsp; sketchViewModel.create("rectangle");
&amp;nbsp; setActiveButton(this);
};

// ***************************************
// activate the sketch to create a circle
// ***************************************
var drawCircleButton = document.getElementById("circleButton");
drawCircleButton.onclick = function() {
&amp;nbsp; // set the sketch to create a polygon geometry
&amp;nbsp; sketchViewModel.create("circle");
&amp;nbsp; setActiveButton(this);
};
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:34:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-7-difference-between-drawing-polygon-and-circle/m-p/254656#M23618</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T12:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: 4.7 Difference between drawing polygon and circle/rectangle with sketchViewModel</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-7-difference-between-drawing-polygon-and-circle/m-p/254657#M23619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ken. thanks for reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found my code was wrong. I missed a "#" when i getting button id with jquery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my problem solved now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 06:30:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-7-difference-between-drawing-polygon-and-circle/m-p/254657#M23619</guid>
      <dc:creator>TubaKumbara</dc:creator>
      <dc:date>2018-05-02T06:30:01Z</dc:date>
    </item>
  </channel>
</rss>

