Open keul opened 4 years ago
... just tested adding a plugin in the condesandbox you kindly prepared for me in #183 and it works there! 😬
https://codesandbox.io/s/leaflettimedimensionchoropleth-3nihd
I planned to switch to this approach in any case in the short term, so you can close this issue. Although I think that the "official" GeoJSON plugin should easily handle this case (best match would be to have some time-related data in the tooltip probably)
Hi @keul, do you think it is possible to extend the L.TimeDimension.Layer to inherit from L.geoJSON the options such as onEachFeature etc. ? or even to inherit from the leaflet-choropleth plugin?
thanks
@iacopoff I'm not sure what you mean, but using the leaflet-choropleth approach worked very well for me
@keul, sorry I am a novice in leaflet/javascript so i may not use the right words.
Below you can see some of the options i can set when i am creating a L.choropleth layer ( https://github.com/timwis/leaflet-choropleth):
When i am creating a L.TimeDimension.Layer.GeoJSON does this layer have such options?
I am sure the valueProperty belong only to the L.choropleth, but the onEachFeature should be a option of the class L.GeoJSON so the L.TimeDimension.Layer.GeoJSON should have it?
I can try to explain further if it is not clear what i mean.
thanks
@iacopoff I don't think is will work that way. The choropleth is just a wrapper
Alright, I think I need to spend more time understanding Leaflet.
Thanks
I'm trying to add a standard on-hover tooltip to a GeoJSON layer.
Also trying to apply a basic static text seems not working.
Example here:
https://codesandbox.io/s/leaflettimedimension-with-tooltip-eyts2
If I enable the tooltip on the wrapped GeoJSON it will not work but if I try to call the
bindTooltip
on the theL.TimeDimension.Layer.GeoJSON
wrapper object I get an error.Is this doable in any way, maybe extending the abstract
Layer
or something similar?