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
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue