mapnik / python-mapnik

Python bindings for mapnik
GNU Lesser General Public License v2.1
157 stars 91 forks source link

can't initialise ShieldSymbolizer, no idea if it's still supported #185

Closed alexandervlpl closed 6 years ago

alexandervlpl commented 6 years ago

Using Mapnik 3.0.13 + bindings 3.0.13. There is no current documentation (#184) on how to use ShieldSymbolizer in the bindings, and no way to really inspect the objects in a Python shell. I tried the commented out code in object_test.py and got this:

symbolizer = mapnik.ShieldSymbolizer(mapnik.Expression('[label]'), 'Open Sans', 16, mapnik.Color('#000000'), mapnik.PathExpression(shield_svg))

Exception: Python argument types in
    ShieldSymbolizer.__init__(ShieldSymbolizer, Expression, str, int, Color, PathExpression)
did not match C++ signature:
    __init__(_object*)

Which isn't helpful at all. I was able to initialise a PointSymbolizer like this:

symbolizer = mapnik.PointSymbolizer()
symbolizer.file = marker_svg

But that doesn't work for ShieldSymbolizer. Is it even supported? If so, how do I initialise it?

alexandervlpl commented 6 years ago

Duplicate of #7, turns out ShieldSymbolizer and other bindings have been broken for 3 years.