A Jupyter - Leaflet.js bridge

Overview

ipyleaflet

Documentation Binder Join the Gitter Chat Downloads

A Jupyter / Leaflet bridge enabling interactive maps in the Jupyter notebook.

Usage

Selecting a basemap for a leaflet map:

Basemap Screencast

Loading a geojson map:

GeoJSON Screencast

Making use of leafletjs primitives:

Primitives Screencast

Using the splitmap control:

Splitmap Screencast

Displaying velocity data on the top of a map:

Velocity Screencast

Choropleth layer:

Choropleth Screencast

Widget control

Widget Control

Installation

Using conda:

conda install -c conda-forge ipyleaflet

Using pip:

pip install ipyleaflet

If you are using the classic Jupyter Notebook < 5.3 you need to run this extra command:

jupyter nbextension enable --py --sys-prefix ipyleaflet

If you are using JupyterLab <=2, you will need to install the JupyterLab extension:

jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-leaflet

Installation from sources

For a development installation (requires yarn, you can install it with conda install -c conda-forge yarn):

git clone https://github.com/jupyter-widgets/ipyleaflet.git
cd ipyleaflet
pip install -e .

If you are using the classic Jupyter Notebook you need to install the nbextension:

jupyter nbextension install --py --symlink --sys-prefix ipyleaflet
jupyter nbextension enable --py --sys-prefix ipyleaflet

Note for developers:

  • the -e pip option allows one to modify the Python code in-place. Restart the kernel in order to see the changes.
  • the --symlink argument on Linux or OS X allows one to modify the JavaScript code in-place. This feature is not available with Windows.

For developing with JupyterLab:

jupyter labextension develop ipyleaflet

Documentation

To get started with using ipyleaflet, check out the full documentation

https://ipyleaflet.readthedocs.io/

License

We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.

This software is licensed under the MIT license. See the LICENSE file for details.

Related projects

The ipyleaflet repository includes the jupyter-leaflet npm package, which is a front-end component, and the ipyleaflet python package which is the backend for the Python Jupyter kernel.

Similarly, the xleaflet project provides a backend to jupyter-leaflet for the "xeus-cling" C++ Jupyter kernel.

Xleaflet Screencast

