Skip to content

Downloaded image isn't showing up on the map #101

Answered by giswqs
rafiibnsultan asked this question in Q&A
Discussion options

You must be logged in to vote

Try the following example. If it does not work, it is a localtileserver issue. You need to open an issue on the localtileserver repo.

https://localtileserver.banesullivan.com/

from localtileserver import TileClient, get_leaflet_tile_layer, examples
from ipyleaflet import Map

# Create a TileClient from a raster file
# client = TileClient('path/to/geo.tif')
client = examples.get_san_francisco()  # use example data

# Create ipyleaflet TileLayer from that server
t = get_leaflet_tile_layer(client)
# Create ipyleaflet map, add tile layer, and display
m = Map(center=client.center(), zoom=client.default_zoom)
m.add_layer(t)
m

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by giswqs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants