Skip to content

44 attribute table

image image image

Uncomment the following line to install leafmap if needed.

1
# !pip install leafmap
1
import leafmap

Add vector data to the map and use the GUI to open attribute table.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
m = leafmap.Map()

url = "https://raw.githubusercontent.com/opengeos/leafmap/master/examples/data/countries.geojson"
m.add_geojson(
    url,
    layer_name="Countries",
    fill_colors=["red", "yellow", "green", "orange"],
    info_mode=False,
)

in_geojson = (
    "https://github.com/opengeos/datasets/releases/download/vector/cables.geojson"
)
m.add_geojson(in_geojson, layer_name="Cable lines", info_mode=False)

m