socib / Leaflet.TimeDimension

Add time dimension capabilities on a Leaflet map.
MIT License
433 stars 138 forks source link

Does a L.timeDimension.layer support click events? #223

Open jonaschu opened 1 year ago

jonaschu commented 1 year ago

I want to add functionality on a click event to a timedLayer = L.timeDimension.layer.geoJson(geojsonLayer) the GeoJSON layer is a LineString. Is this possible?

timedLayer.on("click", console.log("Line clicked")) has no effect. Also geojsonLayer.on("click", console.log("Line clicked")) has no effect, since this layer is not added to the map.

Are there any workarounds to solve this?