From f715f9cf22e45190895b03c23905c3b8eb42402b Mon Sep 17 00:00:00 2001 From: Blake Thompson Date: Tue, 10 Mar 2015 19:59:46 -0500 Subject: [PATCH] Updated the name of methods in grids from properties to fields because they are an array rather then a map. --- bindings/python/python_grid_utils.cpp | 8 ++++---- include/mapnik/grid/grid.hpp | 4 ++-- include/mapnik/grid/grid_view.hpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bindings/python/python_grid_utils.cpp b/bindings/python/python_grid_utils.cpp index 980737c77..e92ac6b1a 100644 --- a/bindings/python/python_grid_utils.cpp +++ b/bindings/python/python_grid_utils.cpp @@ -248,7 +248,7 @@ void write_features(T const& grid_type, return; } - std::set const& attributes = grid_type.property_names(); + std::set 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 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 attributes = grid.property_names(); + // copy field names + std::set attributes = grid.get_fields(); // todo - make this a static constant std::string known_id_key = "__id__"; if (attributes.find(known_id_key) != attributes.end()) diff --git a/include/mapnik/grid/grid.hpp b/include/mapnik/grid/grid.hpp index 0cb948262..7c07fa78c 100644 --- a/include/mapnik/grid/grid.hpp +++ b/include/mapnik/grid/grid.hpp @@ -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 const& property_names() const + inline std::set const& get_fields() const { return names_; } diff --git a/include/mapnik/grid/grid_view.hpp b/include/mapnik/grid/grid_view.hpp index 43c50da88..45ca4ae90 100644 --- a/include/mapnik/grid/grid_view.hpp +++ b/include/mapnik/grid/grid_view.hpp @@ -157,7 +157,7 @@ public: return data_.getBytes(); } - inline std::set const& property_names() const + inline std::set const& get_fields() const { return names_; }