Guest User

Untitled

a guest
Nov 21st, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. function sipriReportTimeline(data){
  2. var getInterval = function(feature) {
  3. return {
  4. start: feature.properties.date_long_moment,
  5. end: moment("1998-05-30"),
  6. };
  7. };
  8. var timelineControl = L.timelineSliderControl({
  9. formatOutput: function(date){
  10. return new Date(date).toLocaleDateString();
  11. },
  12. duration: 100000,
  13. });
  14. var timeline = L.timeline(data, {
  15. getInterval: getInterval,
  16. pointToLayer: sipriReportPointToLayer,
  17. });
  18. timelineControl.addTo(myMap);
  19. timelineControl.addTimelines(timeline);
  20. timeline.addTo(myMap);
  21. };
Add Comment
Please, Sign In to add comment