Updated the name of methods in grids from properties to fields because they are an array rather then a map.
This commit is contained in:
parent
bb08020d1d
commit
f715f9cf22
3 changed files with 7 additions and 7 deletions
|
@ -248,7 +248,7 @@ void write_features(T const& grid_type,
|
|||
return;
|
||||
}
|
||||
|
||||
std::set<std::string> const& attributes = grid_type.property_names();
|
||||
std::set<std::string> const& attributes = grid_type.get_fields();
|
||||
typename T::feature_type::const_iterator feat_end = g_features.end();
|
||||
for ( std::string const& key_item :key_order )
|
||||
{
|
||||
|
@ -369,7 +369,7 @@ void render_layer_for_grid(mapnik::Map const& map,
|
|||
boost::python::extract<std::string> name(fields[i]);
|
||||
if (name.check())
|
||||
{
|
||||
grid.add_property_name(name());
|
||||
grid.add_field(name());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -379,8 +379,8 @@ void render_layer_for_grid(mapnik::Map const& map,
|
|||
}
|
||||
}
|
||||
|
||||
// copy property names
|
||||
std::set<std::string> attributes = grid.property_names();
|
||||
// copy field names
|
||||
std::set<std::string> attributes = grid.get_fields();
|
||||
// todo - make this a static constant
|
||||
std::string known_id_key = "__id__";
|
||||
if (attributes.find(known_id_key) != attributes.end())
|
||||
|
|
|
@ -96,12 +96,12 @@ public:
|
|||
|
||||
void add_feature(mapnik::feature_impl const& feature);
|
||||
|
||||
inline void add_property_name(std::string const& name)
|
||||
inline void add_field(std::string const& name)
|
||||
{
|
||||
names_.insert(name);
|
||||
}
|
||||
|
||||
inline std::set<std::string> const& property_names() const
|
||||
inline std::set<std::string> const& get_fields() const
|
||||
{
|
||||
return names_;
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ public:
|
|||
return data_.getBytes();
|
||||
}
|
||||
|
||||
inline std::set<std::string> const& property_names() const
|
||||
inline std::set<std::string> const& get_fields() const
|
||||
{
|
||||
return names_;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue