Skip to main content
A newer version of this page is available. .
All docs
V21.2

MapControl.ZoomToFitLayerItems(Boolean) Method

Zooms the map to fit items that all map layers contain.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Map

Declaration

public void ZoomToFitLayerItems(
    bool roundZoomLevel
)

Parameters

Name Type Description
roundZoomLevel Boolean

Specifies whether to round the zoom level value.

Remarks

The following code zooms a map so that it displays all items that are contained in map layers:

using DevExpress.XtraMap;

private void OnVectorLayerDataLoaded(object sender, DataLoadedEventArgs e) {
    mapControl1.ZoomToFitLayerItems(roundZoomLevel:true);
}
See Also