diff --git a/include/map.hpp b/include/map.hpp index 9270d756f..f3e3cf9b4 100644 --- a/include/map.hpp +++ b/include/map.hpp @@ -62,6 +62,7 @@ namespace mapnik size_t layerCount() const; void addLayer(const Layer& l); const Layer& getLayer(size_t index) const; + Layer& getLayer(size_t index); void removeLayer(size_t index); std::vector const& layers() const; unsigned getWidth() const; diff --git a/src/map.cpp b/src/map.cpp index 248a9a0f8..0c540bd0f 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -93,6 +93,13 @@ namespace mapnik { return layers_[index]; } + + Layer& Map::getLayer(size_t index) + { + return layers_[index]; + } + + std::vector const& Map::layers() const { return layers_;