mirror of
https://github.com/openstreetmap/mod_tile.git
synced 2025-07-23 00:28:34 +00:00
Support for Mapnik >= 4 no longer using boost:optional (#436)
This commit is contained in:
@ -15,7 +15,9 @@
|
||||
* along with this program; If not, see http://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
#if MAPNIK_MAJOR_VERSION < 4
|
||||
#include <boost/optional.hpp>
|
||||
#endif
|
||||
#include <mapnik/datasource.hpp>
|
||||
#include <mapnik/datasource_cache.hpp>
|
||||
#include <mapnik/layer.hpp>
|
||||
@ -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<std::string> table = params.get<std::string>("table");
|
||||
#else
|
||||
boost::optional<std::string> table = params.get<std::string>("table");
|
||||
#endif
|
||||
|
||||
if (table && table->find(",name") != std::string::npos) {
|
||||
std::string str = *table;
|
||||
|
Reference in New Issue
Block a user