[问题] folium geojson颜色

楼主: fattyfox (送阿)   2019-10-18 00:08:52
不好意思,想请教透过folium / geojson加图层后
要怎么更改线条颜色
google发现是透过stlye函数
但是只能改layer里面的颜色
layer线条的颜色好像无法~
是否有哪里做错了
谢谢~~
style1 = {'fillColor': '#228B22', 'lineColor': '#228B22'}
style2 = {'fillColor': '#00FFFFFF', 'lineColor': '#00FFFFFF'}
test1=gpd.read_file('file2.geojson')
folium.GeoJson(test1,name='test1',style_function=lambda x:
style).add_to(mainmap)
test2=gpd.read_file('file1.geojson')
folium.GeoJson(test2,name='test2', style_function=lambda x:
style2).add_to(mainmap)

感谢~~
楼主: fattyfox (送阿)   2019-10-18 00:14:00

Links booklink

Contact Us: admin [ a t ] ucptt.com