Skip to content

Commit

Permalink
Merge pull request #868 from jmp75/docs
Browse files Browse the repository at this point in the history
Add doc section for Map on basic layout options. Issue #750
  • Loading branch information
martinRenou authored Sep 13, 2021
2 parents 126fce5 + d324c65 commit 65a8761
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/source/api_reference/map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@ You can add multiple layers and controls to the map, using the ``add_layer``/``a

m

As a Jupyter interactive widget, the layout of the ``Map`` object is specified by a Layout attribute. See `Layout and Styling of Jupyter widgets <https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Styling.html/>`_ for details.

.. jupyter-execute::

from ipyleaflet import Map, basemaps, basemap_to_tiles
from ipywidgets import Layout

m = Map(
basemap=basemap_to_tiles(basemaps.NASAGIBS.ModisTerraTrueColorCR, "2017-04-08"),
center=(52.204793, 360.121558),
zoom=4,
layout=Layout(width='80%', height='500px')
)

m.add_layer(Marker(location=(52.204793, 360.121558)))

m

Save to HTML
------------

Expand Down

0 comments on commit 65a8761

Please sign in to comment.