Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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