Add shapefile
In [1]:
import geodemo
import os
In [2]:
m = geodemo.Map()
m
In [3]:
style = {
"stroke": True,
"color": "#ff0000",
"weight": 2,
"opacity": 1,
"fill": True,
"fillColor": "#000000",
"fillOpacity": 0.4,
}
In [4]:
in_shp = "./data/countries.shp"
In [5]:
m.add_shapefile(in_shp, style=style, layer_name="Shapefile")
In [6]:
in_geojson = "./data/countries.json"
In [7]:
m.add_geojson(in_geojson, layer_name="GeoJSON")
Last update: 2021-05-07