diff --git a/bindings/python/mapnik_feature.cpp b/bindings/python/mapnik_feature.cpp index 370e1846c..0de7b09d4 100644 --- a/bindings/python/mapnik_feature.cpp +++ b/bindings/python/mapnik_feature.cpp @@ -22,6 +22,7 @@ //$Id$ // boost +#include #include // mapnik #include @@ -33,7 +34,19 @@ void export_feature() class_, boost::noncopyable>("Feature",no_init) .def("id",&Feature::id) - //.def("__iter__", range<>()) .def("__str__",&Feature::to_string) + .add_property("properties", + make_function(&Feature::props,return_value_policy())) ; + + //implicitly_convertible(); + + class_ >("Properties") + .def(map_indexing_suite >()) + ; + + class_("Value") + .def("__str__",&mapnik::value::to_string) + ; } diff --git a/include/mapnik/feature.hpp b/include/mapnik/feature.hpp index b1e99234c..8d580114f 100644 --- a/include/mapnik/feature.hpp +++ b/include/mapnik/feature.hpp @@ -92,7 +92,7 @@ namespace mapnik { raster_=raster; } - const properties& get_properties() const + std::map const& props() const { return props_; }