不是专家……我刚刚开始使用folium和jupyter,并且有类似的问题,但是有了线条.
你说你有GeoJson和多边形,颜色包含在我认为的json中.
style_function可能会帮助你得到你想要的东西?
import folium
geoJsonData = {
"features": [
{
"geometry": {
"coordinates": [
[
12.98583984375,
56.70450561416937
],
[
14.589843749999998,
57.604221411628735
],
[
13.590087890625,
58.15331598640629
],
[
11.953125,
57.955674494979526
],
[
11.810302734375,
58.76250326278713
]
],
"type": "LineString"
},
"properties": {
"stroke": "#fc1717",
"stroke-opacity": 1,
"stroke-width": 2
},
"type": "F