-
-
Notifications
You must be signed in to change notification settings - Fork 394
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
Matplotlib palette error #190
Comments
Use viridis. See https://leafmap.org/notebooks/32_local_tile/ |
m.add_local_tile(dem, palette='viridis', layer_name="DEM") > This sample code works fine in local anaconda env but when I try to use in in docker env which is
I try with all type of path(I saw from your github comment, we should use relative path) and map seems empty. |
This is likely a localtileserver issue. Try the following example without using leafmap. If it doesn't work, then it is a localtileserver issue. You might want to try out the localtileserver docker image rather than creating your own docker image. This issue might also be related to banesullivan/localtileserver-demo#1 from localtileserver import get_leaflet_tile_layer, TileClient
from ipyleaflet import Map
# First, create a tile server from local raster file
tile_client = TileClient('path/to/your/dem.tif')
# Create ipyleaflet tile layer from that server
t = get_leaflet_tile_layer(tile_client)
# Create ipyleaflet map, add tile layer, and display
m = Map(center=tile_client.center())
m.add_layer(t)
m |
You right Sir. it doesn't work with localtileserver sample. I also tried with Binder but it was all same. |
import leafmap
m = leafmap.Map()
dem_path='CGIAR_SRTM90_V4.tif' #same folder with notebook
m.add_local_tile(ndvi_path,palette='matplotlib.Viridis_10',layer_name="NDVI")
I try to install leafmap in docker env and
I got below error when I try add local raster. It could be realted with localtileserver or ipyleaflet but I am not sure which one.
What I Did
I am working on Win-11 anaconda env. In my local anaconda env, everything is fine but when I try it in docker it doesn't work.
The text was updated successfully, but these errors were encountered: