Skip to content
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

Merged
merged 4 commits into from
Aug 3, 2023
Merged

Conversation

AndersenBell
Copy link
Collaborator

This should I guess be merged before the Time Slider feature on pro.

@AndersenBell AndersenBell requested a review from TimPurdum August 1, 2023 20:57
@AndersenBell AndersenBell self-assigned this Aug 1, 2023
@AndersenBell AndersenBell requested a review from seahro August 1, 2023 20:57
Copy link
Collaborator

@TimPurdum TimPurdum left a 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; }
Copy link
Collaborator

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?

Copy link
Collaborator

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)

Copy link
Collaborator Author

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

Copy link
Collaborator

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
Copy link
Collaborator

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 {
Copy link
Collaborator

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?

Copy link
Collaborator

@seahro seahro left a 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.
Copy link
Collaborator

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

@AndersenBell AndersenBell merged commit 8456157 into develop Aug 3, 2023
@AndersenBell AndersenBell deleted the feature/timeslider-support branch August 3, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants