diff --git a/src/parameterize_style.cpp b/src/parameterize_style.cpp index 892e432a..732a4547 100644 --- a/src/parameterize_style.cpp +++ b/src/parameterize_style.cpp @@ -15,7 +15,9 @@ * along with this program; If not, see http://www.gnu.org/licenses/. */ +#if MAPNIK_MAJOR_VERSION < 4 #include +#endif #include #include #include @@ -65,7 +67,11 @@ static void parameterize_map_language(mapnik::Map &m, char *parameter) mapnik::parameters params = l.datasource()->params(); if (params.find("table") != params.end()) { +#if MAPNIK_MAJOR_VERSION >= 4 + std::optional table = params.get("table"); +#else boost::optional table = params.get("table"); +#endif if (table && table->find(",name") != std::string::npos) { std::string str = *table;