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

TdxCustomMapControl.ZoomToFitItems(TdxMapItemList,Double) Method

Centers and zooms the map on specified map items, with optional padding around them.

#Declaration

Delphi
procedure ZoomToFitItems(AItems: TdxMapItemList; const APaddingFactor: Double = dxMapControlDefaultZoomPaddingFactor); overload;

#Parameters

Name Type
AItems TdxMapItemList
APaddingFactor Double

#Remarks

This procedure is similar to ZoomToGeoRect, except that it calculates a bounding rectangle for map items passed as the AItems parameter, and then performs zooming and padding on this rectangle. Refer to the ZoomToGeoRect procedure description to learn about the APaddingFactor parameter specifics.

The following image illustrates how the 0.3 padding factor applies to horizontally and vertically oriented bounding rectangles that enclose four pushpin items on a map.

VCL Map Control: Pushpin Bounding Rectangles

Note

The ZoomToFitItems procedure iterates through AItems and takes into account only visible map items and only those whose layer is rendered on the map.

See Also