-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for time slider #206
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few questions to review.
/// <summary> | ||
/// TimeInfo provides information such as date fields that store start and end time for each feature and the fullTimeExtent for the layer. | ||
/// </summary> | ||
public TimeInfo? TimeInfo { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be { get; private set; }
? Can a user actually define this property, or is it always loaded with the feature service?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I realize that question applies as well to other existing properties)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, since it can be set before the layer is created. It also seems like this could be added to the other layers at some point.
It seems like FulTimeExtent could be a private set.
this is the info from ESRI:
TimeInfo provides information such as date fields that store start and end time for each feature and the fullTimeExtent for the layer. The timeInfo property, along with its startField and endField properties, must be set at the time of layer initialization if it is being set for a CSVLayer, GeoJSONLayer or FeatureLayer initialized from client-side features. The fullTimeExtent for timeInfo is automatically calculated based on its startField and endField properties. The timeInfo parameters cannot be changed after the layer is loaded.
Default Value:null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, yeah, it sounds like we might need it to be a public setter if you use client-side features, which is a thing more akin to GraphicsLayer
. In that case, however, we might want to enforce some of the required properties in TimeInfo
with a constructor so they aren't accidentally left blank.
/// Time info represents the temporal data of a time-aware layer. The time info class provides information such | ||
/// as date fields that store the start and end times for each feature and the total time span for the layer. | ||
/// </summary> | ||
public class TimeInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these do always come from the feature service via JS, this could be a record
, although with the xml comments, it wouldn't necessarily save any space.
@@ -967,6 +967,30 @@ export function buildJsFormTemplate(dotNetFormTemplate: any): FormTemplate { | |||
return formTemplate; | |||
} | |||
|
|||
export function buildJsTimeSliderStops(dotNetStop: any): any | null { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should start a jsBuilderPro.ts
, just to keep unecessary code out of Core?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one question about the timeextent class. looks good
public class TimeInterval | ||
{ | ||
/// <summary> | ||
/// Temporal units. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I saw that there was also a timeExtent class. It just has 2 properties, just like this: a start and end property. I see how the interval class is essential to the slider, I guess the other one is more for "displays"?
https://developers.arcgis.com/javascript/latest/api-reference/esri-TimeExtent.html
This should I guess be merged before the Time Slider feature on pro.