Open
Description
Trying to load a jpg
image in ipyleaflet
using ImageOverlay
I got different behaviour between the standard notebook interface and jupyterlab.
The following code work in a standard notebook but fail to render the image (404 error) in jupyterlab.
from ipyleaflet import (
Map, ImageOverlay, TileLayer
)
m = Map(default_tiles=TileLayer(opacity=1.0), center=meta['C'], zoom=12)
meta = {'C': (41.066192631345636, -68.91168330924846),
'LL': (41.06314714201035, -68.93226141787825),
'UR': (41.06923444219005, -68.89110330910114),
'proj': '+proj=utm +zone=19 +datum=WGS84 +units=m +no_defs ',
'raster': 'test.jpg'}
layer = ImageOverlay(url=meta['raster'],
bounds=(meta['LL'], meta['UR']))
m.add_layer(layer)
This notebook may help to reproduce the issue.
If using a an url pointing to a fileonline, in jupyterlab, the image is rendered correctly.