Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxMap.AutoAdjust Property

Specifies whether the component automatically adjusts the map center and zoom level to display all markers and routes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(true)]
[Parameter]
public bool AutoAdjust { get; set; }

#Property Value

Type Default Description
Boolean true

true to adjust map settings automatically; otherwise, false.

#Remarks

The DxMap control automatically adjusts the map center and zoom level on the initial load and when a collection of markers or routes changes. The adjustments include the following:

  • The control decreases the Zoom property to the maximum value that allows all markers and routes to be displayed. If the current zoom level allows all routes and markers to be displayed on the map, it remains unchanged.
  • The control changes the map center to align markers and routes with the control’s center.

Set the AutoAdjust property to false to disable this behavior.

razor
<DxMap Zoom="14"
       Provider="MapProvider.Azure"
       Width="100%"
       Height="600px"
       AutoAdjust="false" >
    <DxMapApiKeys Azure="@MapApiKeyProvider.GetAzureProviderKey()" />
    <DxMapCenter GeoPosition="40.7061, -73.9969" />
    @* ... *@
</DxMap>
See Also