Skip to main content
All docs
V24.2

TdxMapControlAzureMapImageryDataProvider.AzureKey Property

Specifies the Azure account key for the map tile provider.

Declaration

property AzureKey: string read; write;

Property Value

Type Description
string

The Azure account key for the map tile provider.

Remarks

To use Microsoft Azure Maps® services, you need to create an Azure Maps account and obtain a key.

Refer to the following Microsoft documentation topics for additional information:

Assign Azure Key

Assign your Azure account key to the AzureKey property to configure the map tile provider. The current map layer starts to download tile data automatically according to the current provider settings. Refer to the TdxMapControlAzureMapImageryDataProvider class description for information on all available data provider settings.

Important

You need to assign your Azure account key to the AzureKey property of all Azure Maps tile and information providers you use in the application.

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;
See Also