This sample shows how to access the temporal data of a VoxelLayer and use it with the TimeSlider.
A VoxelVariable has one of the following volumeType xyz
, xyzt
or xyt
. The x, y and z represent a geographic coordinate and t represents time. A volumeType of xyzt
adds time as the fourth dimension and makes the VoxelLayer a time-aware layer. The volumeType xyt
is not a time-aware layer. The time is represented along the z dimension. The stops
in the timeInfo returns the time instants the VoxelLayer has data for.
const vxlVolume = vxlLayer.getVolume(null);
const vxlVolumeType = vxlVolume.volumeType;
// Check that the volume type is xyzt
if (vxlVolumeType === "xyzt") {
// Configure the timeSlider to use the layer's timeInfo.stops
timeSlider.fullTimeExtent = vxlLayer.timeInfo.fullTimeExtent;
timeSlider.stops = {
dates: vxlLayer.timeInfo.stops
};
timeSlider.mode = "instant"; // The slider will show temporal data that falls on a single instance in time.
}
In this sample, you can see overtime the underground soil contamination from chlorinated solvents with a value of 1000 µg/l in The Hague.