Leaflet.TimeDimension & Polygon

330 views
Skip to first unread message

Anders Rylander

unread,
May 13, 2015, 1:28:41 PM5/13/15
to leafl...@googlegroups.com
Has anyone managed to display polygons with Leaflet.TimeDimension?

Biel Frontera

unread,
May 21, 2015, 10:24:02 PM5/21/15
to leafl...@googlegroups.com
Hi Anders,
I'm the developer of Leaflet.TimeDimension.

What do you refer about displaying polygons?
You might use a geojson layer where the features have a time property. You have to add to the map this layer using L.TimeDimension.Layer.GeoJSON, which is prepared to filter the features of the geoJSON layer according to the current time (and according the duration parameter). But it was developed with linestrings in mind, in order to show partial trajectories.

I recently created a map with multipolygons (see the animation map on the right sidebar at http://seaboard.socib.es/sorrento).
I had to overwrite some methods from the default GeoJSON timeLayer, because it had no sense to modify the geometry of the feature (see: http://seaboard.socib.es/static/js/sorrento.js, search CDrift).
I will fix this on the next version of the library.

Regards,
Biel





El dimecres, 13 maig de 2015 19:28:41 UTC+2, Anders Rylander va escriure:

Anders Rylander

unread,
Jun 18, 2015, 10:41:06 AM6/18/15
to leafl...@googlegroups.com
Hi Biel,

Thank you so much for coming back to me! 

I have made very good progress thanks to your email.

I do have an issue with the controls though. They do not behave as I expect as I want to use the 'timeslider' and 'speedslider'. Also see attached screenshots.

Inline images 1

There are two issues,

1. When I hoover over the "handles" they become large and grey - i.e. it does not look as it should.

Inline images 2

2. I can left click and drag the "handles" it is possible to change the time / speed but the "handle" does not follow the mouse pointer. So it does not look right.


Any ideas?

Thanks,
Anders.








--

---
You received this message because you are subscribed to a topic in the Google Groups "Leaflet" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/leaflet-js/GgXSpbMCLhc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to leaflet-js+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages