作者fattyfox (送阿)
看板Python
标题[问题] folium geojson颜色
时间Fri Oct 18 00:08:52 2019
不好意思,想请教透过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)
https://imgur.com/4awkXVi
感谢~~
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 36.230.242.102 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1571328534.A.E8C.html
※ 编辑: fattyfox (36.230.242.102 台湾), 10/18/2019 00:11:14
※ 编辑: fattyfox (36.230.242.102 台湾), 10/18/2019 00:14:41