<?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: Enable popup for map-image layer in Scene View in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-popup-for-map-image-layer-in-scene-view/m-p/1219161#M78910</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/524261"&gt;@JackFanZhang&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;You can configure the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupTemplate" target="_self"&gt;PopupTemplate&lt;/A&gt; on the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html" target="_self"&gt;MapImageLayer&lt;/A&gt; &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#sublayers" target="_self"&gt;sublayers&lt;/A&gt;. Here's a simple example on how to do this with a scene from ArcGIS Online:&amp;nbsp;&lt;A href="https://codepen.io/laurenb14/pen/ZEojwQW?editors=1000" target="_blank"&gt;https://codepen.io/laurenb14/pen/ZEojwQW?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2022 22:45:10 GMT</pubDate>
    <dc:creator>LaurenBoyd</dc:creator>
    <dc:date>2022-10-05T22:45:10Z</dc:date>
    <item>
      <title>Enable popup for map-image layer in Scene View</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-popup-for-map-image-layer-in-scene-view/m-p/1218509#M78900</link>
      <description>&lt;P&gt;Hello, I have a 3D local scene which contains a map-image layer that contains about 30 sublayers. There's no option to turn on the popup on the sublayers when config it in the scene, therefore the popup didn't show up when bring the scene view in my JS API app. I'm wondering if there's way to enable popup for map-image sublayers in scene via JS API? thank you&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 04:30:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-popup-for-map-image-layer-in-scene-view/m-p/1218509#M78900</guid>
      <dc:creator>JackFanZhang</dc:creator>
      <dc:date>2022-10-04T04:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Enable popup for map-image layer in Scene View</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-popup-for-map-image-layer-in-scene-view/m-p/1219161#M78910</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/524261"&gt;@JackFanZhang&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;You can configure the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupTemplate" target="_self"&gt;PopupTemplate&lt;/A&gt; on the&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html" target="_self"&gt;MapImageLayer&lt;/A&gt; &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#sublayers" target="_self"&gt;sublayers&lt;/A&gt;. Here's a simple example on how to do this with a scene from ArcGIS Online:&amp;nbsp;&lt;A href="https://codepen.io/laurenb14/pen/ZEojwQW?editors=1000" target="_blank"&gt;https://codepen.io/laurenb14/pen/ZEojwQW?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 22:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-popup-for-map-image-layer-in-scene-view/m-p/1219161#M78910</guid>
      <dc:creator>LaurenBoyd</dc:creator>
      <dc:date>2022-10-05T22:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Enable popup for map-image layer in Scene View</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-popup-for-map-image-layer-in-scene-view/m-p/1221049#M78976</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/400217"&gt;@LaurenBoyd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate for sharing the code. Good to learn this could be done by supplying the feature layer with a new PopupTemplate object. The challenge I had was also about how to show the popup using the default template, which display all the visible attributes. With the suggested method, I would need to populate the contents for all sublayers (there're 40 of them in my case). Technically it is possible but need to write a bit extra code. Anyway I ended up doing this by manually load the feature layer then assign the layer's defaultPopupTempalte to the popupTemplate property, which works as expected.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; subLayer.load().then(()=&amp;gt;{
    subLayer.popupEnabled = true;
    subLayer.popupTemplate = subLayer.defaultPopupTemplate
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 11:39:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-popup-for-map-image-layer-in-scene-view/m-p/1221049#M78976</guid>
      <dc:creator>JackFanZhang</dc:creator>
      <dc:date>2022-10-12T11:39:58Z</dc:date>
    </item>
  </channel>
</rss>

