<?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: Why doesn't the rectangle option in SketchViewModel work as expected? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221132#M20515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was having trouble accessing your data so I used a sample service:&lt;/P&gt;&lt;P&gt;&lt;A href="https://jsbin.com/locogiyoba/1/edit?html,css,output"&gt;https://jsbin.com/locogiyoba/1/edit?html,css,output&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is definitely weird behavior, however I got it to work by querying the feature layer and removing the layer view all together. Let me know if this makes sense.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jul 2019 21:45:17 GMT</pubDate>
    <dc:creator>BenElan</dc:creator>
    <dc:date>2019-07-11T21:45:17Z</dc:date>
    <item>
      <title>Why doesn't the rectangle option in SketchViewModel work as expected?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221131#M20514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using an instance of&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html"&gt;SketchViewModel&lt;/A&gt;, I am having trouble getting the drawn rectangle graphic to work when querying the FeatureLayerView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you open this example and try to draw a rectangle that intersects with the point feature class, it doesn't seem to return the correct results.&amp;nbsp; usually, 0 features are returned after using the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#queryFeatures"&gt;queryFeatures&lt;/A&gt;&amp;nbsp;function on the&amp;nbsp;FeatureLayerView.&lt;/P&gt;&lt;P&gt;&lt;A href="https://jsbin.com/sotevagagu/edit?js,output"&gt;Simple JS Bin example&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the relevant code in the sample above that doesn't seem to be working properly:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;sketchVM.on("create", function (e) {&lt;BR /&gt; if (e.state === "complete") {&lt;BR /&gt; flView.queryFeatures({&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;geometry: e.graphic.geometry&lt;BR /&gt; }).then(function(data){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if (data.features.length === 0) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;alert("0 features were selected????");&lt;BR /&gt; } else {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;alert(data.features.length + 'points selected');&lt;BR /&gt; }&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(data);&lt;BR /&gt;})&lt;BR /&gt; }&lt;BR /&gt; })&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE!!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I figured out how to replicate the issue!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When drawing the rectangle, if you draw from right to left as shown in the gifs below, it will not work correctly.&amp;nbsp; If you draw from left to right, it works as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Right to left (NOT WORKING)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="373" src="https://community.esri.com/legacyfs/online/452898_pastedImage_1.gif" width="416" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left to right (WORKING)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG class="image-2 jive-image" height="379" src="https://community.esri.com/legacyfs/online/452899_pastedImage_4.gif" width="422" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, this bug seems to be present in the SketchViewModel in all versions that I tested (4.12, 4.11, etc...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 20:48:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221131#M20514</guid>
      <dc:creator>JackFairfield</dc:creator>
      <dc:date>2019-07-11T20:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the rectangle option in SketchViewModel work as expected?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221132#M20515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was having trouble accessing your data so I used a sample service:&lt;/P&gt;&lt;P&gt;&lt;A href="https://jsbin.com/locogiyoba/1/edit?html,css,output"&gt;https://jsbin.com/locogiyoba/1/edit?html,css,output&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is definitely weird behavior, however I got it to work by querying the feature layer and removing the layer view all together. Let me know if this makes sense.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 21:45:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221132#M20515</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2019-07-11T21:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the rectangle option in SketchViewModel work as expected?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221133#M20516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would greatly prefer to use the FeatureLayerView's QueryFeatures function for my use case to avoid the unnecessary network requests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you please log this as a bug?&amp;nbsp; Or do you have any suggestions as a workaround?&amp;nbsp; I am using this function in several production sites.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 23:13:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221133#M20516</guid>
      <dc:creator>JackFairfield</dc:creator>
      <dc:date>2019-07-11T23:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the rectangle option in SketchViewModel work as expected?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221134#M20517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jack,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you create a case with Esri Technical Support for this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.esri.com/en/request-case"&gt;https://support.esri.com/en/request-case&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your last bug was an equivalency issue with 4.12, which is why I expedited the process. However, when you encounter bugs we ask that you submit them to Technical Support and an analyst will assist you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 23:23:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221134#M20517</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2019-07-11T23:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the rectangle option in SketchViewModel work as expected?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221135#M20518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It has now been entered as&amp;nbsp;&lt;SPAN style="font-size: 12.0pt;"&gt;BUG-000124153 in Esri's ticketing system.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2019 16:53:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221135#M20518</guid>
      <dc:creator>JackFairfield</dc:creator>
      <dc:date>2019-07-31T16:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the rectangle option in SketchViewModel work as expected?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221136#M20519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This bug has been fixed in the 4.13 version of the API&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2019 17:41:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/why-doesn-t-the-rectangle-option-in/m-p/221136#M20519</guid>
      <dc:creator>JackFairfield</dc:creator>
      <dc:date>2019-10-11T17:41:43Z</dc:date>
    </item>
  </channel>
</rss>

