Back to Devexpress

AzureMapDataProvider.CultureName Property

windowsforms-devexpress-dot-xtramap-dot-azuremapdataprovider-2ae8c3fb.md

latest3.6 KB
Original Source

AzureMapDataProvider.CultureName Property

Gets or sets the Culture name used to obtain data from Azure GIS services.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
[DefaultValue("")]
public string CultureName { get; set; }
vb
<DefaultValue("")>
Public Property CultureName As String

Property Value

TypeDefaultDescription
StringString.Empty

The culture name that is equivalent to the written language and locale.

|

Remarks

Specify the CultureName property for map layers that contain textual data, for example, labels. You can also use the LocalizedMapView property to specify the map view for a certain country/region.

The following example changes the loaded Azure map’s language to German:

csharp
using DevExpress.XtraMap;
//...
private void Form1_Load(object sender, EventArgs e) {
    // Create a map control.
    MapControl map = new MapControl();
    // Specify the map position on the form.           
    map.Dock = DockStyle.Fill;
    // Create a layer.
    ImageLayer layer1 = new ImageLayer();
    layer1.DataProvider = new AzureMapDataProvider() {
        AzureKey = azureKey,
        Tileset = AzureTileset.Imagery
    };
    ImageLayer layer2 = new ImageLayer();
    layer2.DataProvider = new AzureMapDataProvider() {
        AzureKey = azureKey,
        Tileset = AzureTileset.BaseLabelsRoad
        CultureName = "de-DE", 
    };
    // Specify the map zoom level and center point. 
    map.ZoomLevel = 3;
    map.CenterPoint = new GeoPoint(40, -100);

    map.Layers.AddRange(new LayerBase[] {
        layer1, layer2 });
    // Add the map control to the window.
    this.Controls.Add(map);
}
vb
Imports DevExpress.XtraMap
'...
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
    ' Create a map control.
    Dim map As New MapControl()
    ' Specify the map position on the form.           
    map.Dock = DockStyle.Fill
    ' Create a layer.
    Dim layer1 As New ImageLayer()
    layer1.DataProvider = New AzureMapDataProvider() With {
        .AzureKey = azureKey,
        .Tileset = AzureTileset.Imagery
    }
    Dim layer2 As New ImageLayer()
    layer2.DataProvider = New AzureMapDataProvider() With {
        .AzureKey = azureKey,
        .Tileset = AzureTileset.BaseLabelsRoad,
    .CultureName = "de-DE"
    }
    ' Specify the map zoom level and center point. 
    map.ZoomLevel = 3
    map.CenterPoint = New GeoPoint(40, -100)

    map.Layers.AddRange(New LayerBase() { layer1, layer2 })
    ' Add the map control to the window.
    Me.Controls.Add(map)
End Sub

See Also

AzureMapDataProvider Class

AzureMapDataProvider Members

DevExpress.XtraMap Namespace