only serialize Parameters if one or more exist
This commit is contained in:
parent
9203639640
commit
410dea5001
1 changed files with 15 additions and 13 deletions
|
@ -793,6 +793,7 @@ class serialize_type : public boost::static_visitor<>
|
||||||
|
|
||||||
void serialize_parameters( ptree & map_node, mapnik::parameters const& params)
|
void serialize_parameters( ptree & map_node, mapnik::parameters const& params)
|
||||||
{
|
{
|
||||||
|
if (params.size()) {
|
||||||
ptree & params_node = map_node.push_back(
|
ptree & params_node = map_node.push_back(
|
||||||
ptree::value_type("Parameters", ptree()))->second;
|
ptree::value_type("Parameters", ptree()))->second;
|
||||||
|
|
||||||
|
@ -807,6 +808,7 @@ void serialize_parameters( ptree & map_node, mapnik::parameters const& params)
|
||||||
param_node.put_value( it->second );
|
param_node.put_value( it->second );
|
||||||
boost::apply_visitor(serialize_type(param_node),it->second);
|
boost::apply_visitor(serialize_type(param_node),it->second);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void serialize_layer( ptree & map_node, const layer & layer, bool explicit_defaults )
|
void serialize_layer( ptree & map_node, const layer & layer, bool explicit_defaults )
|
||||||
|
|
Loading…
Reference in a new issue