diff --git a/.gitignore b/.gitignore index e12569e..f61a224 100644 --- a/.gitignore +++ b/.gitignore @@ -153,3 +153,4 @@ checklink/cookies.txt /.quarto/ token deps/ +token diff --git a/00_ipyleaflet.ipynb b/00_ipyleaflet.ipynb index c3e9547..feb3eb9 100644 --- a/00_ipyleaflet.ipynb +++ b/00_ipyleaflet.ipynb @@ -93,7 +93,10 @@ " Attributes:\n", " ee_object: An Earth Engine object.\n", " \"\"\"\n", - " def __init__(self, ee_object, *args, **kwargs):\n", + " def __init__(self,\n", + " ee_object:ee.Image, # An Earth Engine Image object\n", + " *args,\n", + " **kwargs):\n", "\n", " self.ee_object = ee_object\n", "\n", @@ -169,7 +172,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "90d04588ef494b338dc86dbed39d884c", + "model_id": "9c92cd072665439c9cb1d82025862a63", "version_major": 2, "version_minor": 0 }, @@ -224,7 +227,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "017c4f199e9b4aa39198aa62dafed0e3", + "model_id": "4fd1052d0cf840e3b0f00766603b9305", "version_major": 2, "version_minor": 0 }, @@ -269,7 +272,10 @@ "class Inspector(ipytree.Tree):\n", " \"\"\"Class representing an inspector tool that responds to map events.\"\"\"\n", " \n", - " def __init__(self, map_object=None, *args, **kwargs):\n", + " def __init__(self,\n", + " map_object=None, # An Earth Engine Image object\n", + " *args,\n", + " **kwargs):\n", "\n", " point_folder = ipytree.Node('Point', icon='map')\n", " pixels_folder = ipytree.Node('Pixels', icon='archive')\n", @@ -463,7 +469,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "0da6c2dbbbd64ae3ba3b751f3ff8511a", + "model_id": "52eda6333bb642d89036fac86fda9acb", "version_major": 2, "version_minor": 0 }, @@ -508,7 +514,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "fa76672a6a5b4099be4845914f7d7316", + "model_id": "eaaafd480d5240ca9811ad636ad7aa03", "version_major": 2, "version_minor": 0 }, diff --git a/README.md b/README.md index 3fd5172..6fa90c2 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,10 @@ display(HBox([map1, inspector1])) > **Tip With Caption** > -> Note that Jupyter widgets do not interact with each other when -> published as documentation. Open up this notebook in a Jupyter -> environment to see the interaction. +> Note that when viewed on GitHub Pages you can manipulate Jupyter +> widgets independently, but the widgets do not interact with each +> other. To experience the cross-widget interactivity, open up this +> notebook in a Jupyter environment. diff --git a/ee_jupyter/ipyleaflet.py b/ee_jupyter/ipyleaflet.py index 904bb49..225c011 100644 --- a/ee_jupyter/ipyleaflet.py +++ b/ee_jupyter/ipyleaflet.py @@ -19,7 +19,10 @@ class TileLayerEE(ipyleaflet.TileLayer): Attributes: ee_object: An Earth Engine object. """ - def __init__(self, ee_object, *args, **kwargs): + def __init__(self, + ee_object:ee.Image, # An Earth Engine Image object + *args, + **kwargs): self.ee_object = ee_object @@ -84,7 +87,10 @@ def get_tile_layer_url(ee_image_object): class Inspector(ipytree.Tree): """Class representing an inspector tool that responds to map events.""" - def __init__(self, map_object=None, *args, **kwargs): + def __init__(self, + map_object=None, # An Earth Engine Image object + *args, + **kwargs): point_folder = ipytree.Node('Point', icon='map') pixels_folder = ipytree.Node('Pixels', icon='archive') diff --git a/index.ipynb b/index.ipynb index 1c473ba..699bc7d 100644 --- a/index.ipynb +++ b/index.ipynb @@ -205,7 +205,7 @@ ":::{.callout-tip}\n", "## Tip With Caption\n", "\n", - "Note that Jupyter widgets do not interact with each other when published as documentation. Open up this notebook in a Jupyter environment to see the interaction. \n", + "Note that when viewed on GitHub Pages you can manipulate Jupyter widgets independently, but the widgets do not interact with each other. To experience the cross-widget interactivity, open up this notebook in a Jupyter environment. \n", ":::" ] }, diff --git a/index_files/figure-gfm/cell-8-output-1.png b/index_files/figure-gfm/cell-8-output-1.png new file mode 100644 index 0000000..e21220b Binary files /dev/null and b/index_files/figure-gfm/cell-8-output-1.png differ