Closed cerodell closed 4 years ago
I guess my question is how do you get the URL from the L.vectorGrid.slicer layer?
You don't, because there is none.
Leaflet.VectorGrid
is based off L.GridLayer
(which needs a createTile
method to be implemented) and not off L.TileLayer
(which needs a getTileUrl
method to be implemented).
You see, the magic to fetch a tile from a sliced geojson happens in a createTile
call at
...to send a message to a web worker, which then...
... so there are no URLs at all when fetching tile data. I guess that you must rethink your approach.
Thanks for the timely and thorough response @IvanSanchez !
I will be exploring L.vectorGrid.slicer
embedded in a L.layerGroup
to expand TimeDimension.Layer
Your L.vectorGrid.slicer
is too awesome to give up on :)
Hello :)
I am using
L.vectorGrid.slicer
with topojson files (about 1.8MB in size). My goal is to use TimeDimension to allow the user to click through varied forecast times. I am trying this by extending theTimeDimension.Layer
to includeL.vectorGrid.slicer.
My issue is getting the base URL from the
L.vectorGrid.slicer
layer within theL.TimeDimension.Layer.VectorGrid.Slicer
. I receive the following error:Uncaught TypeError: this._baseLayer.getURL is not a function
I think the source of my problem is how I initialize the base layer? I didn't use the fetch method to load the JSON like in this repos example. I have multiple forecasts products. With fetch, I found to have multiple
vectorGrid.slicer
layers I needed to add them to layer groups whereas the method below I don't. Wich is important when extendingTimeDimension
I guess my question is how do you get the URL from the
L.vectorGrid.slicer
layer?Any and all help is greatly appreciated!