Change center position on zooming in Blazor Maps Component

31 Jan 20221 minute to read

Blazor Maps component provides support to change the center position of the Maps. This can be achieved by setting the coordinates of the location in the MapsCenterPosition. The ZoomFactor property in the MapsZoomSettings can be used to focus the provided center position in the Maps.

@using Syncfusion.Blazor.Maps

<SfMaps>
    @* To change center position *@
    <MapsCenterPosition Latitude="25.54244147012483" Longitude="-89.62646484375"></MapsCenterPosition>
    <MapsZoomSettings Enable="false" ZoomFactor="13"></MapsZoomSettings>
    <MapsLayers>
        <MapsLayer ShapeData='new {dataOptions= "https://cdn.syncfusion.com/maps/map-data/world-map.json"}' TValue="string"></MapsLayer>
    </MapsLayers>
</SfMaps>

Blazor Maps with Zooming Factor