New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Python class registered for C++ class mapnik::enumeration<mapnik::text_transform, 4> #1420
Comments
looks like it works if set, just not when unset, so this is likely also the boost::optional bug we hit in #1367 and it will impact all text |
I don't see any optionals here, it's more like this issue. This fixes the above for me: diff --git a/bindings/python/mapnik_text_placement.cpp b/bindings/python/mapnik_text_placement.cpp
index d149406..0c1c95e 100644
--- a/bindings/python/mapnik_text_placement.cpp
+++ b/bindings/python/mapnik_text_placement.cpp
@@ -390,8 +390,9 @@ void export_text_placement()
set_old_style expression is just a compatibility wrapper and doesn't need to be exposed in python. */
;
- class_<char_properties>
+ class_with_converter<char_properties>
("CharProperties")
+ .def_readwrite_convert("text_transform", &char_properties::text_transform)
.def(init<char_properties const&>()) //Copy constructor
.def_readwrite("face_name", &char_properties::face_name)
.def_readwrite("fontset", &char_properties::fontset)
@@ -401,7 +402,6 @@ void export_text_placement()
.def_readwrite("text_opacity", &char_properties::text_opacity)
.def_readwrite("wrap_char", &char_properties::wrap_char)
.def_readwrite("wrap_before", &char_properties::wrap_before)
- .def_readwrite("text_transform", &char_properties::text_transform)
.def_readwrite("fill", &char_properties::fill)
.def_readwrite("halo_fill", &char_properties::halo_fill)
.def_readwrite("halo_radius", &char_properties::halo_radius) |
great, patch works, but I have to comment out the
|
You have to use exactly the same order as in the patch provided by @lightmare.
|
Not sure why this is happening or if this ever worked post text_placement refactoring by @herm.
The text was updated successfully, but these errors were encountered: