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:
Blake Thompson 2015-03-10 19:59:46 -05:00
parent bb08020d1d
commit f715f9cf22
3 changed files with 7 additions and 7 deletions

View file

@ -248,7 +248,7 @@ void write_features(T const& grid_type,
return; 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(); typename T::feature_type::const_iterator feat_end = g_features.end();
for ( std::string const& key_item :key_order ) 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]); boost::python::extract<std::string> name(fields[i]);
if (name.check()) if (name.check())
{ {
grid.add_property_name(name()); grid.add_field(name());
} }
else else
{ {
@ -379,8 +379,8 @@ void render_layer_for_grid(mapnik::Map const& map,
} }
} }
// copy property names // copy field names
std::set<std::string> attributes = grid.property_names(); std::set<std::string> attributes = grid.get_fields();
// todo - make this a static constant // todo - make this a static constant
std::string known_id_key = "__id__"; std::string known_id_key = "__id__";
if (attributes.find(known_id_key) != attributes.end()) if (attributes.find(known_id_key) != attributes.end())

View file

@ -96,12 +96,12 @@ public:
void add_feature(mapnik::feature_impl const& feature); 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); names_.insert(name);
} }
inline std::set<std::string> const& property_names() const inline std::set<std::string> const& get_fields() const
{ {
return names_; return names_;
} }

View file

@ -157,7 +157,7 @@ public:
return data_.getBytes(); return data_.getBytes();
} }
inline std::set<std::string> const& property_names() const inline std::set<std::string> const& get_fields() const
{ {
return names_; return names_;
} }