<?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 Popup conent disappears when StreamLayer graphic updates location in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-conent-disappears-when-streamlayer-graphic/m-p/412659#M38023</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When&amp;nbsp;I click on a graphic in a StreamLayer to view the popup content, if the graphic's location updates while the&amp;nbsp;popup is still open, the content disappears.&amp;nbsp;&amp;nbsp; I've tried setting the "updateLocationEnabled" property to true in the popup, but that didn't help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can you keep the content from disappearing if the location updates while viewing the popup?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Feb 2018 23:16:42 GMT</pubDate>
    <dc:creator>DanaConway</dc:creator>
    <dc:date>2018-02-28T23:16:42Z</dc:date>
    <item>
      <title>Popup conent disappears when StreamLayer graphic updates location</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-conent-disappears-when-streamlayer-graphic/m-p/412659#M38023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When&amp;nbsp;I click on a graphic in a StreamLayer to view the popup content, if the graphic's location updates while the&amp;nbsp;popup is still open, the content disappears.&amp;nbsp;&amp;nbsp; I've tried setting the "updateLocationEnabled" property to true in the popup, but that didn't help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can you keep the content from disappearing if the location updates while viewing the popup?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 23:16:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-conent-disappears-when-streamlayer-graphic/m-p/412659#M38023</guid>
      <dc:creator>DanaConway</dc:creator>
      <dc:date>2018-02-28T23:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Popup conent disappears when StreamLayer graphic updates location</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-conent-disappears-when-streamlayer-graphic/m-p/412660#M38024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After hours of debugging, I was able to come up with a workaround for now.&amp;nbsp;&amp;nbsp; What appears to be happening is that if the graphic's location updates, it's popupTemplate is being set to null.&amp;nbsp;&amp;nbsp; So, the popupTemplate and content needs to be reset.&amp;nbsp;&amp;nbsp; My workaround was to put a watch on the title property of the popup and when it went blank, reset the popupTemplate.&amp;nbsp; Code snippet below.&amp;nbsp;&amp;nbsp; This is the 4.6 version of the API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 12px;"&gt;popup.watch(["visible", "selectedFeature", "title"], function (newValue, oldValue, propertyName, target) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp; if (propertyName !== null &amp;amp;&amp;amp; propertyName !== undefined) {&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 12px;"&gt;&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;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( propertyName.toLowerCase() === "title" ){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( oldValue !== null &amp;amp;&amp;amp; oldValue.length &amp;gt; 0 &amp;amp;&amp;amp; newValue !== null &amp;amp;&amp;amp; newValue.length === 0 ) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="font-size: 12px; font-family: courier new,courier,monospace;"&gt;&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;this.selectedFeature.popupTemplate = mapElements.getPopupTemplate();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 12px;"&gt;&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;this.selectedFeature.popupTemplate.content = mapElements.setContentInfo;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace; font-size: 12px;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2018 16:03:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-conent-disappears-when-streamlayer-graphic/m-p/412660#M38024</guid>
      <dc:creator>DanaConway</dc:creator>
      <dc:date>2018-03-09T16:03:48Z</dc:date>
    </item>
  </channel>
</rss>

