<?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: Adding Popups to an ArcGISDynamicMapLayer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-popups-to-an-arcgisdynamicmaplayer/m-p/476340#M44255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You are saying that number 1 (meaning the first layer in the map service) receives this particular info window template. It is pretty well spelled out in the doc:&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/3/jsapi/arcgisdynamicmapservicelayer-amd.html#infotemplates" title="https://developers.arcgis.com/javascript/3/jsapi/arcgisdynamicmapservicelayer-amd.html#infotemplates"&gt;https://developers.arcgis.com/javascript/3/jsapi/arcgisdynamicmapservicelayer-amd.html#infotemplates&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Aug 2017 16:17:44 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2017-08-30T16:17:44Z</dc:date>
    <item>
      <title>Adding Popups to an ArcGISDynamicMapLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-popups-to-an-arcgisdynamicmaplayer/m-p/476337#M44252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to add a popup to an ArcGISDynamicMapLayer, and I am a little stuck. I can't get the popups to appear, but I'm not getting any errors in the console. I think the error might be when I try to add the intoTemplate to the layer, but I'm not sure. Here is my code: (I've edited it out extra widgets so it is shorter, but I left the requires and declarations)&lt;/P&gt;&lt;P&gt;require([&lt;BR /&gt; "esri/map",&lt;BR /&gt; "esri/arcgis/utils",&lt;BR /&gt; "esri/layers/ArcGISDynamicMapServiceLayer",&lt;BR /&gt; "esri/dijit/LayerList",&lt;BR /&gt; "esri/dijit/BasemapGallery",&lt;BR /&gt; "esri/dijit/Popup",&lt;BR /&gt; "esri/dijit/PopupTemplate",&lt;BR /&gt; "dojo/parser",&lt;BR /&gt; "dojo/dom-construct",&lt;BR /&gt; "dojo/on",&lt;BR /&gt; "esri/InfoTemplate",&lt;BR /&gt; "dijit/layout/BorderContainer",&lt;BR /&gt; "dijit/layout/ContentPane",&lt;BR /&gt; "dojox/layout/ExpandoPane",&lt;BR /&gt; "dojo/domReady!"&lt;BR /&gt;], function (Map, arcgisUtils,&lt;BR /&gt; ArcGISDynamicMapServiceLayer,&lt;BR /&gt; LayerList, BasemapGallery,&lt;BR /&gt; Popup, PopupTemplate,&lt;BR /&gt; parser, domConstruct, on, InfoTemplate) {&lt;BR /&gt; var popup = new Popup({}, domConstruct.create("div"));&lt;BR /&gt; var map = new Map("map", {&lt;BR /&gt; basemap: "topo",&lt;BR /&gt; center: [-98.40, 29.67], //centers on san antonio &lt;BR /&gt; zoom: 11, //zooms to all of bexar county, must be integer&lt;BR /&gt; infoWindow: popup&lt;BR /&gt; });&lt;BR /&gt; BCADParcelPopup = new InfoTemplate("2016 BCAD Parcels", "");&lt;BR /&gt; var infoTemplates = {&lt;BR /&gt; infoTemplate: BCADParcelPopup,&lt;BR /&gt; layerUrl: url + "/40" //sudocode, i actually have the url as a string here.&lt;BR /&gt; };&lt;BR /&gt; var landLayer = new ArcGISDynamicMapServiceLayer(&lt;BR /&gt; url,&lt;BR /&gt; {&lt;BR /&gt; "id": "Land"&lt;BR /&gt; });&lt;BR /&gt; landLayer.setImageFormat("png32");&lt;BR /&gt; landLayer.setInfoTemplates({ infoTemplates });&lt;BR /&gt; map.addLayer(landLayer);&lt;BR /&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2017 15:12:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-popups-to-an-arcgisdynamicmaplayer/m-p/476337#M44252</guid>
      <dc:creator>GregSalvador</dc:creator>
      <dc:date>2017-08-30T15:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Popups to an ArcGISDynamicMapLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-popups-to-an-arcgisdynamicmaplayer/m-p/476338#M44253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You are not setting the infotemplates correctly. Here is what the .setInforTemplates should look like:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; demographicsLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setInfoTemplates&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; infoTemplate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; _blockGroupInfoTemplate &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; infoTemplate&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; _countyCensusInfoTemplate &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;See this sample:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/map_twodynamic.html" title="https://developers.arcgis.com/javascript/3/jssamples/map_twodynamic.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Add two dynamic maps | ArcGIS API for JavaScript 3.21&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:03:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-popups-to-an-arcgisdynamicmaplayer/m-p/476338#M44253</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T21:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Popups to an ArcGISDynamicMapLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-popups-to-an-arcgisdynamicmaplayer/m-p/476339#M44254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed "&lt;SPAN style="background-color: #ffffff;"&gt;landLayer.setInfoTemplates({ infoTemplates });&lt;/SPAN&gt;" to "landLayer.setInfoTemplates({ 1: { infoTemplate: infoTemplates } });", but nothing is appearing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sideNote: why is the syntax for this line include 1: ?? I've never seen anything like that.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2017 15:59:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-popups-to-an-arcgisdynamicmaplayer/m-p/476339#M44254</guid>
      <dc:creator>GregSalvador</dc:creator>
      <dc:date>2017-08-30T15:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Popups to an ArcGISDynamicMapLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-popups-to-an-arcgisdynamicmaplayer/m-p/476340#M44255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You are saying that number 1 (meaning the first layer in the map service) receives this particular info window template. It is pretty well spelled out in the doc:&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/3/jsapi/arcgisdynamicmapservicelayer-amd.html#infotemplates" title="https://developers.arcgis.com/javascript/3/jsapi/arcgisdynamicmapservicelayer-amd.html#infotemplates"&gt;https://developers.arcgis.com/javascript/3/jsapi/arcgisdynamicmapservicelayer-amd.html#infotemplates&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2017 16:17:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-popups-to-an-arcgisdynamicmaplayer/m-p/476340#M44255</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-08-30T16:17:44Z</dc:date>
    </item>
  </channel>
</rss>

