We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Blazor Map Property ZoomFactor doesn't appear to work when bound to property.

I am writing an Blazor Server application that allows the map to go to a particular longitude and latitude when I click on an entry in a datagrid. I'd like the map zoomed out a little at the start but zoom in when an entry in the datagrid is clicked.


I'm using version 20.4.0.54


This works perfectly for longitude and latitude but not for zoomFactor. The zoom remains fixed.


<SfMaps>

        <MapsZoomSettings Enable="true" ZoomFactor="@ZoomFactor" MaxZoom="20"></MapsZoomSettings>

        <MapsCenterPosition Latitude="@MapLatitude" Longitude="@MapLongitude"></MapsCenterPosition>

        <MapsLayers>

            <MapsLayer UrlTemplate="https://tile.openstreetmap.org/level/tileX/tileY.png" TValue="string">

                <MapsMarkerSettings>

                    <MapsMarker Visible="true" Height="25" Width="15" DataSource="Cities" TValue="City">

                    </MapsMarker>

                </MapsMarkerSettings>

            </MapsLayer>

        </MapsLayers>

    </SfMaps>


public void RowSelectHandler(RowSelectEventArgs args)

{

MapLatitude = args.Data.Latitude;

MapLongitude = args.Data.Longitude;

ZoomFactor = 12;

}


public double MapLatitude { get; set; } = 25.54244147012483;

public double MapLongitude { get; set; } = -89.62646484375;

public double ZoomFactor { get; set; } = 4;



4 Replies 1 reply marked as answer

IR Indumathi Ravi Syncfusion Team March 16, 2023 01:04 PM UTC

Hi Gordon,


We can reproduce the reported issue with the provided code snippet in the Maps component. We have considered this as a defect and logged a defect report for the same. However, we will include the fix for the reported issue in our weekly patch release which is expected to be available by the start of April 2023. Please find the feedback link below to keep track of the reported issue.


https://www.syncfusion.com/feedback/42093


Marked as answer

IR Indumathi Ravi Syncfusion Team April 4, 2023 01:06 PM UTC

Hi Gordan,


We have fixed the reported issue - “Zoom factor property is not working when changed dynamically” and the fix is included in our weekly patch release (v21.1.38). Please update the “Syncfusion.Blazor.Maps” package to latest version in your application to resolve the reported issue. Please find the package link below.

https://www.nuget.org/packages/Syncfusion.Blazor.Maps


Please let us know if you need any further assistance.



GO Gordon April 6, 2023 08:59 AM UTC

Thanks again for the quick response on this issue.


Regards.



IR Indumathi Ravi Syncfusion Team April 7, 2023 01:17 PM UTC

Hi Gordan,


Thank you for the update.

Please get back to us if you need any further assistance.


Loader.
Live Chat Icon For mobile
Up arrow icon