Hello,
I have a layer with weather forecast for the next 7 days, which updated daily.
I need dynamic time slider for these days.
I found out that in the web map, if I change the JSON file under
ArcGISportal -> content -> items -> [myItemID] -> [webmapName...]
set the timeSlider properties: StartTime = -1, and no EndTime, then every time I open or refresh the webmap - the time slider range is updated.
Unfortunately, this does not apply to the time slider widget in web appbuilder.
Any ideas will be highly appreciated.
Ofra
Hi Ofra,
Did you ever get a solution for this? I'm experiencing a very similar scenario at the moment.
Thanks
Andy
Hi Andy,
Unfortunately, I did not get any solution.
Ofra
Hi Ofra,
I've done some more digging on this which you may be interested in. Using the ArcGIS REST API you can update the item (using the URL schema https://<portal>/sharing/rest/content/users/<user>/<folderid>/items/<itemid>/update). Using Postman, you can get the item (in this case webmap) data as JSON, then make your changes to the start/end date. I've used SQL Server to calculate the Epoch time in milliseconds for the start and end date/time, which are a week apart. I then replaced the original start/end date values with these in the JSON, and used it in the 'text' key of the POST request body. I've used the key f, with the value json, and the token generated from an earlier step. This updates the start/end dates in the web map, and in the Time Slider in the Web AppBuilder application.
I hope this helps.
Andy
Maybe worth to vote this idea up: https://community.esri.com/ideas/12617