Skip to main content
All docs
V25.1
  • DxMapCenter Class

    Defines location that is displayed at the component’s center.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public class DxMapCenter :
        DxMapLocation<MapLocationModel>

    Remarks

    Use the DxMapCenter object to specify a location that should be displayed in the center of the DxMap component. This setting is useful when automatic map adjustment is not available, namely in the following cases:

    • Automatic adjustment is disabled (the AutoAdjust property is set to false).
    • The component displays a static Google image (the Provider property is set to GoogleStatic).
    • The map does not contain markers or routes.

    Note that the component can change the specified location if the AutoAdjust property is set to true (the default value).

    You can specify location settings in two ways:

    • Use the GeoPosition property that accepts coordinates and text address.

      <DxMap Zoom="14" Provider="MapProvider.Azure" Width="950px" Height="400px" >
          <DxMapApiKeys Azure="@MapApiKeyProvider.GetAzureProviderKey()" />
          <DxMapCenter GeoPosition="40.7061, -73.9969" />
      </DxMap>
      
    • Use Latitude and Longitude properties.

      <DxMap Zoom="14" Provider="MapProvider.Azure" Width="950px" Height="400px" >
          <DxMapApiKeys Azure="@MapApiKeyProvider.GetAzureProviderKey()" />
          <DxMapCenter Latitude="40.7061" Longitude="-73.9969"/>
      </DxMap>
      

    Run Demo: Map - Overview

    Inheritance

    Object
    ComponentBase
    DxSettingsComponent<DevExpress.Blazor.ClientComponents.Internal.MapLocationModel>
    DxMapLocation<DevExpress.Blazor.ClientComponents.Internal.MapLocationModel>
    DxMapCenter
    See Also