<?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: How to show the new earthquake every minute? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-show-the-new-earthquake-every-minute/m-p/314898#M28939</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Undral,&lt;/P&gt;&lt;P&gt;Before I saw your reply, I did try querying the field "time" and compared it to the time from Date() every minute after reloading. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; I really appreciate that you even made an example code for me to study, thank you!&lt;/P&gt;&lt;P&gt;Yiqun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Feb 2020 00:12:03 GMT</pubDate>
    <dc:creator>YiqunChen</dc:creator>
    <dc:date>2020-02-26T00:12:03Z</dc:date>
    <item>
      <title>How to show the new earthquake every minute?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-show-the-new-earthquake-every-minute/m-p/314896#M28937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am studying arcgis javascript and I saw a few examples using geoJson from USGS to mark the earthquakes globally. &lt;/P&gt;&lt;P&gt;USGS claims that the past hour geoJson file is updated every minute so I want to only mark the new earthquake every minute. How should I do it? Should I save the ids from the past hour geoJson file in the last minute and find out the new earthquakes by comparing ids from last minute to ids from current minute (earthquake ids are unique)? or should I check the time of the earthquake? which way sounds better or any other simple way? &lt;/P&gt;&lt;P&gt;This is the code to load the past hour earthquake:&lt;/P&gt;&lt;DIV style="color: #ffffff; background-color: #000000; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;DIV style="color: #ffffff; background-color: #000000; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #569cd6;"&gt;const&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;url3&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&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 style="color: #ce9178;"&gt;"https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_hour.geojson"&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN style="color: #569cd6;"&gt;const&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;geojsonLayer&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;GeoJSONLayer&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&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 style="color: #9cdcfe;"&gt;url:&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;url3&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&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 style="color: #9cdcfe;"&gt;copyright:&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"USGS&amp;nbsp;Earthquakes"&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&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 style="color: #9cdcfe;"&gt;popupTemplate:&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;template&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&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 style="color: #9cdcfe;"&gt;renderer:&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;renderer&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #7ca668;"&gt;//optional&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;This is how I will reload USGS url every 60 seconds:&lt;/P&gt;&lt;DIV style="color: #ffffff; background-color: #000000; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #9cdcfe;"&gt;language&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"javascript"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;setInterval&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;(){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;window&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;location&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;reload&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;);&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #7ca668;"&gt;//refresh&amp;nbsp;all&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #7ca668;"&gt;//alert('refresh');&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #7ca668;"&gt;//map.getLayer("geojsonLayer2").refresh();&amp;nbsp;//refresh&amp;nbsp;only&amp;nbsp;one&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;60000&lt;/SPAN&gt;&lt;SPAN style="color: #ffffff;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Then I hesitate whether to query the time of the earthquake or query the ids to find out the new earthquake.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Feb 2020 00:19:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-show-the-new-earthquake-every-minute/m-p/314896#M28937</guid>
      <dc:creator>YiqunChen</dc:creator>
      <dc:date>2020-02-22T00:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the new earthquake every minute?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-show-the-new-earthquake-every-minute/m-p/314897#M28938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GeoJSONLayer is not a refreshable layer at 4.14. We plan on making this layer refreshable in the future release. So at 4.14, you have to recreate the GeoJSONLayer at your specified interval add it to your map. You can also set the timeInfo information on the layer whenever you initialize layer. This will help you to do time query on the layer.&amp;nbsp; I created a simple &lt;A href="https://codepen.io/U_B_U/pen/vYOgRQK?editors=1000"&gt;test app&lt;/A&gt; that applies FeatureEffect to the GeoJSONLayer based on the timeExtent. In this example app, the only earthquakes features that were added will have the layer's renderer applied while the older features will have effects applied.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2020 21:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-show-the-new-earthquake-every-minute/m-p/314897#M28938</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2020-02-24T21:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to show the new earthquake every minute?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-show-the-new-earthquake-every-minute/m-p/314898#M28939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Undral,&lt;/P&gt;&lt;P&gt;Before I saw your reply, I did try querying the field "time" and compared it to the time from Date() every minute after reloading. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; I really appreciate that you even made an example code for me to study, thank you!&lt;/P&gt;&lt;P&gt;Yiqun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2020 00:12:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-show-the-new-earthquake-every-minute/m-p/314898#M28939</guid>
      <dc:creator>YiqunChen</dc:creator>
      <dc:date>2020-02-26T00:12:03Z</dc:date>
    </item>
  </channel>
</rss>

