Skip to content

Layer styling

image image image

Change Layer Styles Interactively

Uncomment the following line to install leafmap if needed.

1
# %pip install "leafmap[maplibre]"
1
import leafmap.maplibregl as leafmap

Styling points.

1
2
3
4
5
6
m = leafmap.Map(sidebar_visible=True)
url = (
    "https://github.com/opengeos/datasets/releases/download/world/world_cities.geojson"
)
m.add_geojson(url, name="Points")
m

image

Styling lines.

1
2
3
4
m = leafmap.Map(sidebar_visible=True)
url = "https://github.com/opengeos/datasets/releases/download/vector/cables.geojson"
m.add_geojson(url, name="Lines")
m

Styling polygons.

1
2
3
4
m = leafmap.Map(sidebar_visible=True)
url = "https://github.com/opengeos/datasets/releases/download/world/countries.geojson"
m.add_geojson(url, name="Polygons")
m
1