Shapefile Demo
In [1]:
import lab6demo
from lab6demo.utils import random_string
In [2]:
m = lab6demo.Map()
m
In [3]:
style = {
"stroke": True,
"color": "#ff0000",
"weight": 2,
"opacity": 1,
"fill": True,
"fillColor": "#ff0000",
"fillOpacity": 0.1,
}
In [4]:
states_geojson = "C:/Users/14234/lab6demo/examples/data/us_states.geojson"
In [5]:
m.add_geojson(states_geojson,style = style, layer_name="states")
In [6]:
style2= {
"stroke": True,
"color": "#0000ff",
"weight": 2,
"opacity": 1,
"fill": True,
"fillColor": "#00ff00",
"fillOpacity": 0.4
}
In [7]:
countries_shp = "C:/Users/14234/lab6demo/examples/data/countries.shp"
In [8]:
m.add_shapefile(countries_shp, style=style2, layer_name="Shapefile")
In [ ]:
Last update: 2021-03-19