diff --git a/include/mapnik/attribute_collector.hpp b/include/mapnik/attribute_collector.hpp index bf770ed36..644360268 100644 --- a/include/mapnik/attribute_collector.hpp +++ b/include/mapnik/attribute_collector.hpp @@ -144,6 +144,44 @@ struct symbolizer_attributes : public boost::static_visitor<> } } + void operator () (glyph_symbolizer const& sym) + { + expression_ptr const& char_expr = sym.get_char(); + if (char_expr) + { + expression_attributes f_attr(names_); + boost::apply_visitor(f_attr,*char_expr); + } + + expression_ptr const& angle_expr = sym.get_angle(); + if (angle_expr) + { + expression_attributes f_attr(names_); + boost::apply_visitor(f_attr,*angle_expr); + } + + expression_ptr const& value_expr = sym.get_value(); + if (value_expr) + { + expression_attributes f_attr(names_); + boost::apply_visitor(f_attr,*value_expr); + } + + expression_ptr const& size_expr = sym.get_size(); + if (size_expr) + { + expression_attributes f_attr(names_); + boost::apply_visitor(f_attr,*size_expr); + } + + expression_ptr const& color_expr = sym.get_color(); + if (color_expr) + { + expression_attributes f_attr(names_); + boost::apply_visitor(f_attr,*color_expr); + } + + } // TODO - support remaining syms private: diff --git a/tests/python_tests/glyph_symbolizer_test.py b/tests/python_tests/glyph_symbolizer_test.py index f891cfa2f..88376b014 100644 --- a/tests/python_tests/glyph_symbolizer_test.py +++ b/tests/python_tests/glyph_symbolizer_test.py @@ -50,12 +50,9 @@ def create_map_and_append_symbolyzer(sym): _map = mapnik2.Map(256,256, srs) style = mapnik2.Style() rule = mapnik2.Rule() - #TODO Investigate why I need to add a filter which refers to the - # feature property that the symbolizer needs so they don't reach - # to it as nulls. - rule.filter = mapnik2.Filter('[azimuth]>=0 and [value]>=0') #XXX rule.symbols.append(sym) + # put a test symbolizer to see what is the azimuth being read ts = mapnik2.TextSymbolizer(mapnik2.Expression('[azimuth]'), "DejaVu Sans Book", 10,