-
Notifications
You must be signed in to change notification settings - Fork 29
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
again a poor soul not managing to serve the tiles on remote server #95
Comments
@12rambau, thanks for giving localtileserver a try and working hard to understand exactly what's going awry here - I understand this is probably a bit frustrating and I'd like to help get this working for you. Overall, it seems you have set it up to work in a remote Jupyter environment as you are getting 200 statuses on your tiles. The confusing thing is that you are seeing fully transparent tiles - a transparent tile is generated when tiles are requested outside the bounds of the raster. A few things could go wrong here.... As a first check, could you make sure this behaves the same with from localtileserver import get_folium_tile_layer, examples
from folium import Map
client = examples.get_landsat(client_host="sepal.io", debug=True)
style = {
'bands': [
{'band': 5, 'palette': '#f00'},
{'band': 3, 'palette': '#0f0'},
{'band': 2, 'palette': '#00f'},
]
}
l = get_folium_tile_layer(client, style=style, )#name="toto")
m = Map(location=client.center(), zoom_start=client.default_zoom)
m.add_child(l)
m This will rule out any issues with the ipyleafelt localtileserver/localtileserver/widgets.py Lines 100 to 103 in 6963b6b
|
Thank you for your prompt answer. Until now I was using xarray_leaflet but recently geemap from @giswqs started using your lib for the same operation. So I think I went a bit to fast looking at the payload. The images are not transparent, they are white in the preview (but as I'm not seeing them in the maps I assumed they were transparent). I unzoom to the maximum to check it wasn't a projection issue but they are nowere. I tried the Folium implementation and the result is slightly different. There I get a 301 error. |
@12rambau xarray-leaflet is no longer being actively developed and it never works on Windows, so I decided to switch to locatileserver. If you want to stick with xarray-leaflet, you can still use the https://geemap.org/geemap/#geemap.geemap.Map.add_raster_legacy |
I'm only running things on a linux environment so that was not an issue (I have a pending issue for way to long on xarray_leaflet as well 😄 ). I saw the |
@12rambau, were you able to resolve this issue? I'd be happy to help you debug this if you're still having trouble |
nope I'm still a bit lost. Didn't have any idea but if you want me to check other stuff I'll be happy to give it a try |
thanks a lot for your help @banesullivan I think I finally managed to find the server prefix needed to make it work. I simply use the one found in import os
os.environ["LOCALTILESERVER_CLIENT_PREFIX"] = "/api/sandbox/jupyter/proxy/{port}"
from localtileserver import get_folium_tile_layer, examples
from folium import Map
client = examples.get_landsat(client_host="sepal.io", debug=False)
style = {
'bands': [
{'band': 5, 'palette': '#f00'},
{'band': 3, 'palette': '#0f0'},
{'band': 2, 'palette': '#00f'},
]
}
l = get_folium_tile_layer(client, style=style)
m = Map(location=client.center(), zoom_start=client.default_zoom)
m.add_child(l)
m I'll close this one when I'll manage the full integration in our lib but that's a big step forward. I'll keep an eye on #101 as it sounds very promising. |
I know that it's a known issue, I'm not here to says it doesn't work, but more to say I think I don't understand the wiring.
What I tried
As simple as it seems my objective wa to check if I can display the example image on a map:
As many before me I have the tile of the basemap but I don't see the "toto" layer.
status
I don't want to write down many information that would be useless so I prefer to ask
Do you have any idea why the tiles are not rendering ?
Is there extra information that could be of any use ?
Is there test from my side that I can performed ? (I tried to activate the debug mode but it didn't gave me lots of information)
technical report
The text was updated successfully, but these errors were encountered: