0

I have the same GeoJSON data shown in different layers on my map with a radio button control: points as circleMarker, points as a heatMap and points as a clusterGroup. I'm trying to add a timeline with these layer control groups. I have the layergroup working fine and i managed to make the timeline work adding it directly to the map like in the examples:

  timelineControl.addTo(map)
  timelineControl.addTimelines(myTimeLine)
  myTimeLine.addTo(map)

The problem is when i try to add the timeline to an existing layer so i can toggle using groupedLayer:

  timelineControl.addTo(myLayer)
  timelineControl.addTimelines(myTimeLine)
  myTimeLine.addTo(myLayer)

The leaflet.timeline library raises TypeError: Cannot read property 'bottomleft' of undefined

Marcelo Fonseca
  • 1,705
  • 2
  • 19
  • 38
  • 1
    A `TimeLineSliderControl` is a `L.Control` and can't be added to a `L.Layer`, only directly to a `L.Map` – peeebeee Sep 28 '18 at 08:37
  • thanks @peeebeee , with this information i managed to connect my timeline with a layer group by just adding the timeline object to a layer and the TimeLineSliderControl to the map. – Marcelo Fonseca Sep 28 '18 at 13:43

0 Answers0