<?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: Draw a rectangle in JSAPI 4.x in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30834#M2536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;view.on(...) returns a handle.&amp;nbsp; The handle has a remove method, which will remove the listener.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you could do something like: var handle = view.on("drag", ...);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then call handle.remove() when you're done with the listener.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Nov 2017 19:15:26 GMT</pubDate>
    <dc:creator>ThomasSolow</dc:creator>
    <dc:date>2017-11-16T19:15:26Z</dc:date>
    <item>
      <title>Draw a rectangle in JSAPI 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30830#M2532</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;It was exciting to see the new Draw tools added in JSAPI 4.5, but I'm wondering how to limit the user to drawing a rectangle like we can do in 3.x. &amp;nbsp;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--john&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Oct 2017 00:52:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30830#M2532</guid>
      <dc:creator>JohnCartwright3</dc:creator>
      <dc:date>2017-10-08T00:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangle in JSAPI 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30831#M2533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Currently in 4.5 there are only 3 draw actions permitted:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PointDrawAction.html" style="color: #0079c1; background-color: #ffffff; text-decoration: none;"&gt;PointDrawAction&lt;/A&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;|&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolygonDrawAction.html" style="color: #0079c1; background-color: #ffffff; text-decoration: none;"&gt;PolygonDrawAction&lt;/A&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;|&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-draw-PolylineDrawAction.html" style="color: #0079c1; background-color: #ffffff; text-decoration: none;"&gt;PolylineDrawAction&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drawing an extent is not mentioned at all in the &lt;A href="https://developers.arcgis.com/javascript/latest/guide/functionality-matrix/index.html"&gt;Functionality Matrix&lt;/A&gt;&amp;nbsp;but it is most likely one of those coming soon items.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Oct 2017 14:09:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30831#M2533</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-10-08T14:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangle in JSAPI 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30832#M2534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An extent or a rectangle? &amp;nbsp;The difference is that an extent will always be oriented based on the surface of the world, whereas a rectangle could be oriented however you like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To draw an extent, you can do something simple like this (click and drag to draw):&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/kebiqerubo/edit?html,output" title="https://jsbin.com/kebiqerubo/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I imagine extents will be added to the drawing tools at some point.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2017 13:37:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30832#M2534</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-10-09T13:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangle in JSAPI 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30833#M2535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can the listener be turned off after the initial extent is drawn?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 19:09:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30833#M2535</guid>
      <dc:creator>deleted-user-z9OjN-EoUVWn</dc:creator>
      <dc:date>2017-11-16T19:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangle in JSAPI 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30834#M2536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;view.on(...) returns a handle.&amp;nbsp; The handle has a remove method, which will remove the listener.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you could do something like: var handle = view.on("drag", ...);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then call handle.remove() when you're done with the listener.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 19:15:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30834#M2536</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-11-16T19:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangle in JSAPI 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30835#M2537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for that info.&amp;nbsp; I had&amp;nbsp;to add the remove method within an additional else if condition to get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;} else if (e.action === "end") {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;handle.remove();&lt;BR /&gt;} ;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 19:28:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/draw-a-rectangle-in-jsapi-4-x/m-p/30835#M2537</guid>
      <dc:creator>deleted-user-z9OjN-EoUVWn</dc:creator>
      <dc:date>2017-11-16T19:28:50Z</dc:date>
    </item>
  </channel>
</rss>

