Skip to main content
A newer version of this page is available. .

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

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

The following code snippets (auto-collected from DevExpress Examples) contain references to the ZoomToRegion(CoordPoint, CoordPoint, Double) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also