<?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 Time base layer display for Imagery Services in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/time-base-layer-display-for-imagery-services/m-p/1124315#M75534</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you get the imagery services working with&amp;nbsp;&lt;STRONG&gt;TimeSlider widget&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Was trying to follow this example &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-timeslider/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/widgets-timeslider/&lt;/A&gt;&amp;nbsp;with the below service &lt;A href="https://idpgis.ncep.noaa.gov/arcgis/rest/services/radar/radar_base_reflectivity_time/ImageServer" target="_blank"&gt;https://idpgis.ncep.noaa.gov/arcgis/rest/services/radar/radar_base_reflectivity_time/ImageServer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also tried to load it as a ImageryLayer, but slider looks disabled due to the wrong start , end and stop values.&lt;/P&gt;&lt;P&gt;"esri/layers/ImageryLayer",&lt;BR /&gt;//"esri/layers/ImageServiceParameters"&lt;BR /&gt;], (Map, MapView, FeatureLayer, TimeSlider, Expand, Legend, ImageryLayer) =&amp;gt; {&lt;BR /&gt;&lt;BR /&gt;const layer = new ImageryLayer("&lt;A href="https://idpgis.ncep.noaa.gov/arcgis/rest/services/radar/radar_base_reflectivity_time/ImageServer" target="_blank"&gt;https://idpgis.ncep.noaa.gov/arcgis/rest/services/radar/radar_base_reflectivity_time/ImageServer&lt;/A&gt;");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Dec 2021 14:22:27 GMT</pubDate>
    <dc:creator>shay-geo</dc:creator>
    <dc:date>2021-12-09T14:22:27Z</dc:date>
    <item>
      <title>Time base layer display for Imagery Services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/time-base-layer-display-for-imagery-services/m-p/1124315#M75534</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you get the imagery services working with&amp;nbsp;&lt;STRONG&gt;TimeSlider widget&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Was trying to follow this example &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-timeslider/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/widgets-timeslider/&lt;/A&gt;&amp;nbsp;with the below service &lt;A href="https://idpgis.ncep.noaa.gov/arcgis/rest/services/radar/radar_base_reflectivity_time/ImageServer" target="_blank"&gt;https://idpgis.ncep.noaa.gov/arcgis/rest/services/radar/radar_base_reflectivity_time/ImageServer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Also tried to load it as a ImageryLayer, but slider looks disabled due to the wrong start , end and stop values.&lt;/P&gt;&lt;P&gt;"esri/layers/ImageryLayer",&lt;BR /&gt;//"esri/layers/ImageServiceParameters"&lt;BR /&gt;], (Map, MapView, FeatureLayer, TimeSlider, Expand, Legend, ImageryLayer) =&amp;gt; {&lt;BR /&gt;&lt;BR /&gt;const layer = new ImageryLayer("&lt;A href="https://idpgis.ncep.noaa.gov/arcgis/rest/services/radar/radar_base_reflectivity_time/ImageServer" target="_blank"&gt;https://idpgis.ncep.noaa.gov/arcgis/rest/services/radar/radar_base_reflectivity_time/ImageServer&lt;/A&gt;");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 14:22:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/time-base-layer-display-for-imagery-services/m-p/1124315#M75534</guid>
      <dc:creator>shay-geo</dc:creator>
      <dc:date>2021-12-09T14:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Time base layer display for Imagery Services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/time-base-layer-display-for-imagery-services/m-p/1124492#M75542</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;So there are couple of issues with the metadata of the image service. As of time of my checking, the service's metadata says the following. However, the image service is returning the data for today (Dec 9, 2021). So setting the timeSlider.timeExtent to the ImageryLayer.timeInfo.fullTimeExtent won't work because it would be set to Oct.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Time Info:
Start Time Field: IDP_ValidTime
End Time Field: IDP_ValidEndTime
Time Extent:
[2021/10/25 10:08:19 UTC, 2021/10/25 14:10:57 UTC]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So to get this service working with the TimeSlider, couple of things need to happen. We need to query all the rasters to dynamically update the TimeSlider.fullTimeExtent whenever the app loads. Please see the code snippet with explanations.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// the service's timeInfo advertises really old time extent
// therefore, the query should be done to fetch all time attributes
// from the service while ordering the results by the IDP_ValidTime field
// set the timeslidder's fullTimeExtent based on the first and last values
// from the result
const query = {
  where: "1=1",
  outFields: ["objectid", "IDP_ValidTime", "IDP_ValidEndTime"],
  returnGeometry: false, 
  orderByFields: ["IDP_ValidTime"]
};
        
layer.queryRasters(query).then((results) =&amp;gt;{
  const fullTimeExtent =  {
    start: results.features[0].attributes.idp_validendtime,
    end: results.features[results.features.length -1].attributes.idp_validendtime
  };
  // set up time slider properties
  timeSlider.fullTimeExtent = fullTimeExtent;
       
  // service's metadata says the data is updated with 10 minute interval
  // so setting the timeSlider animate the data with 10 minute interval
  timeSlider.stops = {
    interval: {
      value: 10, 
      unit: "minutes"
    }
  };
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check out &lt;A href="https://codepen.io/U_B_U/pen/qBPNgNq?editors=1000" target="_blank" rel="noopener"&gt;this working codepen&lt;/A&gt; to see this in action.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 18:20:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/time-base-layer-display-for-imagery-services/m-p/1124492#M75542</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2021-12-09T18:20:09Z</dc:date>
    </item>
  </channel>
</rss>

