From ceea99d6fd6a3a9430ee6fa204aaa9cb5452de23 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Fri, 4 Oct 2019 15:27:18 +0200 Subject: [PATCH] Fix documentation --- docs/source/api_reference/local_tile_layer.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/source/api_reference/local_tile_layer.rst b/docs/source/api_reference/local_tile_layer.rst index 4f06969fc..ccd8fe707 100644 --- a/docs/source/api_reference/local_tile_layer.rst +++ b/docs/source/api_reference/local_tile_layer.rst @@ -9,15 +9,21 @@ Example from ipyleaflet import Map, LocalTileLayer m = Map(center=(52.204793, 360.121558), zoom=9) - m.add_layer(LocalTileLayer(url='./tiles/{z}/{x}/{y}.png')) + m.add_layer(LocalTileLayer(path='tiles/{z}/{x}/{y}.png')) m +Note that the behavior is different in Jupyter Notebook and in JupyterLab. + +In the classic Jupyter Notebook, the path is relative to the Notebook you are working on. + +In JupyterLab, the path is relative to the server (where you started JupyterLab) and you need to prefix the path with "files/". + Attributes ---------- =============== ================= ===== Attribute Default Value Doc =============== ================= ===== -url "" Relative URL (e.g. './tiles/{z}/{x}/{y}.png') +path "" Relative URL (e.g. 'tiles/{z}/{x}/{y}.png' or 'files/tiles/{z}/{x}/{y}.png' in JupyterLab) =============== ================= =====