<?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 feature selection on mapimagelayer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1243155#M79700</link>
    <description>&lt;P&gt;That will work when you have the layer, however in my case I don't and it can be many or 1.&lt;/P&gt;&lt;P&gt;Eventually I solved it this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;mapServerLayers.loadAll().then(() =&amp;gt; mapServerLayers.allSublayers.forEach((e) =&amp;gt; e.popupTemplate = e.createPopupTemplate({visibleFieldNames: viewFields})));&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 22 Dec 2022 00:18:24 GMT</pubDate>
    <dc:creator>Aeseir</dc:creator>
    <dc:date>2022-12-22T00:18:24Z</dc:date>
    <item>
      <title>Enable feature selection on mapimagelayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1242627#M79681</link>
      <description>&lt;P&gt;I am pulling data from a MapServer, now I'd like to be able to interact with features on each of the layers to enable pop up of feature.&lt;/P&gt;&lt;P&gt;my very simple code has this so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const mapLayer = new MapImageLayer({
        url: e.url,
        opacity: 0.5,
      });

      view?.map.add(mapLayer);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any way to enable pop up template for each of the layers that come through? or have them automatically converted to featurelayer by default?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 11:20:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1242627#M79681</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2022-12-20T11:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Enable feature selection on mapimagelayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1242712#M79685</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;You need to set the popupTemplate on the sublayers as shown here:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupTemplate" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#popupTemplate&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 16:09:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1242712#M79685</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-12-20T16:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Enable feature selection on mapimagelayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1242887#M79690</link>
      <description>&lt;P&gt;I saw that previously, however in that scenario you have to provide id of the sublayer to apply it to.&lt;/P&gt;&lt;P&gt;In my case number of sublayers is anywhere between 1...N. They all have common data, so i want to apply it to all of the layers.&lt;/P&gt;&lt;P&gt;How would you go about this challenge?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 07:30:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1242887#M79690</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2022-12-21T07:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Enable feature selection on mapimagelayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1242976#M79697</link>
      <description>&lt;P&gt;You can loop through the sublayers once MapImageLayer is loaded into the MapView as shown below:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const popupTemplate = {
  title: "Common title",
  content: "Common content"
};

view.whenLayerView(layer).then(() =&amp;gt; {
  layer.sublayers.forEach(
    (sublayer) =&amp;gt; (sublayer.popupTemplate = popupTemplate)
  );
});&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Dec 2022 16:56:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1242976#M79697</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-12-21T16:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: Enable feature selection on mapimagelayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1243155#M79700</link>
      <description>&lt;P&gt;That will work when you have the layer, however in my case I don't and it can be many or 1.&lt;/P&gt;&lt;P&gt;Eventually I solved it this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;mapServerLayers.loadAll().then(() =&amp;gt; mapServerLayers.allSublayers.forEach((e) =&amp;gt; e.popupTemplate = e.createPopupTemplate({visibleFieldNames: viewFields})));&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 22 Dec 2022 00:18:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/enable-feature-selection-on-mapimagelayer/m-p/1243155#M79700</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2022-12-22T00:18:24Z</dc:date>
    </item>
  </channel>
</rss>

