🔬 Deep Zoom with ipyleaflet
#
In order to perform deep zooming of tile sources with ipyleaflet
, you must
specify a few keyword arguments:
max_zoom
andmax_native_zoom
set appropriately in theTileLayer
max_zoom
set in theMap
which matchesmax_zoom
in theTileLayer
For more information, please see jupyter-widgets/ipyleaflet#925
from localtileserver import get_leaflet_tile_layer, examples
from ipyleaflet import Map, TileLayer
# Load high res raster
client = examples.get_oam2()
max_zoom = 30
# Create zoomable tile layer from high res raster
layer = get_leaflet_tile_layer(client,
# extra kwargs to pass to the TileLayer
max_zoom=max_zoom,
max_native_zoom=max_zoom,
)
# Make the ipyleaflet map with deeper zoom
m = Map(center=client.center(),
zoom=22, max_zoom=max_zoom
)
m.add(layer)
m