Skip to main content

TdxCustomMapItemLayer.GetItemsInRegion(TRect,TList) Method

Obtains a list of map items that are enclosed by a specified rectangle.

Declaration

procedure GetItemsInRegion(const ARect: TRect; AItems: TList);

Parameters

Name Type
ARect TRect
AItems TList

Remarks

ARect specifies the rectangle in coordinates relative to the top-left corner of the map control.

All map items that are visible in a map control and enclosed by the specified rectangle are added to the AItems list.

The following code example shows how to use the GetItemsInRegion method to obtain a list of map items contained in the dxMapControlItemLayer item layer that are currently visible in the map area.

var
  AMapItemList: TList;
begin
  AMapItemList := TList.Create;
  <dxMapControlItemLayer>.GetItemsInRegion(<dxMapControl>.Bounds, AMapItemList);
end;
See Also