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

Display of current date and list sorting #162

Open
barney2074 opened this issue Dec 24, 2020 · 2 comments
Open

Display of current date and list sorting #162

barney2074 opened this issue Dec 24, 2020 · 2 comments
Labels

Comments

@barney2074
Copy link

Hello,

loving this plugin
If anyone can help me with the following questions, I'd be very grateful:

  1. How can I display the 'current' date outside of the timeline control? It's good having it next to the slider, but I'd like it to be more prominent and placed elsewhere on the page

  2. If I'm using a sidebar list of currently displayed features (as per the earthquakes sample), how would I sort these based on a particular attribute ? So relating to this to the earthquakes, they might be sorted by magnitude (quake.properties.mag)

thank you

Andrew

@skeate
Copy link
Owner

skeate commented Dec 24, 2020

  1. The current time is available as a property on the timeline control, time. You can see this in the borders example -- open up the dev console and type in timelineControl.time. However, this isn't set until the control has at least one timeline assigned to it.

  2. The code to show that list is here -- essentially you could just sort displayed using (e.g.) lodash's sortBy

@barney2074
Copy link
Author

thanks Jonathon

I've got the current time working without too much trouble
The lodash documentation is a bit confusing (to me at least) so I'll have to tinker around with it

Andrew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants