Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a small introduction text/displace text from usage to this introd… #992

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added docs/source/_static/gallery.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions docs/source/index.rst
@@ -1,12 +1,15 @@
ipyleaflet: Interactive maps in the Jupyter notebook
====================================================
Introduction to ipyleaflet
==========================
Ipyleaflet is a Jupyter / Leaflet bridge enabling interactive maps in the Jupyter notebook. It is an interactive widgets library, based on ipywidgets. This means that everything in ipyleaflet (e.g. the Map, TileLayers, Layers, Controls…) is interactive: you can dynamically update attributes from Python or from the Notebook interface.

.. image:: _static/gallery.gif
:width: 1200

Try it online
-------------

You can give ipyleaflet a try in this documentation by clicking on `Try it on RetroLab <https://ipyleaflet.readthedocs.io/en/latest/lite/retro>`__ or
`Try it on JupyterLab <https://ipyleaflet.readthedocs.io/en/latest/lite/lab>`__.
You can give ipyleaflet a try in this documentation by clicking on `Try it on RetroLite <https://ipyleaflet.readthedocs.io/en/latest/lite/retro>`__ or
`Try it on JupyterLite <https://ipyleaflet.readthedocs.io/en/latest/lite/lab>`__.

Index
-----
Expand Down
6 changes: 1 addition & 5 deletions docs/source/usage/index.rst
Expand Up @@ -3,11 +3,7 @@
Usage
=====

ipyleaflet is an interactive widgets library, it is based on `ipywidgets <https://github.com/jupyter-widgets/ipywidgets/>`_.
This means that everything in ipyleaflet (e.g. the ``Map``, ``TileLayers``, ``Markers``...) is interactive: you can dynamically update
attributes from Python or from the Notebook interface.

For example, you can create a ``Marker`` layer and interact with it:
In the following example, a ``Marker`` layer is created and one interacts with it:

.. code::

Expand Down
49 changes: 39 additions & 10 deletions examples/BaseMap.ipynb
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -11,19 +11,48 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2395000484b445ca8a84934119bd192f",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Map(center=[52, 10], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'zoom_out_tex…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"m = Map(center=(52, 10), zoom=8, basemap=basemaps.OpenStreetMap.Mapnik)\n",
"m"
"m = Map(center=(52, 10), zoom=8, basemap=basemaps.OpenStreetMap.Mapnik)"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2395000484b445ca8a84934119bd192f",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Map(bottom=21848.0, center=[52, 10], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"strava_all = basemap_to_tiles(basemaps.Strava.All)\n",
"m.add(strava_all)"
Expand Down Expand Up @@ -108,7 +137,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -122,9 +151,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
"version": "3.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}