[問題] folium geojson顏色
不好意思,想請教透過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
![](https://i.imgur.com/4awkXVi.jpg)
感謝~~
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.230.242.102 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1571328534.A.E8C.html
※ 編輯: fattyfox (36.230.242.102 臺灣), 10/18/2019 00:11:14
→
10/18 00:14,
4年前
, 1F
10/18 00:14, 1F
※ 編輯: fattyfox (36.230.242.102 臺灣), 10/18/2019 00:14:41