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

TdxCustomMapItemLayer.GetItemsInRegion(TRect,TList) Method

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

#Declaration

Delphi
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.

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