<?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: Limiting Feature Layer Popup based on another Feature Layer or Graphic? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-feature-layer-popup-based-on-another/m-p/103387#M9460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How do I override the feature layer's onclick to check if the point clicked is within the "AIP"&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are probably a couple of ways you could approach this. One might be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- add FeatureLayer1 to the map, but don't assign it an infoWindow&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- add the AIP layer/graphic to the map&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- set an onClick listener on the AIP layer, which does something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
dojo.connect(AIPlayer, "onClick", function(evt) {
&amp;nbsp; var graphic = evt.graphic;
&amp;nbsp; var attributes = evt.graphic.attributes;
&amp;nbsp; var infoTemplate = new esri.InfoTemplate;
&amp;nbsp; //1. set the infoTemplate's Contents and Title using the attributes
&amp;nbsp; //2. attach the infoTemplate to map.infoWindow
&amp;nbsp; //3. display the map's infoWindow at evt.mapPoint
});

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:21:30 GMT</pubDate>
    <dc:creator>StephenLead</dc:creator>
    <dc:date>2021-12-11T06:21:30Z</dc:date>
    <item>
      <title>Limiting Feature Layer Popup based on another Feature Layer or Graphic?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-feature-layer-popup-based-on-another/m-p/103386#M9459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My problem is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want all of my data to be displayed in a feature layer, but I only want a certain area defined by another Feature Layer or Graphic (I will call this the "Area of Interest Polygon" or AIP) to allow popups. Please see attached image for clarification&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I override the feature layer's onclick to check if the point clicked is within the "AIP". Or if I place the "AIP" as the top level graphic layer how do I make it query the underlying feature layer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]14533[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 21:44:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-feature-layer-popup-based-on-another/m-p/103386#M9459</guid>
      <dc:creator>ColeHarper</dc:creator>
      <dc:date>2012-05-22T21:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting Feature Layer Popup based on another Feature Layer or Graphic?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-feature-layer-popup-based-on-another/m-p/103387#M9460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How do I override the feature layer's onclick to check if the point clicked is within the "AIP"&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are probably a couple of ways you could approach this. One might be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- add FeatureLayer1 to the map, but don't assign it an infoWindow&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- add the AIP layer/graphic to the map&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- set an onClick listener on the AIP layer, which does something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
dojo.connect(AIPlayer, "onClick", function(evt) {
&amp;nbsp; var graphic = evt.graphic;
&amp;nbsp; var attributes = evt.graphic.attributes;
&amp;nbsp; var infoTemplate = new esri.InfoTemplate;
&amp;nbsp; //1. set the infoTemplate's Contents and Title using the attributes
&amp;nbsp; //2. attach the infoTemplate to map.infoWindow
&amp;nbsp; //3. display the map's infoWindow at evt.mapPoint
});

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:21:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/limiting-feature-layer-popup-based-on-another/m-p/103387#M9460</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-11T06:21:30Z</dc:date>
    </item>
  </channel>
</rss>

