Skip to main content

TdxMapImageTileLayer.Provider Property

Provides access to map tile provider settings.

Declaration

property Provider: TdxMapControlImageTileProvider read; write;

Property Value

Type Description
TdxMapControlImageTileProvider

Stores settings that correspond to the active tile data provider type.

Cast this property value to the corresponding class of tile data provider settings to access all public API members.

Tip

You can call the Provider.ClassType function or use other RTTI functionality to identify the actual tile data provider type. Refer to the Remarks section for the full list of supported data provider types.

Remarks

Use the Provider property to configure the selected map tile provider.

Available Map Tile Providers

Use the ProviderClass property to switch between available map tile providers:

TdxMapControlAzureMapImageryDataProvider
Loads map tiles from Azure Maps servers.
TdxMapControlOpenStreetMapImageryDataProvider
Loads map tiles from the OpenStreetMap service.

Design-Time Functionality

You can select any available tile data provider in a drop-down list of an image tile layer’s Provider node displayed in the Object Inspector:

VCL Map Control: Tile Provider Class Selection at Design Time

Code Example: Add a Tile Map Layer and Load Azure Maps Data

The following code example implements a procedure that accepts an Azure Maps account key, creates and configures a map tile layer, and loads data:

uses
  dxAzureMapImageryDataProvider;  // This unit declares TdxMapControlAzureMapImageryDataProvider
// ...

procedure TMyForm.AddAzureMapLayer(const AAzureKey: string);
var
  ATileLayer: TdxMapImageTileLayer;
  AProvider: TdxMapControlAzureMapImageryDataProvider;
begin
  ATileLayer := dxMapControl1.Layers.Add(TdxMapImageTileLayer) as TdxMapImageTileLayer;
  ATileLayer.ProviderClass := TdxMapControlAzureMapImageryDataProvider;
  AProvider := ATileLayer.Provider as TdxMapControlAzureMapImageryDataProvider;
  AProvider.BeginUpdate;  // Initiates the following batch change
  try
    AProvider.AzureKey := AAzureKey;  // Assigns the Azure account key
    AProvider.Tileset := TdxAzureMapTileset.Satellite;  // Changes the default tileset
    AProvider.MaxParallelConnectionCount := 8;  // Explicitly defines the number of parallel connections
  finally
    AProvider.EndUpdate;  // Calls EndUpdate regardless of the batch operation's success
  end;
end;

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

You can find full source code for installed complied Map Control demos in the following folder:

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

See Also