Hey everyone. I am brand new to the Javascript API and Javascript in general, so I don't fully understand how the code syntax works, but I am learning.
My issue is that I have created an online web app with the Javascript API and the time slider widget doesn't interact with the layer.
It is a map of Utah with points for Oil and Gas wells. In this layer, time is enabled. Within Map Viewer online the time slider works as expected, points appear and disappear as time progresses. In the web map, the time slider shows up and runs but doesn't affect the layer of points at all.
My code is pretty simple and can be found below.
require([
"esri/WebMap",
"esri/views/MapView",
"esri/widgets/TimeSlider"
], function (WebMap, MapView, TimeSlider) {
//Grabbing my web map
const map = new WebMap({
portalItem: { )
id: "1e9a6937760e46d3bd047c108ebf8246"
}
});
const view = new MapView({
container: "viewDiv",
map: map
});
//Creating Timeslider
const timeSlider = new TimeSlider({
container: "timeSlider",
fullTimeExtent: {
start: new Date(1900,0,1),
end: new Date(2022,0,1)
}
});
view.ui.add(timeSlider)
}); If you want to see the Web Map, it can be found here.
If you would like to see the online web application, it can be found here.