<?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 Restricitng Feature Creation Area in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restricitng-feature-creation-area/m-p/1349109#M82759</link>
    <description>&lt;P&gt;Hi all,&lt;BR /&gt;I have been trying to limit the area in which users are able to create new features using the editor, as I want to prevent the reporting of new features outside of an actionable distance. Preferably this would not allow the user to 'drop' the graphic under the cursor after selecting 'New Feature', unless the cursor is within the allowed area. I have looked at hitTest() for implementing this functionality but haven’t found a suitable solution. I was wondering if this functionality exists natively, and if not, could anyone point me in the right direction?&lt;/P&gt;&lt;P&gt;I am currently using the Javascript Maps SDK version 4.27, but can upgrade if needed.&lt;/P&gt;&lt;P&gt;Any help with this is greatly appreciated!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Nov 2023 12:13:28 GMT</pubDate>
    <dc:creator>MQPublic</dc:creator>
    <dc:date>2023-11-14T12:13:28Z</dc:date>
    <item>
      <title>Restricitng Feature Creation Area</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restricitng-feature-creation-area/m-p/1349109#M82759</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;I have been trying to limit the area in which users are able to create new features using the editor, as I want to prevent the reporting of new features outside of an actionable distance. Preferably this would not allow the user to 'drop' the graphic under the cursor after selecting 'New Feature', unless the cursor is within the allowed area. I have looked at hitTest() for implementing this functionality but haven’t found a suitable solution. I was wondering if this functionality exists natively, and if not, could anyone point me in the right direction?&lt;/P&gt;&lt;P&gt;I am currently using the Javascript Maps SDK version 4.27, but can upgrade if needed.&lt;/P&gt;&lt;P&gt;Any help with this is greatly appreciated!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 12:13:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restricitng-feature-creation-area/m-p/1349109#M82759</guid>
      <dc:creator>MQPublic</dc:creator>
      <dc:date>2023-11-14T12:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Restricitng Feature Creation Area</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restricitng-feature-creation-area/m-p/1387277#M83766</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Seeing&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;this&lt;/SPAN&gt; &lt;SPAN&gt;never&lt;/SPAN&gt; &lt;SPAN&gt;got&lt;/SPAN&gt; &lt;SPAN&gt;any&lt;/SPAN&gt; &lt;SPAN&gt;replies&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;I&lt;/SPAN&gt;&lt;SPAN&gt;'m revisiting having implemented a working solution&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;I&lt;/SPAN&gt; &lt;SPAN&gt;ended&lt;/SPAN&gt; &lt;SPAN&gt;up&lt;/SPAN&gt; &lt;SPAN&gt;using&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt; &lt;SPAN&gt;GeoJsonLayer&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;the&lt;/SPAN&gt; &lt;SPAN&gt;visual&lt;/SPAN&gt;&lt;SPAN&gt; for &lt;/SPAN&gt;&lt;SPAN&gt;the&lt;/SPAN&gt;&lt;SPAN&gt; boundary, &lt;/SPAN&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;SPAN&gt; utilized &lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt; hitTest() to decide whether to continue to submission handling.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;bounds&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;view&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;on&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"click"&lt;/SPAN&gt;&lt;SPAN&gt;, (&lt;/SPAN&gt;&lt;SPAN&gt;event&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;opts&lt;/SPAN&gt;&lt;SPAN&gt; = {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;include&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;geoJsonBoundaryLayer&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;view&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;hitTest&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;event&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;opts&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;SPAN&gt;((&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; { &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;results&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;length&lt;/SPAN&gt;&lt;SPAN&gt;) { &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;bounds&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;remove&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;/**&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * Handle submission or other required behaviour.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * I ended up building my own submission function rather than using &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; * the included editor. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; } &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;alert&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Message to user, you are outside the boundary"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Feb 2024 09:41:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restricitng-feature-creation-area/m-p/1387277#M83766</guid>
      <dc:creator>MQPublic</dc:creator>
      <dc:date>2024-02-27T09:41:25Z</dc:date>
    </item>
  </channel>
</rss>

