Skip to content

Commit ceea99d

Browse files
committed
Fix documentation
1 parent d187d66 commit ceea99d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/source/api_reference/local_tile_layer.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@ Example
99
from ipyleaflet import Map, LocalTileLayer
1010
1111
m = Map(center=(52.204793, 360.121558), zoom=9)
12-
m.add_layer(LocalTileLayer(url='./tiles/{z}/{x}/{y}.png'))
12+
m.add_layer(LocalTileLayer(path='tiles/{z}/{x}/{y}.png'))
1313
1414
m
1515
16+
Note that the behavior is different in Jupyter Notebook and in JupyterLab.
17+
18+
In the classic Jupyter Notebook, the path is relative to the Notebook you are working on.
19+
20+
In JupyterLab, the path is relative to the server (where you started JupyterLab) and you need to prefix the path with "files/".
21+
1622
Attributes
1723
----------
1824

1925
=============== ================= =====
2026
Attribute Default Value Doc
2127
=============== ================= =====
22-
url "" Relative URL (e.g. './tiles/{z}/{x}/{y}.png')
28+
path "" Relative URL (e.g. 'tiles/{z}/{x}/{y}.png' or 'files/tiles/{z}/{x}/{y}.png' in JupyterLab)
2329
=============== ================= =====

0 commit comments

Comments
 (0)