<?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: Restrict geographical area in which features on a layer can be accessed in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1123970#M75523</link>
    <description>&lt;P&gt;Bingo, that makes sense to me and sounds feasible.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Dec 2021 19:08:07 GMT</pubDate>
    <dc:creator>Noah-Sager</dc:creator>
    <dc:date>2021-12-08T19:08:07Z</dc:date>
    <item>
      <title>Restrict geographical area in which features on a layer can be accessed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1123834#M75516</link>
      <description>&lt;P&gt;I need to be able to restrict what features on a layer a user can see based on their geographical location.&lt;/P&gt;&lt;P&gt;Here's the scenario: this is for contractor management for my company. A contractor needs to be restricted to a geographical area, most often a state (but sometimes it will be a polygon drawn from another layer) and only see features from the map's feature layers within that geographical area. So if they're restricted to Ohio, they need to not be able to see features in Indiana, Kentucky, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to set a layer to only display features within a certain geometry?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 15:17:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1123834#M75516</guid>
      <dc:creator>jbarrmetro</dc:creator>
      <dc:date>2021-12-08T15:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict geographical area in which features on a layer can be accessed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1123861#M75519</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/493893"&gt;@jbarrmetro&lt;/a&gt;,&amp;nbsp;for this, you should be able to use a query with the FeatureLayer against the geometry of interest.&lt;/P&gt;&lt;P&gt;If it's a hosted FeatureLayer, you can use the queryExtent() method on the FeatureLayer:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryExtent" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryExtent&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If it's not, you can use the executeQueryJSON() method:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-query.html#executeQueryJSON" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-query.html#executeQueryJSON&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 16:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1123861#M75519</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2021-12-08T16:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict geographical area in which features on a layer can be accessed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1123897#M75520</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/169842"&gt;@Noah-Sager&lt;/a&gt;&amp;nbsp;let me see if I'm understanding a possible path forward here based on your reply:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a feature layer from the feature service URL (we have our own hosted server)&lt;/LI&gt;&lt;LI&gt;Create a geometry for the query based on relevant information about the user (i.e. the area they have permission to view)&lt;/LI&gt;&lt;LI&gt;Query against the feature layer using the queryExtent method and the constructed geometry (use "intersects" for the spatial relationship, probably?)&lt;/LI&gt;&lt;LI&gt;Use the results of that query to construct a new (client-side?) feature layer&lt;/LI&gt;&lt;LI&gt;Attach that layer to the map&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Does that make sense? Sound feasible?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 17:14:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1123897#M75520</guid>
      <dc:creator>jbarrmetro</dc:creator>
      <dc:date>2021-12-08T17:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict geographical area in which features on a layer can be accessed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1123970#M75523</link>
      <description>&lt;P&gt;Bingo, that makes sense to me and sounds feasible.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 19:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1123970#M75523</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2021-12-08T19:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Restrict geographical area in which features on a layer can be accessed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1124909#M75558</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/169842"&gt;@Noah-Sager&lt;/a&gt;&amp;nbsp;ok, thanks! Any suggestions on what to do if I run out of room on the 2000 feature limit for a query (as seems entirely possible when querying a whole state)? How do I re-query in a way that doesn't just get duplicate results from the first query?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 16:31:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/restrict-geographical-area-in-which-features-on-a/m-p/1124909#M75558</guid>
      <dc:creator>jbarrmetro</dc:creator>
      <dc:date>2021-12-10T16:31:42Z</dc:date>
    </item>
  </channel>
</rss>

