Skip to main content

MapControl.ZoomToRegion(CoordPoint, CoordPoint, Double) Method

Zooms to the region described by its top-left and bottom-right points.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.1.dll

NuGet Package: DevExpress.Win.Map

Declaration

public void ZoomToRegion(
    CoordPoint topLeft,
    CoordPoint bottomRight,
    double paddingFactor
)

Parameters

Name Type Description
topLeft CoordPoint

A CoordPoint class descendant object.

bottomRight CoordPoint

A CoordPoint class descendant object.

paddingFactor Double

A Double object, which tunes the border size around the region.

Remarks

Note that padding factor is applied to the larger dimension of the region.

The following image shows an instance when the horizontal dimension is larger than the vertical. (“PF” means “Padding Factor” on an image)

ZoomToRegion_HorizontalPadding

Note that the padding factor is divided by two for each side of the region.

In the instance of the following code

GeoPoint topLeft = new GeoPoint(50, 15);
GeoPoint bottomRight = new GeoPoint(60, 10);
map.ZoomToRegion(topLeft, bottomRight, 0.4);

the result should look like the following.

ZoomToRegion_NumericExample

See Also