Uncomment the following line to install leafmap if needed.
# !pip install leafmap
import leafmap
Add a search control to the map. See the Nominatim Usage Policy.
m = leafmap.Map(draw_control=False)
url = "https://nominatim.openstreetmap.org/search?format=json&q={s}"
m.add_search_control(url)
m
Search for features in GeoJSON files or any GeoPandas supported vector data.
m = leafmap.Map(draw_control=False, layers_control=True)
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=None,
)
m