File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
docs/source/api_reference Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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+
1622Attributes
1723----------
1824
1925=============== ================= =====
2026Attribute 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=============== ================= =====
You can’t perform that action at this time.
0 commit comments