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
9
9
from ipyleaflet import Map, LocalTileLayer
10
10
11
11
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'))
13
13
14
14
m
15
15
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
+
16
22
Attributes
17
23
----------
18
24
19
25
=============== ================= =====
20
26
Attribute Default Value Doc
21
27
=============== ================= =====
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 )
23
29
=============== ================= =====
You can’t perform that action at this time.
0 commit comments