【发布时间】:2020-10-28 20:44:45
【问题描述】:
有没有办法在folium中添加图案填充,例如填充背景?可以使用 GeoJSON 对象和 folium.plugins.StripePattern (https://github.com/python-visualization/folium/blob/master/tests/plugins/test_pattern.py) 对多边形使用填充填充,但我还没有看到使用 circle 的实现,也没有太多的运气使用它。
该功能在带有https://github.com/teastman/Leaflet.pattern 的传单中可用,例如:
var myPattern = new L.StripePattern({ angle: -45, weight: 3, color: 'black', opacity: 1.0});
myPattern.addTo(m);
var circle = new L.Circle([42, -105], 40000, {fillPattern: myPattern, fillOpacity: 1.0});
circle.addTo(m);
最坏的情况我可以将传单代码直接写入 html 文件。
【问题讨论】: