Open kseniya292 opened 6 years ago
Hi @kseniya292 , I am afraid that the current version of timeDimension is only able to work with WMS and geoJson layers. Maybe you can do some hacking so it includes another posible implementation of a time dimension layer apart form WMS (L.TimeDimension.Layer.WMS) and geoJson (L.TimeDimension.Layer.GeoJSON) based on the leaflet.TileLayer.WMTS leaflet plugin specifications (https://github.com/mylen/leaflet.TileLayer.WMTS) or leaflet.projwmts (https://github.com/GeoportalPL/leaflet.projwmts) but I have never tried it to be honest. Hope this helps!, Paz rg
You can extend the use any layer implementation that can produce a timed layer.
var layer= MyLayer(...);
var timedLayer = new L.TimeDimesion.WMS(layer);
Your layer will be recreated for each time with a different time
parameter. You will need to provide your own times using setAvailableTimes.
Or you can create your own timelayer based on example 10
Hi @r1m, Can I make a time layer from a layerGroup
as well.? Actually I have some custom layerGroups which are used as overlays and I want to convert those into a time dimension layers. Any help is highly appreciated. :raised_hands:
Thanks!!!
This is one of those layerGroups,
and I'm using it in my main js file as,
let AQICNLayer = L.layerGroup.aqicnLayer();
and then, I put this AQICNLayer
into my overlapMap like this,
let overlapMap = {
"aqicnLayer": AQICNLayer,
};
and then I use it in L.control.layers(baseMaps, overlayMaps).addTo(map);
Please let me know how can I convert these into time Dimension ones. Thanks!!!
@bielfrontera Can you please take a look? I am not able to figure it out.
Thanks!!!
Hi @Rishabh570, you can add a timedimension layer to a LayerGroup. It would behave as any other kind of layer. I mean, you do not have to adapt the LayerGroup but the layers you add to it.
(btw, it would be better to open a new issue rather than comment here)
Hello. I'm new to weather mapping. I'm working on an application where users can select layers and animate them. In all of the examples, timeDimension is being added to a WMS layer. I'm grabbing my layers using getGTile. Is it possible to use timeDimesion for non WMS tiles?