vcl-dxazuremapimagerydataprovider-dot-tdxmapcontrolazuremapimagerydataprovider-1539d923.md
Specifies the locale (culture) name used to download data from Azure GIS services.
property Language: string read; write;
| Type | Description |
|---|---|
| string |
The culture name that corresponds to the target written language and locale.
|
Use the Language property to display a localized map version.
Refer to the following topic for the full list of languages supported in Azure Maps services: Localization Support in Azure Maps.
The following code example implements a procedure that accepts an Azure Maps account key, creates and configures a map tile layer, changes the map language to Greek, and loads data:
uses
dxAzureMapImageryDataProvider; // Declares TdxMapControlAzureMapImageryDataProvider
// ...
procedure TMyForm.AddLocalizedAzureMapLayer(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.Language := 'el-GR'; // Changes the map language to Greek
finally
AProvider.EndUpdate; // Calls EndUpdate regardless of the batch operation's success
end;
end;
#include "dxAzureMapImageryDataProvider.hpp" // Declares TdxMapControlAzureMapImageryDataProvider
// ...
void __fastcall TMyForm::AddLocalizedAzureMapLayer(const UnicodeString &AAzureKey)
{
TdxMapLayer *ALayer;
TdxMapImageTileLayer *ATileLayer;
TdxMapControlAzureMapImageryDataProvider *AProvider;
ALayer = dxMapControl1->Layers->Add(__classid(TdxMapImageTileLayer));
ATileLayer = dynamic_cast<TdxMapImageTileLayer*>(ALayer);
ATileLayer->ProviderClass = __classid(TdxMapControlAzureMapImageryDataProvider);
AProvider = dynamic_cast<TdxMapControlAzureMapImageryDataProvider*>(ATileLayer->Provider);
AProvider->BeginUpdate(); // Initiates the following batch change
try
{
AProvider->AzureKey = AAzureKey; // Assigns the Azure account key
AProvider->Language = "el-GR"; // Changes the map language to Greek
}
__finally
{
AProvider->EndUpdate(); // Calls EndUpdate regardless of the batch operation's success
}
}
See Also
TdxMapControlAzureMapImageryDataProvider.LocalizedMapView Property
TdxMapControlAzureMapImageryDataProvider Class