<?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 How to attach an infoWindow to a Dynamic Map's Identify results in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-attach-an-infowindow-to-a-dynamic-map-s/m-p/499794#M46429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;See this &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/find_drilldown.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Identify&lt;/A&gt;&lt;SPAN&gt; sample which runs an IdentifyTask on a Dynamic map service:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color: #000000; font-family: monospace;"&gt;dojo&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;connect&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;map&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #999999; font-family: monospace;"&gt;"onClick"&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; doIdentify&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;);&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;
identifyTask &lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000088; font-family: monospace;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; esri&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;tasks&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;IdentifyTask&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #999999; font-family: monospace;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer" rel="nofollow noopener noreferrer" target="_blank"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;);&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;
identifyParams &lt;SPAN style="color:#666600;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color:#000088;"&gt;new&lt;/SPAN&gt; esri&lt;SPAN style="color:#666600;"&gt;.&lt;/SPAN&gt;tasks&lt;SPAN style="color:#666600;"&gt;.&lt;/SPAN&gt;IdentifyParameters&lt;SPAN style="color:#666600;"&gt;();&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;identifyParams&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;layerIds &lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #006666; font-family: monospace;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #006666; font-family: monospace;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;];&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This sample contains pre-prepared HTML to handle the results, depending on which layer they are from:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
if (idResult.layerId === 0) {
&amp;nbsp; if (!bldgResults.displayFieldName) {bldgResults.displayFieldName = idResult.displayFieldName};
&amp;nbsp; bldgResults.features.push(idResult.feature);
}else if (idResult.layerId === 2) {
&amp;nbsp; if (!parcelResults.displayFieldName) {parcelResults.displayFieldName = idResult.displayFieldName};
&amp;nbsp; parcelResults.features.push(idResult.feature);
}

&amp;lt;div id="bldgTab" dojoType="dijit.layout.ContentPane" title="Buildings"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div id="parcelTab" dojoType="dijit.layout.ContentPane" title="Tax Parcels"&amp;gt;&amp;lt;/div&amp;gt;


&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to configure this to be dynamic rather than checking "if layer = building, elseif layer = parcel". An option could be to set an infoTemplate (containing the required formatting of the results) while configuring the IdentifyTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;see line 75:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var idResult = idResults&lt;I&gt;;&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The result of the IdentifyTask (idResult.feature) is a graphic, so has an infoTemplate property. Can I set the infoTemplate for the layer before the IdentifyTask is run, so that the identifyResults are formatted using the infoTemplate's settings? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:57:10 GMT</pubDate>
    <dc:creator>StephenLead</dc:creator>
    <dc:date>2021-12-11T21:57:10Z</dc:date>
    <item>
      <title>How to attach an infoWindow to a Dynamic Map's Identify results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-attach-an-infowindow-to-a-dynamic-map-s/m-p/499794#M46429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;See this &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/find_drilldown.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Identify&lt;/A&gt;&lt;SPAN&gt; sample which runs an IdentifyTask on a Dynamic map service:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color: #000000; font-family: monospace;"&gt;dojo&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;connect&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;map&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #999999; font-family: monospace;"&gt;"onClick"&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; doIdentify&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;);&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;
identifyTask &lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000088; font-family: monospace;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt; esri&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;tasks&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;IdentifyTask&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #999999; font-family: monospace;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer" rel="nofollow noopener noreferrer" target="_blank"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;);&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;
identifyParams &lt;SPAN style="color:#666600;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color:#000088;"&gt;new&lt;/SPAN&gt; esri&lt;SPAN style="color:#666600;"&gt;.&lt;/SPAN&gt;tasks&lt;SPAN style="color:#666600;"&gt;.&lt;/SPAN&gt;IdentifyParameters&lt;SPAN style="color:#666600;"&gt;();&lt;/SPAN&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;identifyParams&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: monospace;"&gt;layerIds &lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #006666; font-family: monospace;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #006666; font-family: monospace;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #666600; font-family: monospace;"&gt;];&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This sample contains pre-prepared HTML to handle the results, depending on which layer they are from:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
if (idResult.layerId === 0) {
&amp;nbsp; if (!bldgResults.displayFieldName) {bldgResults.displayFieldName = idResult.displayFieldName};
&amp;nbsp; bldgResults.features.push(idResult.feature);
}else if (idResult.layerId === 2) {
&amp;nbsp; if (!parcelResults.displayFieldName) {parcelResults.displayFieldName = idResult.displayFieldName};
&amp;nbsp; parcelResults.features.push(idResult.feature);
}

&amp;lt;div id="bldgTab" dojoType="dijit.layout.ContentPane" title="Buildings"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div id="parcelTab" dojoType="dijit.layout.ContentPane" title="Tax Parcels"&amp;gt;&amp;lt;/div&amp;gt;


&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to configure this to be dynamic rather than checking "if layer = building, elseif layer = parcel". An option could be to set an infoTemplate (containing the required formatting of the results) while configuring the IdentifyTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;see line 75:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var idResult = idResults&lt;I&gt;;&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The result of the IdentifyTask (idResult.feature) is a graphic, so has an infoTemplate property. Can I set the infoTemplate for the layer before the IdentifyTask is run, so that the identifyResults are formatted using the infoTemplate's settings? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:57:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-attach-an-infowindow-to-a-dynamic-map-s/m-p/499794#M46429</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-11T21:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to attach an infoWindow to a Dynamic Map's Identify results</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-attach-an-infowindow-to-a-dynamic-map-s/m-p/499795#M46430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did this ever get solved? I am having the same issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alex&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 17:16:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-attach-an-infowindow-to-a-dynamic-map-s/m-p/499795#M46430</guid>
      <dc:creator>AlexDeVine</dc:creator>
      <dc:date>2012-10-22T17:16:28Z</dc:date>
    </item>
  </channel>
</rss>

