46 edit vector
Uncomment the following line to install leafmap if needed.
In [1]:
Copied!
# !pip install leafmap
# !pip install leafmap
In [2]:
Copied!
from leafmap import leafmap
from leafmap import leafmap
Create an interactive map.
In [3]:
Copied!
m = leafmap.Map(center=(37.712615, -122.386665), zoom=12)
m.add_basemap("HYBRID")
m
m = leafmap.Map(center=(37.712615, -122.386665), zoom=12)
m.add_basemap("HYBRID")
m
Add existing vector data to the map.
In [4]:
Copied!
url = "https://raw.githubusercontent.com/opengeos/leafmap/master/examples/data/training_samples.geojson"
m.edit_vector(url)
url = "https://raw.githubusercontent.com/opengeos/leafmap/master/examples/data/training_samples.geojson"
m.edit_vector(url)
Edit the existing vector data using the drawing tools and save the resulting vector data as GeoJSON, Shapefile, or GeoPackage.
In [5]:
Copied!
m.save_draw_features("data.geojson")
m.save_draw_features("data.geojson")