简体   繁体   English

Mapnik行程错误

[英]Mapnik stroke error

I'm getting the following error when I run the program: AttributeError: 'module' object has no attribute 'stroke_linecap' 运行程序时出现以下错误:AttributeError:'模块'对象没有属性'stroke_linecap'

sym = mapnik.LineSymbolizer()
sym.stroke = mapnik.Stroke(mapnik.Color(171,158,137), 0.5)
sym.stroke_width = 2
sym.stroke_linecap = mapnik.stroke_linecap.ROUND #Error is here 

I found a similar problem and ended up figuring it out. 我发现了类似的问题,并最终弄清楚了。 stroke_linecap isn't used properly. stroke_linecap使用不正确。 It should be line_cap. 它应该是line_cap。

sym.line_cap = mapnik.line_cap.ROUND

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM