Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to make time dimension work with a non WMS layer #187

Open
Rishabh570 opened this issue Mar 30, 2020 · 2 comments
Open

Not able to make time dimension work with a non WMS layer #187

Rishabh570 opened this issue Mar 30, 2020 · 2 comments

Comments

@Rishabh570
Copy link

I'm using this plugin to add time dimension capabilities to an already established project. I'm converting the (non-WMS) layers to the time dimension ones with the syntax,

L.timeDimension.layer.wms(layer).addTo(map);

But the slider says Time not available and _availableTimes array is empty when I logged the layer info. Does this mean that non-WMS layers cannot be converted to what is demonstrated in example1.

(BTW when I use L.timeDimension.layer(layer).addTo(map), it's not even showing the overlay on the map...so that's also not working).

@bielfrontera Would appreciate your suggestions.

@bielfrontera
Copy link
Contributor

You can only use L.TimeDimension.Layer.WMS with L.TileLayer.WMS or L.NonTiledLayer.WMS layers.

But you can use TimeDimension which any kind of layer if you implement a new class that extends L.TimeDimension.Layer as described in the README.

Here you will find some code that do this:

@Rishabh570
Copy link
Author

Thanks for the pointers. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants