44 attribute table
Uncomment the following line to install leafmap if needed.
In [1]:
Copied!
# !pip install leafmap
# !pip install leafmap
In [2]:
Copied!
import leafmap
import leafmap
Add vector data to the map and use the GUI to open attribute table.
In [3]:
Copied!
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://raw.githubusercontent.com/opengeos/leafmap/master/examples/data/cable_geo.geojson"
m.add_geojson(in_geojson, layer_name="Cable lines", info_mode=False)
m
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://raw.githubusercontent.com/opengeos/leafmap/master/examples/data/cable_geo.geojson"
m.add_geojson(in_geojson, layer_name="Cable lines", info_mode=False)
m
Skipping field coordinates: unsupported OGR type: 3
Out[3]: