mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
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
This commit is contained in:
parent
3147e2a257
commit
fd54be4cc5
@ -148,6 +148,13 @@ private:
|
||||
{
|
||||
|
||||
box2d<double> ext = m_.get_buffered_extent();
|
||||
|
||||
// clip buffered extent by maximum extent, if supplied
|
||||
boost::optional<box2d<double> > const& maximum_extent = m_.maximum_extent();
|
||||
if (maximum_extent) {
|
||||
ext.clip(*maximum_extent);
|
||||
}
|
||||
|
||||
projection proj1(lay.srs());
|
||||
proj_transform prj_trans(proj0,proj1);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user