Comments
  • Error displaying map in jupyter lab

    Error displaying map in jupyter lab

    Hi,

    ipyleaflet was working fine in Jupyter Lab until today.

    I read https://github.com/jupyter-widgets/ipyleaflet/issues/202, so I checked node. I'm using version 8.11.1.

    Just in case, I run jupyter labextension install jupyter-leaflet and jupyter labextension install @jupyter-widgets/jupyterlab-manager, but no luck.

    ipyleaflet_recorte

    It's working fine in a Jupyter Notebook

    opened by fitoprincipe 29
  • Add on_click to Marker objects

    Add on_click to Marker objects

    I tried out the new MarkerCluster capability in 0.5.3, and it works great in my notebook here: https://gist.github.com/anonymous/d414d59e50e57e23436adba70fd48b35 but I'm struggling a bit with the interaction. [BTW, this notebook should run anywhere, as it uses only web services to aquire data]

    I was originally plotting markers using geoJSON, and the interaction I'm looking for is to return the name of the marker to python when I click on it. In cell [13], with geoJSON, I use feature_layer.on_click to specifying printing the name of the marker below the plot. This works great:

    2017-12-19_14-51-54

    I would like to do the same in cell [15], using MarkerCluster, but I cannot figure out how to get the name of the marker back on click: 2017-12-19_14-53-27

    There is no feature_layer.on_click for MarkerCluster, and I guess that make sense since I really just need interaction with the individual Marker objects, right?

    But the Marker objects don't seem to have on_click either. Would it be on_trait_change?

    Feature Request 
    opened by rsignell-usgs 23
  • "loading" as an attribute of TileLayer?

    Hi all,

    the new show_loading attribute added recently to the TileLayer class shows an animation each time any tile is loading, it is fine, but wouldn't it be better if a loading property (read only attribute) is set to True each time any tile is loading? Therefore we could make use of it our own way.

    Enhancement Good First Issue 
    opened by fitoprincipe 22
  • Change cursor style over Map

    Change cursor style over Map

    It would be great if somehow the map's cursor could be changed to any of the supported styles. It is not hard to do it on the JavaScript side, just changing Map's cursor style (stackoverflow), but I wouldn't know how to do it on ipyleaflet widget

    Feature Request Good First Issue 
    opened by fitoprincipe 22
  • 0.15.0: pep517 build fails

    0.15.0: pep517 build fails

    I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

    • python3 -sBm build -w --no-isolation
    • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules

    Here is output of the build:

    + /usr/bin/python3 -sBm build -w --no-isolation
    * Getting dependencies for wheel...
    setup.py:38: DeprecatedWarning: create_cmdclass is deprecated as of 0.8 and will be removed in 1.0. "
    Use `wrap_installers` to handle prebuild steps in cmdclass.
    Use `get_data_files` to handle data files.
    Use `include_package_data=True` and `MANIFEST.in` for package data.
    
      cmdclass = create_cmdclass('jsdeps', data_files_spec=data_files_spec)
    setup.py:40: DeprecatedWarning: install_npm is deprecated as of 0.8 and will be removed in 1.0. Use `npm_builder` and `wrap_installers`
      install_npm(js_dir, npm=["yarn"], build_cmd='build:extensions'), ensure_targets(jstargets),
    running egg_info
    creating ipyleaflet.egg-info
    writing manifest file 'ipyleaflet.egg-info/SOURCES.txt'
    warning: no files found matching '*.*' under directory 'ipyleaflet/nbextension'
    warning: no files found matching '*.*' under directory 'ipyleaflet/labextension'
    writing manifest file 'ipyleaflet.egg-info/SOURCES.txt'
    * Building wheel...
    setup.py:38: DeprecatedWarning: create_cmdclass is deprecated as of 0.8 and will be removed in 1.0. "
    Use `wrap_installers` to handle prebuild steps in cmdclass.
    Use `get_data_files` to handle data files.
    Use `include_package_data=True` and `MANIFEST.in` for package data.
    
      cmdclass = create_cmdclass('jsdeps', data_files_spec=data_files_spec)
    setup.py:40: DeprecatedWarning: install_npm is deprecated as of 0.8 and will be removed in 1.0. Use `npm_builder` and `wrap_installers`
      install_npm(js_dir, npm=["yarn"], build_cmd='build:extensions'), ensure_targets(jstargets),
    running bdist_wheel
    running jsdeps
    yarn not found, ignoring yarn.lock file
    `yarn` unavailable.  If you're running this command using sudo, make sure `yarn` is available to sudo
    Traceback (most recent call last):
      File "/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 363, in <module>
        main()
      File "/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 345, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/usr/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 261, in build_wheel
        return _build_backend().build_wheel(wheel_directory, config_settings,
      File "/usr/lib/python3.8/site-packages/setuptools/build_meta.py", line 230, in build_wheel
        return self._build_with_temp_dir(['bdist_wheel'], '.whl',
      File "/usr/lib/python3.8/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
        self.run_setup()
      File "/usr/lib/python3.8/site-packages/setuptools/build_meta.py", line 158, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 83, in <module>
        setup(**setup_args)
      File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
        return run_commands(dist)
      File "/usr/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
        dist.run_commands()
      File "/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 640, in run
        [self.run_command(cmd) for cmd in cmds]
      File "/usr/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 640, in <listcomp>
        [self.run_command(cmd) for cmd in cmds]
      File "/usr/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 390, in run
        self.command.run()
      File "/usr/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 321, in run
        c.run()
      File "/usr/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 409, in run
        raise ValueError(('missing files: %s' % missing))
    ValueError: missing files: ['ipyleaflet/nbextension/index.js', 'ipyleaflet/labextension/package.json']
    
    ERROR Backend subproccess exited when trying to invoke build_wheel
    
    opened by kloczek 19
  • How to display map object using ipyleaflet in jupyter notebook or jupyter Lab

    How to display map object using ipyleaflet in jupyter notebook or jupyter Lab

    I am trying to run jupyter notebook and/or jupyter Lab on mac book Catalina.

    Code

    from ipyleaflet import Map, Marker
    
    start_location = (53.551086, 9.993682)
    
    m = Map(center=start_location, zoom=16, scroll_wheel_zoom=True)
    
    display(m)
    

    I get no error message pops up in notebook. The map object does not display but gets created. type(m) outputs ipyleaflet.leaflet.Map

    In jupyter Lab I get this error message : Error displaying widget: model not found

    I have followed these suggestions : ipyleaflet-map-object-doesnt-display-in-jupyter-notebook-but-it-gets-created and ipyleaflet/issues/504 but it did not solve my problem.
    . I have run jupyter labextension install jupyter-leaflet in my environment, and now get Loading widget... as output in Jupyter Lab. They is still ne hint in Jupyter notebook

    Any hints on what I should try next? Thanks

    opened by Sowkel 19
  • TileLayer: Simplify the max_zoom logic

    TileLayer: Simplify the max_zoom logic

    I'm hoping/thinking this might just be a user issue on my end, but it is currently appearing that TileLayer's max_zoom value is capped at 18 even after setting it to a higher value. For example, in this MyBinder demo's example.ipynb: https://mybinder.org/v2/gh/banesullivan/localtileserver-demo/HEAD which I have modified below:

    from localtileserver import examples, get_leaflet_tile_layer, TileClient
    from ipyleaflet import Map
    
    # Create a tile server from an raster URL
    oam = TileClient('https://oin-hotosm.s3.amazonaws.com/59c66c5223c8440011d7b1e4/0/7ad397c0-bba2-4f98-a08a-931ec3a6e943.tif')
    
    # Create ipyleaflet TileLayer from that server
    # Please note that all extra kwargs are passed to `TileLayer`
    oam_layer = get_leaflet_tile_layer(oam, max_zoom=24, show_loading=True)
    
    # Create ipyleaflet map, add layers, add controls, and display
    m = Map(center=oam.center(), zoom=20, max_zoom=100)
    m.add_layer(oam_layer)
    m
    
    >>> from ipyleaflet import TileLayer
    >>> isinstance(oam_layer, TileLayer)
    True
    >>> oam_layer.max_zoom
    24
    

    No matter how much I zoom in, I can watch the network tab in the browser and see that the tile requests coming from that TileLayer never exceed zoom level 18, e.g., .../proxy/41129/api/tiles/18/85161/117721.png

    Screen Shot 2022-02-10 at 10 29 10 AM

    I know that this image source has a max zoom level of 24 and localtileserver will continue serving tiles at whatever zoom level is requested regardless of the cap in the data source.

    So I'm wondering what is missing here to make sure TileLayer can continue to fetch tiles beyond zoom level 18.

    Additional context

    | ipyleaflet | CesiumJS | |---|---| | in the share mybinder | https://tileserver.banesullivan.com/?filename=https%3A%2F%2Foin-hotosm.s3.amazonaws.com%2F59c66c5223c8440011d7b1e4%2F0%2F7ad397c0-bba2-4f98-a08a-931ec3a6e943.tif | | Screen Shot 2022-02-10 at 10 35 25 AM | Screen Shot 2022-02-10 at 10 35 45 AM |

    This is very high resolution imagery and it'd be fantastic to visualize at full resolution with ipyleaflet

    Enhancement Good First Issue 
    opened by banesullivan 18
  • LocalTileLayer not visible

    LocalTileLayer not visible

    The following shows open street map but no additional layers:

    import ipyleaflet
    m = ipyleaflet.Map(center=(10, 36),zoom=5)
    m.add_layer(ipyleaflet.LocalTileLayer(url="./tileset/{z}/{x}/{y}.png"))
    m
    

    No errors or anything in the jupyter lab console log.

    I created the tileset with gdal2tiles, which conveniently creates a "leaflet.html" file within "./tileset". When I use the jupter lab file browser to open that html file in a new browser window, I get a lot of 403's saying "blocking request with no referer". But I don't see anything like that in the javascript console with they ipyleaflet chunk above, so possibly not relevant.

    Some version info:

    $ pip list | grep ipy
    ipykernel                     5.1.2      
    ipyleaflet                    0.11.2     
    ipython                       7.6.1      
    ipython-genutils              0.2.0      
    ipywidgets                    7.5.1      
    scipy                         1.2.1      
    $ pip list | grep jupyter
    jupyter                       1.0.0      
    jupyter-client                5.3.1      
    jupyter-console               6.0.0      
    jupyter-core                  4.5.0      
    jupyterlab                    1.1.2      
    jupyterlab-git                0.8.1      
    jupyterlab-server             1.0.6
    
    Bug 
    opened by itcarroll 18
  • NAD27 CRS support in ipyleaflet

    NAD27 CRS support in ipyleaflet

    I'm working in oil/gas industry, and the most common CRS datum used in USA is NAD27 instead of WGS84. Stateplane and UTM are two major projections for map display.

    for example, EPSG:32040 : NAD27 / Texas South Central https://epsg.io/32040 EPSG:26715: NAD27 / UTM zone 15N https://epsg.io/26715

    Can anybody tell me if it is possible to add NAD27 with stateplane/UTM CRS to ipyleaflet and how?

    opened by wdmhouston 17
  • Remove xarray dependency

    Remove xarray dependency

    Removes xarray from the dependencies of ipyleaflet.

    Although ipyleaflet has xarray listed in its install_requires I'm not exactly sure why it needs this dependency. It would be great if when I installed ipyleaflet, I didn't also have to install xarray (which, in turn, pulls in pandas) as a transitive dependency.

    opened by stephaniegott 17
  • ipyleaflet does not work in jupyter lab -

    ipyleaflet does not work in jupyter lab - "Error displaying widget: model not found"

    After having failed to get ipyleaflet to work from the released packages I decided to try installing from the current git repo master branch.

    Oddly if I run juptyer notebook then the maps do render correctly.

    To create clean environment:

    git clone https://github.com/jupyter-widgets/ipyleaflet.git
    cd ipyleaflet
    pipenv shell
    pipenv install jupyterlab
    pip install -e .
    jupyter nbextension install --py --symlink --sys-prefix ipyleaflet
    jupyter nbextension enable --py --sys-prefix ipyleaflet
    jupyter labextension install @jupyter-widgets/jupyterlab-manager
    

    Versions:

    python --version
    Python 3.6.7
    
    jupyter lab --version
    1.1.1
    
    jupyter nbextension list
    Known nbextensions:
      config dir: /home/xxxxxx/.local/share/virtualenvs/ipyleaflet-ot3agPQM/etc/jupyter/nbconfig
        notebook section
          jupyter-js-widgets/extension  enabled
          - Validating: OK
          jupyter-leaflet/extension  enabled
          - Validating: OK
    
    

    If I then execute a simple statement in a notebook after running jupyter lab

    from ipyleaflet import *
    m = Map(center=(52, 10), zoom=8, basemap=basemaps.Hydda.Full)
    m
    

    Error displaying widget: model not found

    Browser console log has following errors:

    Could not instantiate widget manager-base.js:273:32
        _make_model manager-base.js:273
        l manager-base.js:44
        s manager-base.js:25
        s manager-base.js:17
    Error: "Could not create a model."
        n utils.js:119
    utils.js:119:20
        n utils.js:119
    Exception opening new comm default.js:1001:20
        _handleCommOpen default.js:1001
    Error: "Module jupyter-leaflet, semver range ^0.11.1 is not registered as a widget module"
        loadClass manager.js:251
        _make_model manager-base.js:263
        l manager-base.js:44
        s manager-base.js:25
        L manager-base.js:19
        L manager-base.js:15
        _make_model manager-base.js:257
        new_model manager-base.js:246
        l manager-base.js:44
        s manager-base.js:25
        L manager-base.js:19
        L manager-base.js:15
        new_model manager-base.js:232
        handle_comm_open manager-base.js:144
        _handleCommOpen manager.js:59
        _handleCommOpen default.js:995
    default.js:127:24
    
    

    Any hints on what I should try next? Thanks

    opened by dazzag24 17
  • Bump json5 from 2.2.1 to 2.2.3 in /ui-tests

    Bump json5 from 2.2.1 to 2.2.3 in /ui-tests

    Bumps json5 from 2.2.1 to 2.2.3.

    Release notes

    Sourced from json5's releases.

    v2.2.3

    v2.2.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).
    Changelog

    Sourced from json5's changelog.

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).
    Commits
    • c3a7524 2.2.3
    • 94fd06d docs: update CHANGELOG for v2.2.3
    • 3b8cebf docs(security): use GitHub security advisories
    • f0fd9e1 docs: publish a security policy
    • 6a91a05 docs(template): bug -> bug report
    • 14f8cb1 2.2.2
    • 10cc7ca docs: update CHANGELOG for v2.2.2
    • 7774c10 fix: add proto to objects and arrays
    • edde30a Readme: slight tweak to intro
    • 97286f8 Improve example in readme
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump json5 from 1.0.1 to 1.0.2 in /js

    Bump json5 from 1.0.1 to 1.0.2 in /js

    Bumps json5 from 1.0.1 to 1.0.2.

    Release notes

    Sourced from json5's releases.

    v1.0.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295). This has been backported to v1. (#298)
    Changelog

    Sourced from json5's changelog.

    Unreleased [code, diff]

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2 [code, diff]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Update to JupyterLite 0.1.0b17

    Update to JupyterLite 0.1.0b17

    With JupyterLite 0.1.0b17, the piplite_urls configuration has changed and should now be put under the PipliteAddon field: https://github.com/jupyterlite/jupyterlite/releases/tag/v0.1.0b17

    • [x] Update to jupyterlite==0.1.0b17 (strict pin for now)
    • [x] Update the piplite_urls configuration
    opened by jtpio 0
  • Panel 0.14.2 shows a ipyleaflet Map as grey

    Panel 0.14.2 shows a ipyleaflet Map as grey

    Using Panel 0.14.2

    import panel as pn
    pn.extension('ipywidgets')
    from ipyleaflet import Map, basemaps
    
    center = [38.128, 2.588]
    zoom = 5
    
    m = Map(basemap=basemaps.OpenStreetMap.Mapnik, center=center, zoom=zoom)
    
    pn.panel(m).servable(target='main')
    

    image

    opened by itsgifnotjiff 1
  • Export layers as svg/png?

    Export layers as svg/png?

    How can I export a leaflet vector layer as svg file? Also see

    https://stackoverflow.com/questions/44800396/python-ipyleaflet-export-map-as-png-or-jpg-or-svg/74994981#74994981

    opened by stefaneidelloth 0
  • No Map object output when executing Popup Documentation example

    No Map object output when executing Popup Documentation example

    When running the example code at: https://ipyleaflet.readthedocs.io/en/latest/layers/popup.html in VS Code, I am not getting any output. From this example I am expecting three outputs; a map, a marker with a popup, and a popup at the center of the map.

    If I uncomment m.add_layer(popup) I get a map output, but it is lacking the Marker and the center popup. If I then comment out marker.popup, I get a map with the center popup. Finally if I remove the argument child=message1 from Popup object creation, I get the map, the marker, and an empty popup window in the center of the map. It seems anything related to the message1 or message2 variable silently fail.

    When I check on the message1 variable through a simple print, I do see HTML(value='Try clicking the marker!').

    I am curious to see if this has something to do with my set up, so just seeing if someone can replicate this behavior would be great! Even if it is related to my set up, I am wondering if a louder failure might be an appropriate addition.

    Thank you!

    opened by ladoramkershner 0
Releases(0.17.2)
  • 0.17.2(Oct 19, 2022)

    Bug fixes

    • Fix view bounds by @davidbrochart in https://github.com/jupyter-widgets/ipyleaflet/pull/1064

    New features

    • Add subitems to layers by @HaudinFlorence in https://github.com/jupyter-widgets/ipyleaflet/pull/1011

    Maintenance

    • JS linters by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/1057
    • Add pandas to bot by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/1056
    • Fix Galata bot by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/1055
    • Update the way we run UI-tests by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/1054
    • Corrected cursor name by @tylere in https://github.com/jupyter-widgets/ipyleaflet/pull/1047
    • Fixup yarn.lock by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/1043

    Full Changelog: https://github.com/jupyter-widgets/ipyleaflet/compare/0.17.1...0.17.2

    Source code(tar.gz)
    Source code(zip)
  • 0.17.1(Aug 23, 2022)

    New features

    • Add a colormap control to be used with Choropleth layer by @HaudinFlorence in https://github.com/jupyter-widgets/ipyleaflet/pull/1010
    • Add zoom_offset param to TileLayer by @ned2 in https://github.com/jupyter-widgets/ipyleaflet/pull/1023
    • Add support for as_leaflet_layer in Map.add by @banesullivan in https://github.com/jupyter-widgets/ipyleaflet/pull/1033 and @davidbrochart in https://github.com/jupyter-widgets/ipyleaflet/pull/1037
    • ipywidgets 8.0 support by @jasongrout in https://github.com/jupyter-widgets/ipyleaflet/pull/968

    Maintenance

    • Pin nodejs=16, drop base setup by @davidbrochart in https://github.com/jupyter-widgets/ipyleaflet/pull/1017
    • Remove HikeBike basemap from the examples by @HaudinFlorence in https://github.com/jupyter-widgets/ipyleaflet/pull/1039

    Documentation

    • Use the latest jupyterlite-sphinx release on ReadTheDocs by @jtpio in https://github.com/jupyter-widgets/ipyleaflet/pull/1026
    • Lazy-load the JupyterLite embedded page in documentation by @HaudinFlorence in https://github.com/jupyter-widgets/ipyleaflet/pull/1007

    New Contributors

    • @ned2 made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/1023

    Full Changelog: https://github.com/jupyter-widgets/ipyleaflet/compare/0.17.0...0.17.1

    Source code(tar.gz)
    Source code(zip)
  • 0.17.0(Jul 25, 2022)

    New Features

    • Make it possible to use Choropleth layer with data containing NaNs #972
    • Add Map panes #999
    • Allow setting Map.dragging #1001
    • Add visible attribute to GeoJSON layer #1002

    Deprecated API

    • Deprecate LegendControl properties name, legends, positioning, and positionning #979 and #1005. Update your code with the following substitutions for a LegendControl legend:

      • legend.name -> legend.title
      • legend.legends -> legend.legend
      • legend.positioning -> legend.position
      • legend.positionnning -> legend.position

      The name argument in creating a LegendControl is also deprecated, please use the title argument instead: LegendControl({}, title='My Title').

    • Deprecate layer and control-specific method names for Map and LayerGroup, in favor of methods that work for both layers and controls #982. Update your code with the following substitutions for a Map map (or LayerGroup):

      • map.add_control(...) or map.add_layer(...) -> map.add(...)
      • map.remove_control(...) or map.remove_layer(...) -> map.remove(...)
      • map.substitute_control(...) or map.substitute_layer(...) -> map.substitute(...)
      • map.clear_controls(...) or map.clear_layers(...) -> map.clear(...)

      The inline operators still continue to work as before, such as map += control or map -= layer.

    Maintenance

    • Compute the public path automatically #988

    Docs

    • Document use of multiple basemaps #971
    • Add a small introduction text #992

    New Contributors

    • @whudson made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/971
    • @banesullivan made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/976
    • @xiaochen-db made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/997

    Full Changelog: https://github.com/jupyter-widgets/ipyleaflet/compare/0.16.0...0.17.0

    Source code(tar.gz)
    Source code(zip)
  • 0.16.0(Apr 14, 2022)

    What's Changed

    New features

    • Add bounds attribute to TileLayer by @davidbrochart in https://github.com/jupyter-widgets/ipyleaflet/pull/907
    • Implemented open_popup and close_popup methods by @PROgram52bc in https://github.com/jupyter-widgets/ipyleaflet/pull/914

    Maintainance

    • Stop layer loading spinner when layer is removed by @clydebw in https://github.com/jupyter-widgets/ipyleaflet/pull/903
    • Added backward compatibility for dict basemaps by @sackh in https://github.com/jupyter-widgets/ipyleaflet/pull/901
    • Pin openssl=1.1.1l in CI script by @trungleduc in https://github.com/jupyter-widgets/ipyleaflet/pull/906
    • Test ipyleaflet widgets with galata by @trungleduc in https://github.com/jupyter-widgets/ipyleaflet/pull/905
    • Clean up UI tests by @davidbrochart in https://github.com/jupyter-widgets/ipyleaflet/pull/908
    • Remove map callbacks when DrawControl removed from map by @clydebw in https://github.com/jupyter-widgets/ipyleaflet/pull/916
    • Add Galata bot by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/938
    • Fix CI by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/946
    • Fix Galata screenshot update CI job by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/945
    • Missing jupyter-packaging on CI by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/948
    • Fix ui-tests port by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/949
    • UI-tests: Update scripts to match bot implementation by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/950
    • Remove OpenSSL pinning by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/952
    • Update Galata screenshots by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/947
    • Update build script by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/954
    • Fix watch script in ipyleaflet by @HaudinFlorence in https://github.com/jupyter-widgets/ipyleaflet/pull/963

    Docs:

    • Fix docs table by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/898
    • Update basemaps by @MackyDIARRA in https://github.com/jupyter-widgets/ipyleaflet/pull/924
    • Updates on ipyleaflet documentation by @HaudinFlorence in https://github.com/jupyter-widgets/ipyleaflet/pull/953
    • Change the theme to pydata-sphynx-theme by @HaudinFlorence in https://github.com/jupyter-widgets/ipyleaflet/pull/955
    • Update installation instructions by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/956
    • Add to ipyleaflet's documentation some missing attributes sections with autodoc. by @HaudinFlorence in https://github.com/jupyter-widgets/ipyleaflet/pull/957
    • Add jupyterlite-sphinx by @HaudinFlorence in https://github.com/jupyter-widgets/ipyleaflet/pull/958
    • Fix formatting issues in the doc for attributes and methods sections using autodoc by @HaudinFlorence in https://github.com/jupyter-widgets/ipyleaflet/pull/959
    • radiation notebook updated with SearchControl object adding by @MackyDIARRA in https://github.com/jupyter-widgets/ipyleaflet/pull/899

    New Contributors

    • @clydebw made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/903
    • @trungleduc made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/906
    • @PROgram52bc made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/914
    • @HaudinFlorence made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/953

    Full Changelog: https://github.com/jupyter-widgets/ipyleaflet/compare/0.15.0...master

    Source code(tar.gz)
    Source code(zip)
  • 0.15.0(Dec 6, 2021)

    What's Changed

    • Added a new Map option "prefer_canvas". by @ondrejsv in https://github.com/jupyter-widgets/ipyleaflet/pull/853
    • Fixed typo by @giswqs in https://github.com/jupyter-widgets/ipyleaflet/pull/856
    • Fix for #865 : remove double slashes from Strava tile-URLs by @justb4 in https://github.com/jupyter-widgets/ipyleaflet/pull/870
    • Add doc section for Map on basic layout options. Issue #750 by @jmp75 in https://github.com/jupyter-widgets/ipyleaflet/pull/868
    • Added Colab support by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/871
    • Add radiation notebook by @MackyDIARRA in https://github.com/jupyter-widgets/ipyleaflet/pull/884
    • Added support for xyzservices tile providers as basemaps by @sackh in https://github.com/jupyter-widgets/ipyleaflet/pull/857
    • Support GeoJson layer in MarkerCluster by @mangecoeur in https://github.com/jupyter-widgets/ipyleaflet/pull/882
    • Fix docs by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/892
    • SearchControl: location found callback by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/891
    • Missing call to super.default by @martinRenou in https://github.com/jupyter-widgets/ipyleaflet/pull/894

    New Contributors

    • @ondrejsv made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/853
    • @justb4 made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/870
    • @MackyDIARRA made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/884
    • @mangecoeur made their first contribution in https://github.com/jupyter-widgets/ipyleaflet/pull/882

    Full Changelog: https://github.com/jupyter-widgets/ipyleaflet/compare/0.14.0...0.15.0

    Source code(tar.gz)
    Source code(zip)
  • 0.13.6(Jan 5, 2021)

  • 0.13.5(Jan 5, 2021)

  • 0.13.4(Dec 28, 2020)

    Improvements:

    • Improve GeoJSON data update #668
    • Add support for WKT layer #679
    • Add Gaode basemap #681
    • Change SearchControl zoom trait to None #688
    • Add example notebooks for KML and GPX file formats #691
    • Update GeoData API documentation to add point_stype attribute #695
    • Add a callback on found event for searching in GeoJSON layer #707
    • Add custom tile server GIF to example notebook #724
    • Add support for DivIcon #727
    • Support for transparent WidgetControl #732
    • Update LeafletJS from 1.3.0 to 1.7.1 #734
    • Add Map.fit_bounds(bounds) #737
    • Add MagnifyingGlass layer #733

    Fixes:

    • Add Shapely as a dependency #683
    • Add nodejs dependency to Binder environment #700
    • Set --minimize=False on Binder #704
    • Remove class_name #729
    • Change license to MIT #736
    • Fix WMS layer options #755
    Source code(tar.gz)
    Source code(zip)
  • 0.13.3(Jul 29, 2020)

  • 0.13.2(Jul 24, 2020)

  • 0.13.1(Jun 30, 2020)

    v0.13.1

    Improvements:

    • Add layer attribute for search control #622
    • Simplify main JS file #631
    • Remove Travis #627
    • Add GitHub Actions #626
    • Add docstrings #623 #628 #630
    • Implement __geo_interface__ #621
    • Add pixel_bounds to Map #616
    • Enable float zoom levels #608

    Fixes:

    • Pin branca>=0.3.1,<0.5 #639
    • Fix Icon traits #634 #636 #637
    • Fix GeoJSON click event #629
    • Fix bounds type #625
    • Fix ipyleaflet import #624
    • Fix EPSG:3413 and EPSG:3031 #620
    • Fix layer removal #619
    • Fix option update #611
    • Fix flake8 errors #609
    Source code(tar.gz)
    Source code(zip)
  • 0.13.0(May 25, 2020)

    Improvements:

    • Add support for custom map and WMS projections #598
    • Add SearchControl feature #576
    • Add SearchControl documentation #584
    • Add window_url attribute to Map #587
    • Add Vector tile docs #590

    Fixes:

    • Fix missing dependency in documentation #581
    • Fix overwriting of colormap ranges for Choropleth #577
    • Prevent updating dictionary in GeoJSON style_callback #600
    Source code(tar.gz)
    Source code(zip)
  • 0.12.6(May 12, 2020)

    Improvements:

    • Use leaflet-defaulticon-compatibility for icon image bundling #552
    • Fix issue with Phosphor dependency #563
    • Fix in the Vector tile layer #568
    • Bug fix with respect to the GeoJSON layer #572
    • Refactor GeoJSON layer #573
    • Add means to save to HTML #574
    • Improve docs #575
    • Make the xarray dependency optional #561
    Source code(tar.gz)
    Source code(zip)
  • 0.12.4(Apr 17, 2020)

    Improvements:

    • The package now ships the JupyterLab extension automatically. So jupyter labextension install jupyter-leaflet should not be needed anymore #510
    • Add support for int data in Choropleth #539
    • Add style_callback to GeoJSON/Choropleth/GeoData layers #518
    • Rename positional argument in handle_draw callback #530
    • Add VectorTilesLayer #544
    Source code(tar.gz)
    Source code(zip)
  • 0.12.3(Mar 3, 2020)

  • 0.12.2(Jan 31, 2020)

    Fixes:

    • Popup creation #489
    • DrawControl creation #493

    New features and improvements

    • Smoother URL changes on GridLayers #485
    • ScaleControl #492
    • Documentation improvements #484 #485
    • WMSLayer: Listen for dynamic changes on parameters #494
    Source code(tar.gz)
    Source code(zip)
Owner
Jupyter Widgets
Interactive Widgets for the Jupyter Notebook
Jupyter Widgets
A Jupyter - Three.js bridge

pythreejs A Python / ThreeJS bridge utilizing the Jupyter widget infrastructure. Getting Started Installation Using pip: pip install pythreejs And the

Jupyter Widgets 700 Feb 17, 2021
Python Data. Leaflet.js Maps.

folium Python Data, Leaflet.js Maps folium builds on the data wrangling strengths of the Python ecosystem and the mapping strengths of the Leaflet.js

null 6k Jan 2, 2023
Easily convert matplotlib plots from Python into interactive Leaflet web maps.

mplleaflet mplleaflet is a Python library that converts a matplotlib plot into a webpage containing a pannable, zoomable Leaflet map. It can also embe

Jacob Wasserman 502 Dec 28, 2022
Plotting library for IPython/Jupyter notebooks

bqplot 2-D plotting library for Project Jupyter Introduction bqplot is a 2-D visualization system for Jupyter, based on the constructs of the Grammar

null 3.4k Dec 29, 2022
Analytical Web Apps for Python, R, Julia, and Jupyter. No JavaScript Required.

Dash Dash is the most downloaded, trusted Python framework for building ML & data science web apps. Built on top of Plotly.js, React and Flask, Dash t

Plotly 17.9k Dec 31, 2022
An interactive GUI for WhiteboxTools in a Jupyter-based environment

whiteboxgui An interactive GUI for WhiteboxTools in a Jupyter-based environment GitHub repo: https://github.com/giswqs/whiteboxgui Documentation: http

Qiusheng Wu 105 Dec 15, 2022
Analytical Web Apps for Python, R, Julia, and Jupyter. No JavaScript Required.

Dash Dash is the most downloaded, trusted Python framework for building ML & data science web apps. Built on top of Plotly.js, React and Flask, Dash t

Plotly 13.9k Feb 13, 2021
Plotting library for IPython/Jupyter notebooks

bqplot 2-D plotting library for Project Jupyter Introduction bqplot is a 2-D visualization system for Jupyter, based on the constructs of the Grammar

null 3.4k Dec 30, 2022
IPython/Jupyter notebook module for Vega and Vega-Lite

IPython Vega IPython/Jupyter notebook module for Vega 5, and Vega-Lite 4. Notebooks with embedded visualizations can be viewed on GitHub and nbviewer.

Vega 335 Nov 29, 2022
Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js

pivottablejs: the Python module Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js Installation pip install pivot

Nicolas Kruchten 512 Dec 26, 2022
Analytical Web Apps for Python, R, Julia, and Jupyter. No JavaScript Required.

Dash Dash is the most downloaded, trusted Python framework for building ML & data science web apps. Built on top of Plotly.js, React and Flask, Dash t

Plotly 14k Feb 18, 2021
Plotting library for IPython/Jupyter notebooks

bqplot 2-D plotting library for Project Jupyter Introduction bqplot is a 2-D visualization system for Jupyter, based on the constructs of the Grammar

null 3k Feb 18, 2021
IPython/Jupyter notebook module for Vega and Vega-Lite

IPython Vega IPython/Jupyter notebook module for Vega 5, and Vega-Lite 4. Notebooks with embedded visualizations can be viewed on GitHub and nbviewer.

Vega 294 Feb 12, 2021
Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js

pivottablejs: the Python module Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js Installation pip install pivot

Nicolas Kruchten 419 Feb 11, 2021
Render Jupyter notebook in the terminal

jut - JUpyter notebook Terminal viewer. The command line tool view the IPython/Jupyter notebook in the terminal. Install pip install jut Usage $jut --

Kracekumar 169 Dec 27, 2022
Draw datasets from within Jupyter.

drawdata This small python app allows you to draw a dataset in a jupyter notebook. This should be very useful when teaching machine learning algorithm

vincent d warmerdam 505 Nov 27, 2022
Visual Python is a GUI-based Python code generator, developed on the Jupyter Notebook environment as an extension.

Visual Python is a GUI-based Python code generator, developed on the Jupyter Notebook environment as an extension.

Visual Python 564 Jan 3, 2023
High performance, editable, stylable datagrids in jupyter and jupyterlab

An ipywidgets wrapper of regular-table for Jupyter. Examples Two Billion Rows Notebook Click Events Notebook Edit Events Notebook Styling Notebook Pan

J.P. Morgan Chase 75 Dec 15, 2022
ipyvizzu - Jupyter notebook integration of Vizzu

ipyvizzu - Jupyter notebook integration of Vizzu. Tutorial · Examples · Repository About The Project ipyvizzu is the Jupyter Notebook integration of V

Vizzu 729 Jan 8, 2023