<?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: Identify popup issues in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-popup-issues/m-p/18262#M1700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) In your Identify Parameters, define the layerIds as only the visible layers on the map for the selected layer&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;identifyParams.layerIds = myLayer.visibleLayers;&lt;/PRE&gt;&lt;P&gt;You can do this in the executeIdentifyTask function if your visible layers are goint to change dynamically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Set the popup to only show if the identify response returns 1 or more feature&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function executeIdentifyTask (event) {
&amp;nbsp; map.infoWindow.hide();
&amp;nbsp; identifyParams.geometry = event.mapPoint;
&amp;nbsp; identifyParams.mapExtent = map.extent;
&amp;nbsp; var deferred = identifyTask
&amp;nbsp;&amp;nbsp;&amp;nbsp; .execute(identifyParams)
&amp;nbsp;&amp;nbsp;&amp;nbsp; .addCallback(function (response) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // response is an array of identify result objects
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Let's return an array of features.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (response.length &amp;gt; 0) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.show(event.mapPoint);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return arrayUtils.map(response, function (result) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var feature = result.feature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var layerName = result.layerName;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.attributes.layerName = layerName;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layerName === 'Tax Parcels') {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var taxParcelTemplate = new InfoTemplate("",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "${Postal Address} &amp;lt;br/&amp;gt; Owner of record: ${First Owner Name}");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setInfoTemplate(taxParcelTemplate);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (layerName === 'Building Footprints') {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(feature.attributes.PARCELID);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var buildingFootprintTemplate = new InfoTemplate("",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Parcel ID: ${PARCELID}");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setInfoTemplate(buildingFootprintTemplate);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return feature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; });
&amp;nbsp;&amp;nbsp; // InfoWindow expects an array of features from each deferred
&amp;nbsp;&amp;nbsp; // object that you pass. If the response from the task execution
&amp;nbsp;&amp;nbsp; // above is not an array of features, then you need to add a callback
&amp;nbsp;&amp;nbsp; // like the one above to post-process the response and return an
&amp;nbsp;&amp;nbsp; // array of features.
&amp;nbsp; map.infoWindow.setFeatures([deferred]);
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:44:16 GMT</pubDate>
    <dc:creator>FC_Basson</dc:creator>
    <dc:date>2021-12-10T20:44:16Z</dc:date>
    <item>
      <title>Identify popup issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-popup-issues/m-p/18261#M1699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, I'm working with the version 3.17 and I'm generating popups to display feature attributes using the IdentifyTask object.&amp;nbsp; I basically used the sample code for "Display identify results in a popup".&amp;nbsp;&amp;nbsp;&amp;nbsp; I have two issues:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I used the LAYER_OPTION_VISIBLE setting for my identify parameters.&amp;nbsp; But it's still identifying on features that aren't visible.&amp;nbsp; I don't know why...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) When I click on the map but not on a feature, a popup displays saying "No information available".&amp;nbsp; I'd like nothing to pop up when I do this, because I have other click tools and I don't want this to pop up unnecessarily.&amp;nbsp;&amp;nbsp; Not sure how to do this..&lt;/P&gt;&lt;P&gt;Thanks for any help...&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I would love to provide my code but I have absolutely no idea how to cut and paste it.&amp;nbsp; I tried to do it directly and also using the "Javascript Syntax Highlighting" thing.&amp;nbsp; In both cases, the spacing is completely messed up and I see strange squiggles and boxes, etc.&amp;nbsp; Sorry...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 19:51:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-popup-issues/m-p/18261#M1699</guid>
      <dc:creator>DanielSchatt</dc:creator>
      <dc:date>2016-06-29T19:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Identify popup issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-popup-issues/m-p/18262#M1700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) In your Identify Parameters, define the layerIds as only the visible layers on the map for the selected layer&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;identifyParams.layerIds = myLayer.visibleLayers;&lt;/PRE&gt;&lt;P&gt;You can do this in the executeIdentifyTask function if your visible layers are goint to change dynamically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Set the popup to only show if the identify response returns 1 or more feature&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function executeIdentifyTask (event) {
&amp;nbsp; map.infoWindow.hide();
&amp;nbsp; identifyParams.geometry = event.mapPoint;
&amp;nbsp; identifyParams.mapExtent = map.extent;
&amp;nbsp; var deferred = identifyTask
&amp;nbsp;&amp;nbsp;&amp;nbsp; .execute(identifyParams)
&amp;nbsp;&amp;nbsp;&amp;nbsp; .addCallback(function (response) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // response is an array of identify result objects
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Let's return an array of features.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (response.length &amp;gt; 0) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.show(event.mapPoint);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return arrayUtils.map(response, function (result) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var feature = result.feature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var layerName = result.layerName;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.attributes.layerName = layerName;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layerName === 'Tax Parcels') {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var taxParcelTemplate = new InfoTemplate("",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "${Postal Address} &amp;lt;br/&amp;gt; Owner of record: ${First Owner Name}");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setInfoTemplate(taxParcelTemplate);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (layerName === 'Building Footprints') {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(feature.attributes.PARCELID);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var buildingFootprintTemplate = new InfoTemplate("",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Parcel ID: ${PARCELID}");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setInfoTemplate(buildingFootprintTemplate);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return feature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; });
&amp;nbsp;&amp;nbsp; // InfoWindow expects an array of features from each deferred
&amp;nbsp;&amp;nbsp; // object that you pass. If the response from the task execution
&amp;nbsp;&amp;nbsp; // above is not an array of features, then you need to add a callback
&amp;nbsp;&amp;nbsp; // like the one above to post-process the response and return an
&amp;nbsp;&amp;nbsp; // array of features.
&amp;nbsp; map.infoWindow.setFeatures([deferred]);
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:44:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-popup-issues/m-p/18262#M1700</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2021-12-10T20:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Identify popup issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-popup-issues/m-p/18263#M1701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks FC!&amp;nbsp; Much appreciated!!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2016 19:49:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/identify-popup-issues/m-p/18263#M1701</guid>
      <dc:creator>DanielSchatt</dc:creator>
      <dc:date>2016-06-30T19:49:51Z</dc:date>
    </item>
  </channel>
</rss>

