This project has moved and is read-only. For the latest updates, please go here.

Offset for bounding boxes

Dec 8, 2015 at 8:23 AM
Hi Clemens,

the map control is capable of zooming to a specific bounding box (ZoomToBounds). It would be great to specify an offset for that bound, i.e. "zoom to this bounding box but between the bottom of this bounding box and the bottom of the map should be n pixel".

I tried to use a plane projection for offsetting but i can't figure out which transformation to apply this plane projection.

Dec 8, 2015 at 7:08 PM
You may probably just copy the code of the ZoomToBounds method and reduce the calculated TargetZoomLevel by a certain amount.

Try for example
TargetZoomLevel = Math.Min(lonZoom, latZoom) - 1d;