Skip to main content

TdxCustomMapControl.ZoomToFitLayerItems(TdxCustomMapItemLayerList,Double) Method

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

Declaration

procedure ZoomToFitLayerItems(ALayers: TdxCustomMapItemLayerList; const APaddingFactor: Double = dxMapControlDefaultZoomPaddingFactor);

Parameters

Name Type
ALayers TdxCustomMapItemLayerList
APaddingFactor Double

Remarks

This procedure does the following:

  • Iterates through a list of map layers passed as the ALayers parameter and obtains map items from those that are rendered on the map;

  • Calls the ZoomToFitItems procedure and passes the obtained map items and the APaddingFactor parameter value as parameters.

Refer to the ZoomToFitItems procedure description to learn about parameter specifics.

See Also