Search results

Change center position on zooming in Blazor Maps component

22 Jul 2021 / 1 minute to read

If you zoom the map using the ZoomFactor property, the center location of the map will be zoomed. In some cases, you may need to zoom in other than the center position, and you can do this by specifying the geo location in the CenterPosition property as shown in the following code example.

The center position is used to configure the geo location, where the maps should be zoomed, and zoom factor is used to specify zoom level of the maps.

Copied to clipboard
@using Syncfusion.Blazor.Maps

    @* To change center position *@
    <MapsCenterPosition Latitude="25.54244147012483" Longitude="-89.62646484375"></MapsCenterPosition>
    <MapsZoomSettings Enable="false" ZoomFactor="13"></MapsZoomSettings>
        <MapsLayer ShapeData='new {dataOptions= ""}' TValue="string"></MapsLayer>

Maps with zoom Factor