Back to Devexpress

TdxCustomMapControl.ZoomToFitItems(TdxMapItemList,Double) Method

vcl-dxmapcontrol-dot-tdxcustommapcontrol-dot-zoomtofititems-x28-dxmapitem-dot-tdxmapitemlist-system-dot-double-x29.md

latest2.5 KB
Original Source

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

NameType
AItemsTdxMapItemList
APaddingFactorDouble

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.

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

TdxCustomMapControl.OnZoomLevelChanged

TdxCustomMapControl.OnZoomLevelChanging

TdxCustomMapControl.Zoom

TdxCustomMapControl.ZoomAsync

TdxCustomMapControl.ZoomIn

TdxCustomMapControl.ZoomOut

TdxCustomMapControl.ZoomToFitLayerItems

TdxCustomMapControl Class

TdxCustomMapControl Members

dxMapControl Unit