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

Timestamps not supported? #31

Closed
karl-petter opened this issue Jun 16, 2014 · 2 comments
Closed

Timestamps not supported? #31

karl-petter opened this issue Jun 16, 2014 · 2 comments

Comments

@karl-petter
Copy link

I use leaflet and leaflet-omnivore to present a GPX track on a map along with photos taken along the track. Now I'm working on an animation along the track in-between the photos. To decide where along the track a photo is taken I planned to use the timestamps both in the photos and the track but I realised when importing the GPX the resulting GeoJSON does not include all the timestamps, just the first timestamp of the whole track.

My GPX file results in a LineString and when looking into the code(here) it only reads the first timestamp. Though there are other Leaflet plugins like Leaflet-Playback which instead uses an array of timestamps(see here).

When reading up on GeoJSON it seems not to define how timestamps are expected to be treated. Is there any reason why leaflet-omnivore does not create an array of timestamps but rather just take the first?

@karl-petter karl-petter changed the title Timestamps not supported Timestamps not supported? Jun 16, 2014
@tmcw
Copy link
Contributor

tmcw commented Jun 16, 2014

This is a spec-level concern - toGeoJSON can parse timestamps along lines, but has no standard way to encode them in GeoJSON: relevant discussion here. LeafletPlayback uses a convention, not any part of the GeoJSON spec, to provide this functionality, and I am not looking to implement non-standardized data.

@tmcw tmcw closed this as completed Jun 16, 2014
@dret
Copy link

dret commented Nov 18, 2014

geojson/draft-geojson#57 may be relevant for this (i just googled this thread here). so the question is two-fold: are non-numbers allowed, and if so, how to represent a timestamp? i think there could be a way to represent well-known extensions (geojson/draft-geojson#56), but that's not something that's currently specified.

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

No branches or pull requests

3 participants