01 leafmap intro

Introducing the leafmap Python package for interactive mapping
Uncomment the following line to install leafmap if needed.
leafmap has four plotting backends: folium, ipyleaflet, here-map, and kepler.gl. Note that the backends do not offer equal functionality. Some interactive functionality in ipyleaflet might not be available in other plotting backends. To use a specific plotting backend, use one of the following:
import leafmap.leafmap as leafmap
import leafmap.foliumap as leafmap
import leafmap.heremap as leafmap
import leafmap.kepler as leafmap
Create an interactive map.
Specify the default map center and zoom level.
| m = leafmap.Map(center=[50, 19], zoom=4) # center=[lat, lon]
m
|
Set the visibility of map controls.
| m = leafmap.Map(
draw_control=False,
measure_control=False,
fullscreen_control=False,
attribution_control=True,
)
m
|
Change the map width and height.
| m = leafmap.Map(height="450px", width="800px")
m
|
Use the ipyleaflet plotting backend.
| import leafmap.leafmap as leafmap
|
Use the folium plotting backend.
| import leafmap.foliumap as leafmap
|