I am trying to set a time interval on a dynamic map service to only see a certain time slice of the data without success (I do not want to impose the time interval on the map). Here's some sample code:
import QtQuick 2.3
import QtQuick.Controls 1.2
import ArcGIS.Runtime 10.26
ApplicationWindow {
id: appWindow
width: 800
height: 600
title: "Time Interval"
Map {
id: mainMap
anchors.fill: parent
hidingNoDataTiles: false
wrapAroundEnabled: true
focus: true
ArcGISTiledMapServiceLayer {
url: "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
}
ArcGISDynamicMapServiceLayer {
url: "http://tmservices1.esri.com/arcgis/rest/services/LiveFeeds/Earthquakes/MapServer"
timeInterval: myTimeExtent
Component.onCompleted: {
console.log("timeInterval is undefined:", timeInterval == undefined);
}
}
onStatusChanged: {
if (status === Enums.MapStatusReady)
mainMap.zoomTo(usExtent);
}
}
Envelope {
id: usExtent
xMax: -15000000
yMax: 2000000
xMin: -7000000
yMin: 8000000
spatialReference: SpatialReference {
wkid: 102100
}
}
TimeExtent {
id: myTimeExtent
startDate: new Date(2016, 2, 26, 0, 0, 0, 0)
endDate: new Date(2016, 2, 27, 0, 0, 0, 0)
}
}Not only does it not set a timeInterval, the timeInterval is still undefined after the onCompleted (timeInterval == undefined resolves to true).
Any help or insight would be greatly appreciated!
Ben