<?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: MapImageLayer with a time enabled map service? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapimagelayer-with-a-time-enabled-map-service/m-p/1275329#M80743</link>
    <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should work without any issues. Seems like the issue specific to your case and a reproducible case would be better to find a solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code snippet sets a definitionExpression on a sublayer for a time-enabled MapImageLayer and it works as expected.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const layer = new MapImageLayer({
  url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Earthquakes_Since1970/MapServer",
  sublayers:[{
    id: 0,
    definitionExpression: "magnitude &amp;gt;= 8"
  }]
});&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 04 Apr 2023 16:09:42 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2023-04-04T16:09:42Z</dc:date>
    <item>
      <title>MapImageLayer with a time enabled map service?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapimagelayer-with-a-time-enabled-map-service/m-p/1275186#M80737</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We are building a small demo for a devoplment team in our organisation:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;ArcGIS Enterprise 10.9.1&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Javascript api 4.26&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;The first iteration of the demo works with a normal map service:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;&lt;SPAN&gt;// set up map layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var METlayer = new MapImageLayer(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;portalItem: // autocasts as esri/portal/PortalItem&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;id: "f36bf4a27f1e487b8895452bf745da21" // Portal ID for the working map service&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sublayers:[&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;id: 0,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;definitionExpression: "L_Opname_ligging = 'GPS ingemeten'", // filter based on attribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;popupTemplate: popupTemplate //apply pop up&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;id: 1,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;definitionExpression: "L_Opname_ligging = 'GPS ingemeten'",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;popupTemplate: popupTemplate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;This approach works with different map services.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;However when I replace the service with a time enabled map service the basemap appears but not the time enabled service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I remove Time from the same service the MapImageLayer call does work.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Question 1: This leads me to believe that MapImageLayer does not support time enabled map services. Is this correct?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Question 2: If this is correct, what should we use to display a time enabled service with an attribute filter per sublayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I see &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/time-layer/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/time-layer/&lt;/A&gt; but am not sure if this will support the sublayer filter. &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;The idea is to filter each layer by gemeente using an attribute field (and not a spatial query).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There will be 8 layers in the service.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 11:53:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapimagelayer-with-a-time-enabled-map-service/m-p/1275186#M80737</guid>
      <dc:creator>AnnetteFarrell</dc:creator>
      <dc:date>2023-04-04T11:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: MapImageLayer with a time enabled map service?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapimagelayer-with-a-time-enabled-map-service/m-p/1275329#M80743</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should work without any issues. Seems like the issue specific to your case and a reproducible case would be better to find a solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code snippet sets a definitionExpression on a sublayer for a time-enabled MapImageLayer and it works as expected.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const layer = new MapImageLayer({
  url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Earthquakes_Since1970/MapServer",
  sublayers:[{
    id: 0,
    definitionExpression: "magnitude &amp;gt;= 8"
  }]
});&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 Apr 2023 16:09:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapimagelayer-with-a-time-enabled-map-service/m-p/1275329#M80743</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2023-04-04T16:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: MapImageLayer with a time enabled map service?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapimagelayer-with-a-time-enabled-map-service/m-p/1275709#M80762</link>
      <description>&lt;P&gt;Indeed it was an issue with the service.&amp;nbsp; Native publishing was ok but when it went through our automated deployment something changed.&amp;nbsp; We will publish this service manually for now.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 13:02:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapimagelayer-with-a-time-enabled-map-service/m-p/1275709#M80762</guid>
      <dc:creator>AnnetteFarrell</dc:creator>
      <dc:date>2023-04-05T13:02:33Z</dc:date>
    </item>
  </channel>
</rss>

