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

TdxMapLayer Class

The base class for map layers.

#Declaration

Delphi
TdxMapLayer = class(
    TcxComponentCollectionItem
)

#Remarks

Map Control content is arranged into layers. Each map layer type is designed to display the corresponding content type – map tiles, shapes (custom marks on a map), etc.

VCL Map Control: An Azure Maps Usage Example

#Main API Members

The list below outlines key members of the TdxMapLayer class. These members allow you to configure basic map layer settings and convert map coordinates into different measurement units.

#Coordinate Conversion Methods

GeoPointToMapUnit | GeoPointToScreenPoint
Convert geographical coordinates into map and screen coordinates.
MapUnitToScreenPoint
Converts a point position in map measurement units into screen (pixel) coordinates.
ScreenPointToGeoPoint | ScreenPointToMapUnit
Convert screen (pixel) coordinates into geographical and map point coordinates.

#General-Purpose API Members

Collection
Provides access to the parent map layer collection.
Index
Specifies the map layer’s index in the parent collection.
IsActuallyVisible
Identifies if the parent Map Control displays the map layer.
Visible
Specifies if the map layer is visible.

#Indirect TdxMapLayer Class References

The TdxMapLayers.Items property references terminal TdxMapLayer class descendants as a TdxMapLayer object.

#Terminal TdxMapLayer Class Descendants

Do not use the TdxMapLayer class directly. Use the following descendants instead:

TdxMapImageTileLayer
A map tile layer.
TdxMapItemFileLayer
An item file layer.
TdxMapItemLayer
An item layer.

#Create Supported Map Layers

Call the following Map Control functions to create corresponding supported map layers:

TdxCustomMapControl.AddImageTileLayer
Creates a new image tile layer and adds it to the map layer collection.
TdxCustomMapControl.AddItemFileLayer
Creates a new item file layer and adds it to the map layer collection.
TdxCustomMapControl.AddItemLayer
Creates a new item layer.

To see map tile layers with all supported information providers in action, run the Mapping demo in the VCL Demo Center installed with compiled DevExpress demos. Click the Data Providers item in the side bar to the left and switch between available data providers in the Ribbon UI.

Download: Compiled VCL Demos

Tip

Compiled DevExpress demos ship with source code installed in the Public Documents folder (%Public%) for all users (default). You can find all project and source code files for the Map Control demo in the following folder:

%Public%\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressMapControl

See Also