Hi everyone,
we are trying to integrate the TimeSlider widget in Appstudio, but it seems the widget is not working properly most of the times.
This is a demo code to reproduce the bug, using Esri's services:
import QtQuick 2.7 import QtQuick.Controls 2.1 import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Material 2.1 import ArcGIS.AppFramework 1.0 import Esri.ArcGISRuntime 100.15 import Esri.ArcGISRuntime.Toolkit 100.15 Item { property real scaleFactor: AppFramework.displayScaleFactor // Map view UI presentation at top MapView { id: mv anchors.fill: parent Map { BasemapTerrainWithLabels {} FeatureLayer { ServiceFeatureTable { id: featureLayer url: "https://services5.arcgis.com/N82JbI5EYtAkuUKU/ArcGIS/rest/services/Time_atlantic_hurricanes_2000_Hos..." } } } // Add a TimeSlider from the toolkit to the MapView TimeSlider { anchors { left: parent.left right: parent.right bottom: parent.bottom } geoView: mv } } }
With this other FeareService the widget loads and it seems to work:
https://services5.arcgis.com/N82JbI5EYtAkuUKU/ArcGIS/rest/services/Hurricane_time_enabled_layer_2005_1_day/FeatureServer/0
The only difference I can recognize in the previous layers is the type of geometry (points vs polylines). Also, in the web version the widget is working properly for both of them.
I am using the latest version of Appstudio (5.5).
Thanks in advance for your support!
import QtQuick 2.7
import QtQuick.Controls 2.1
import QtQuick.Controls.Styles 1.4
import QtQuick.Controls.Material 2.1
import ArcGIS.AppFramework 1.0
import Esri.ArcGISRuntime 100.15
import Esri.ArcGISRuntime.Toolkit 100.15
Item {
property real scaleFactor: AppFramework.displayScaleFactor
// Map view UI presentation at top
MapView {
id: mv
anchors.fill: parent
//! [Display Feature Service]
Map {
BasemapTerrainWithLabels {}
FeatureLayer {
ServiceFeatureTable {
id: featureLayer
url: "https://services5.arcgis.com/N82JbI5EYtAkuUKU/ArcGIS/rest/services/Time_atlantic_hurricanes_2000_Hosted/FeatureServer/0"
}
}
}
// Add a TimeSlider from the toolkit to the MapView
TimeSlider {
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
geoView: mv
}
}
}
Hello Pietro,
Sorry for the delay to answer.
I can reproduce this problem and I'm trying to understand it. I'll be back soon.
Hello,
TimeSlider uses "Time Interval" and "Time Interval Units" from JSON to determine the range in TimeSlider. In HurricaneTracks2005, these values are defined, but not in Time_atlantic_hurricanes_2000_Hosted. Online MapViewer uses default values to work.
We're working to determine if this should be considered as a bug or if these "Timer Interval" settings are not supported.
Hello, ok thank you so much.