Revive Symbolizer to json functionality

This commit is contained in:
Artem Pavlenko 2024-05-15 10:24:27 +01:00
parent 454837070d
commit 1283ca5b77

View file

@ -30,6 +30,7 @@
#include <mapnik/parse_path.hpp>
#include <mapnik/color.hpp>
#include <mapnik/expression.hpp>
#include <mapnik/expression_string.hpp>
#include <mapnik/color_factory.hpp>
#include <mapnik/symbolizer.hpp>
#include <mapnik/xml_tree.hpp>
@ -146,9 +147,6 @@ inline std::string symbolizer_name(symbolizer const& sym)
return type;
}
// https://github.com/mapnik/mapnik/issues/2324
/*
template <typename Meta>
class symbolizer_property_value_string
{
@ -162,7 +160,7 @@ public:
auto const& convert_fun_ptr(std::get<1>(meta_));
if ( convert_fun_ptr )
{
ss << convert_fun_ptr(e);
ss << '\"' << convert_fun_ptr(e) << '\"';
}
return ss.str();
}
@ -202,7 +200,7 @@ public:
std::ostringstream ss;
if (expr)
{
ss << '\"' << "FIXME" << '\"';
ss << '\"' << mapnik::to_expression_string(*expr) << '\"';
}
return ss.str();
}
@ -229,7 +227,7 @@ public:
std::string operator () ( T const& val ) const
{
std::ostringstream ss;
ss << val;
ss << '\"' << val << '\"';
return ss.str();
}
@ -261,8 +259,6 @@ struct symbolizer_to_json
}
};
*/
namespace {
template<typename Symbolizer, typename T>