I am using Time Slider with a data set that has points over a year long period. I've set it up to display in one week increments. I would like for it to only show that week but it seems to be cumulative. So in the end I have the entire year worth of data displayed when I would really like to end with the most recent week displayed. Is this possible?
Hi! I am using arcgis javascript api for Arcgis 4.16, Can some one guide me is it possible to start my time slider from the current date (end date). I mean, When i open my map the time slider shows the map of start date and when the slider moves it will start progressing towards the current date and finally ends at current date. Now I want that whenever i load my map the current date shows first.
There is a setting which you need to adjust to get the proper effect. Let's explain how this works... You have date-time objects, and each point has a certain date and time defined. When you calculate the range and set the interval and step each day it will only show the points that have a date AND time defined at that particular spot. See the interface below. In this case it will show all the points of the displayed date and time, and most likely there will be none, so you don't see anything...
If you change the options and set a "TIme window" of 1 day it will now not show a single date-time moment, but an entire day, which will show several points:
Below a screenshot of how your time slider will look:
The testdata that I used was generate with a python script:
<SPAN class="comment token">#-------------------------------------------------------------------------------</SPAN> <SPAN class="comment token"># Name: generate_random_date_points.py</SPAN> <SPAN class="comment token"># Purpose:</SPAN> <SPAN class="comment token">#</SPAN> <SPAN class="comment token"># Author: Xander</SPAN> <SPAN class="comment token">#</SPAN> <SPAN class="comment token"># Created: 26-01-2017</SPAN> <SPAN class="comment token">#-------------------------------------------------------------------------------</SPAN> <SPAN class="keyword token">from</SPAN> random <SPAN class="keyword token">import</SPAN> randrange <SPAN class="keyword token">import</SPAN> arcpy <SPAN class="keyword token">def</SPAN> <SPAN class="token function">main</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">import</SPAN> os <SPAN class="keyword token">from</SPAN> datetime <SPAN class="keyword token">import</SPAN> datetime arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>overwriteOutput <SPAN class="operator token">=</SPAN> <SPAN class="token boolean">True</SPAN> fc <SPAN class="operator token">=</SPAN> r<SPAN class="string token">'C:\GeoNet\RandomDates\gdb\data.gdb\points_v01'</SPAN> num_features <SPAN class="operator token">=</SPAN> <SPAN class="number token">4000</SPAN> fld_datetime <SPAN class="operator token">=</SPAN> <SPAN class="string token">'myRandomDateTime'</SPAN> fld_date <SPAN class="operator token">=</SPAN> <SPAN class="string token">'myRandomDate'</SPAN> sr <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>SpatialReference<SPAN class="punctuation token">(</SPAN><SPAN class="number token">28992</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="comment token"># 2016/01/01 00:29:36 to 2016/11/22 17:07:31</SPAN> d1 <SPAN class="operator token">=</SPAN> datetime<SPAN class="punctuation token">.</SPAN>strptime<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'2016/01/01 00:29:36'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'%Y/%m/%d %H:%M:%S'</SPAN><SPAN class="punctuation token">)</SPAN> d2 <SPAN class="operator token">=</SPAN> datetime<SPAN class="punctuation token">.</SPAN>strptime<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'2016/11/22 17:07:31'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'%Y/%m/%d %H:%M:%S'</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="comment token"># create featureclass</SPAN> fc_ws<SPAN class="punctuation token">,</SPAN> fc_name <SPAN class="operator token">=</SPAN> os<SPAN class="punctuation token">.</SPAN>path<SPAN class="punctuation token">.</SPAN>split<SPAN class="punctuation token">(</SPAN>fc<SPAN class="punctuation token">)</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>CreateFeatureclass_management<SPAN class="punctuation token">(</SPAN>fc_ws<SPAN class="punctuation token">,</SPAN> fc_name<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"POINT"</SPAN><SPAN class="punctuation token">,</SPAN> None<SPAN class="punctuation token">,</SPAN> None<SPAN class="punctuation token">,</SPAN> None<SPAN class="punctuation token">,</SPAN> sr<SPAN class="punctuation token">)</SPAN> <SPAN class="comment token"># add fields</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>AddField_management<SPAN class="punctuation token">(</SPAN>fc<SPAN class="punctuation token">,</SPAN> fld_datetime<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"DATE"</SPAN><SPAN class="punctuation token">)</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>AddField_management<SPAN class="punctuation token">(</SPAN>fc<SPAN class="punctuation token">,</SPAN> fld_date<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"DATE"</SPAN><SPAN class="punctuation token">)</SPAN> flds <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="string token">'SHAPE@'</SPAN><SPAN class="punctuation token">,</SPAN> fld_datetime<SPAN class="punctuation token">,</SPAN> fld_date<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">with</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>da<SPAN class="punctuation token">.</SPAN>InsertCursor<SPAN class="punctuation token">(</SPAN>fc<SPAN class="punctuation token">,</SPAN> flds<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">as</SPAN> curs<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">for</SPAN> cnt <SPAN class="keyword token">in</SPAN> range<SPAN class="punctuation token">(</SPAN>num_features<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN> pntg <SPAN class="operator token">=</SPAN> getRandomPoint<SPAN class="punctuation token">(</SPAN>sr<SPAN class="punctuation token">)</SPAN> my_datetime <SPAN class="operator token">=</SPAN> random_date<SPAN class="punctuation token">(</SPAN>d1<SPAN class="punctuation token">,</SPAN> d2<SPAN class="punctuation token">)</SPAN> my_date <SPAN class="operator token">=</SPAN> my_datetime<SPAN class="punctuation token">.</SPAN>date<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> curs<SPAN class="punctuation token">.</SPAN>insertRow<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN>pntg<SPAN class="punctuation token">,</SPAN> my_datetime<SPAN class="punctuation token">,</SPAN> my_date<SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">if</SPAN> cnt <SPAN class="operator token">%</SPAN> <SPAN class="number token">100</SPAN> <SPAN class="operator token">==</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">print</SPAN> <SPAN class="string token">"Processing point"</SPAN><SPAN class="punctuation token">,</SPAN> cnt <SPAN class="keyword token">def</SPAN> <SPAN class="token function">getRandomPoint</SPAN><SPAN class="punctuation token">(</SPAN>sr<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN> x_range <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="number token">100000</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">140000</SPAN><SPAN class="punctuation token">]</SPAN> y_range <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="number token">100000</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">130000</SPAN><SPAN class="punctuation token">]</SPAN> pnt <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>Point<SPAN class="punctuation token">(</SPAN>randrange<SPAN class="punctuation token">(</SPAN>x_range<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> x_range<SPAN class="punctuation token">[</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> randrange<SPAN class="punctuation token">(</SPAN>y_range<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> y_range<SPAN class="punctuation token">[</SPAN><SPAN class="number token">1</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">return</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>PointGeometry<SPAN class="punctuation token">(</SPAN>pnt<SPAN class="punctuation token">,</SPAN> sr<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">def</SPAN> <SPAN class="token function">random_date</SPAN><SPAN class="punctuation token">(</SPAN>start<SPAN class="punctuation token">,</SPAN> end<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">""" This function will return a random datetime between two datetime objects. """</SPAN> <SPAN class="comment token"><SPAN># </SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F553303%2Fgenerate-a-random-date-between-two-other-dates" target="_blank">http://stackoverflow.com/questions/553303/generate-a-random-date-between-two-other-dates</A></SPAN> <SPAN class="keyword token">from</SPAN> datetime <SPAN class="keyword token">import</SPAN> timedelta delta <SPAN class="operator token">=</SPAN> end <SPAN class="operator token">-</SPAN> start int_delta <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>delta<SPAN class="punctuation token">.</SPAN>days <SPAN class="operator token">*</SPAN> <SPAN class="number token">24</SPAN> <SPAN class="operator token">*</SPAN> <SPAN class="number token">60</SPAN> <SPAN class="operator token">*</SPAN> <SPAN class="number token">60</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">+</SPAN> delta<SPAN class="punctuation token">.</SPAN>seconds random_second <SPAN class="operator token">=</SPAN> randrange<SPAN class="punctuation token">(</SPAN>int_delta<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">return</SPAN> start <SPAN class="operator token">+</SPAN> timedelta<SPAN class="punctuation token">(</SPAN>seconds<SPAN class="operator token">=</SPAN>random_second<SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">if</SPAN> __name__ <SPAN class="operator token">==</SPAN> <SPAN class="string token">'__main__'</SPAN><SPAN class="punctuation token">:</SPAN> main<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I am using ArcMap 10.3. It is one file with a single date range. It works in cumulative mode only. I have it set to daily between 2016/01/01 00:29:36.39 to 2016/11/22 17:07:30.86. There are 3938 records in this file. Time is enabled.
On theTime Slider I have it set to Central Time (US & Canada) though I am not using it. The time step interval is 1 day. I am showing the time clock on the display. The time extent is set to my file. Playback has been slowed a bit. Refresh is not set.
The background static data is all under a new basemap layer.
I have three graphs, but closed or open makes no difference. The points do not display without the cumulative checked.
Could you share your settings and tell a little more about the data you are showing (range of dates, number of features, single dates or date range)? It may be the way you configured your visualization.
I was wondering if that fixed the problem? On my data, when I uncheck Cumulative, NOTHING shows up!
Thanks, I'm not sure how I missed that.
In ArcMap you can do this using the links provided by Dan. In the properties of the layer, make sure the option "Display data cumulatively" is unchecked:
In ArcGIS Online you can do this too: see: Configure time settings—ArcGIS Online Help | ArcGIS and scroll down to Time Display:
Choose only display the data in the current time interval to show only the data that falls within the time interval. For example, if you have data representing hurricane paths over a 10-year period and you want to show the paths of all hurricanes that occurred within a given year, you would choose this option (and specify 1 Year as your time interval). As the map animates, you see the hurricane paths for the first year, the second, the third, and so on. Each year of data displays independently of the other years.Choose progressively display all the data to show all the data over time. For example, if you have data representing hurricane paths over a 10-year period and you want to display all the hurricane paths that occurred over the 10-year period in successive years over the previous years, you would choose this option (and specify 1 Year as your time interval). As the map animates, you see the yearly hurricane paths cumulatively over 10 years.
You should use "only display the data in the current time interval".
have you examined all the variable properties in the help About modifying the time slider properties—Help | ArcGIS for Desktop like the start and end time? Modifying the start and end time of the time slider—Help | ArcGIS for Desktop
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.