From fd54be4cc5faec0ad54c7f5f4967fe85ebec1f08 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 15 Apr 2011 07:13:08 +0000 Subject: [PATCH] if 'maximum-extent' is provided, clip map query extent to it allowing one simple and fast way of controlling out of bounds coordinates when projecting into/from layer projection - see also solution at #549 --- include/mapnik/feature_style_processor.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/mapnik/feature_style_processor.hpp b/include/mapnik/feature_style_processor.hpp index c9bff0f4a..b0b7d29bb 100644 --- a/include/mapnik/feature_style_processor.hpp +++ b/include/mapnik/feature_style_processor.hpp @@ -148,6 +148,13 @@ private: { box2d ext = m_.get_buffered_extent(); + + // clip buffered extent by maximum extent, if supplied + boost::optional > const& maximum_extent = m_.maximum_extent(); + if (maximum_extent) { + ext.clip(*maximum_extent); + } + projection proj1(lay.srs()); proj_transform prj_trans(proj0,proj1);