<?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: Problem with popups in 4.13 and later in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625394#M58366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shawn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Use a function to set the content and it avoids the sanitization of the popup content.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; propertiesTemplate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;// autocasts as new PopupTemplate()&lt;/SPAN&gt;
                    title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"&amp;lt;h5&amp;gt;&amp;lt;strong&amp;gt;{bname}&amp;lt;/strong&amp;gt;&amp;lt;/h5&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                    content&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; contentFunc
                &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          
                &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;contentFunc&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                  &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; div &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;createElement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"div"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                  div&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;innerHTML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"123 Main St.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;"&amp;lt;strong&amp;gt;"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;category &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;":&amp;lt;/strong&amp;gt; 0.345&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;'&amp;lt;a target="_blank" href="mydetailpage.html?id=12345"&amp;gt;View Details Page&amp;lt;/a&amp;gt;'&lt;/SPAN&gt;
                  &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; div&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;/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;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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 02:39:20 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-12T02:39:20Z</dc:date>
    <item>
      <title>Problem with popups in 4.13 and later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625391#M58363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been trying to get&amp;nbsp;my map to display a popup when a point on my feature layer is clicked and it looks like something has changed between ArcGIS js api 4.12 and 4.13 (and later) that breaks my code.&amp;nbsp; &amp;nbsp; I didn't see any notes in the release notes that indicated any required code updates for moving to later versions of the api.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a code pen with the broken popup template (I've distilled this example to a very very basic map)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/snmoore/pen/RwavYGJ"&gt;Link to Codepen&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run the code pen to recreate the problem (try clicking any point),&amp;nbsp; then change the 2 api references from 4.13 to 4.12 and the popups work fine when you click a point on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone know why this works in 4.12 and not in 4.13 (or 4.16)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shawn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2020 19:24:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625391#M58363</guid>
      <dc:creator>ShawnMoore</dc:creator>
      <dc:date>2020-09-24T19:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with popups in 4.13 and later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625392#M58364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shawn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;If you switch your code to use JS API Next url then your code works fine.&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;script src&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://js.arcgis.com/next/"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So there has been a bug for a couple of version with this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2020 20:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625392#M58364</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-09-24T20:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with popups in 4.13 and later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625393#M58365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Robert, getting closer....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next branch gets us closer, but I think the new code&amp;nbsp;has at least 1 more problem.&amp;nbsp;&amp;nbsp; &amp;nbsp;I switched to next on my more detailed production map and had to make sure the&amp;nbsp;outFields: was specified as all fields ( "*") otherwise it wouldn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From there I thought I was done until I clicked on my link in the popup.&amp;nbsp; &amp;nbsp;(There's a link that takes the user to a specific properties page for the point on the map.)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In next any relative link is replaced with a link to the actual map html page.&amp;nbsp; &amp;nbsp;If I switch to 4.12, I get my relative link to my properties page, but next seems to wipe that out in favor of the current page.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a bit harder to show on code pen, but here's the pen.&amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/snmoore/pen/wvGNReZ" title="https://codepen.io/snmoore/pen/wvGNReZ"&gt;https://codepen.io/snmoore/pen/wvGNReZ&lt;/A&gt;&amp;nbsp; &amp;nbsp; If you change from 4.12 to next you can see the different in the url when you hover over the details link in the popup.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Shawn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2020 22:57:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625393#M58365</guid>
      <dc:creator>ShawnMoore</dc:creator>
      <dc:date>2020-09-24T22:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with popups in 4.13 and later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625394#M58366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shawn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Use a function to set the content and it avoids the sanitization of the popup content.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; propertiesTemplate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;// autocasts as new PopupTemplate()&lt;/SPAN&gt;
                    title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"&amp;lt;h5&amp;gt;&amp;lt;strong&amp;gt;{bname}&amp;lt;/strong&amp;gt;&amp;lt;/h5&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                    content&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; contentFunc
                &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          
                &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;contentFunc&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                  &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; div &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;createElement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"div"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                  div&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;innerHTML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"123 Main St.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;"&amp;lt;strong&amp;gt;"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;category &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;":&amp;lt;/strong&amp;gt; 0.345&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;
                        &lt;SPAN class="string token"&gt;'&amp;lt;a target="_blank" href="mydetailpage.html?id=12345"&amp;gt;View Details Page&amp;lt;/a&amp;gt;'&lt;/SPAN&gt;
                  &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; div&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;/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;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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:39:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625394#M58366</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T02:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with popups in 4.13 and later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625395#M58367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert this solved the problem!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;note:&amp;nbsp; I also had to add an outFields property in my propertiesTemplate with "*" to make other fields available in my more detailed production template.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;            &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; propertiesTemplate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;// autocasts as new PopupTemplate()&lt;/SPAN&gt;
                title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"&amp;lt;h5&amp;gt;&amp;lt;strong&amp;gt;{bname}&amp;lt;/strong&amp;gt;&amp;lt;/h5&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string 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="comment token"&gt;// specify outfields of * to get access to all fields in your content function&lt;/SPAN&gt;
                content&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; contentFunc
            &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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;-Shawn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:39:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-popups-in-4-13-and-later/m-p/625395#M58367</guid>
      <dc:creator>ShawnMoore</dc:creator>
      <dc:date>2021-12-12T02:39:23Z</dc:date>
    </item>
  </channel>
</rss>

