Hi,
How Can I catch the mouseMove event when moving in maps and get Longitude and latitude ?
Like in this attatched image :
Thanks in advance.
Hi Kaouther,
We currently do not support "mousemove" event to get the latitude and longitude values of the mouse location on the map. We have considered your requirement as a feature request and added it to our features request list. This implementation will be included in our weekly patch release which is expected to be available by the second week of July 2024. Meanwhile, please find the feedback link below to keep track of this feature.
Hi Kaouthar,
We have implemented the reported requirement - “Support to return latitude and longitude values in the mousemove event”. Unfortunately, due to a technical issue, the script part of the fix was not included in the weekly patch release. However, we assure you that the fix will be included in our next weekly patch release, scheduled for next week.
Please update the "Syncfusion.Blazor.Maps" package to the latest version in your application. Additionally, refer to the custom script available at the link below to resolve the reported issue.
Package: https://www.nuget.org/packages/Syncfusion.Blazor.Maps
Script: https://www.syncfusion.com/downloads/support/directtrac/general/ze/sf-maps1029321699
You can achieve your requirement by utilizing the "OnMouseMove" event in the Maps component. This event provides access to the coordinates of the mouse move event location through the "Latitude" and "Longitude" properties in the event argument. Please find the code snippet from the same below.
Code Snippet:
|
@using Syncfusion.Blazor.Maps
<SfMaps ID="Maps"> <MapsEvents OnMouseMove="@MouseMove"></MapsEvents> //.. //.. </SfMaps>
@code {
public void MouseMove(MouseMoveEventArgs args) {
} } |
Meanwhile, we have created a sample to demonstrate the same and it can be downloaded from the below link.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazMaps493113434
NOTE: You can use the custom script file until the fix is rolled out.
Please
let us know if you need any further assistance.
Hi Kaouthar,
The script part of the fix is now included in the weekly patch release(26.1.42). Please update the “Syncfusion.Blazor.Maps” package to the latest version and refer the latest version of “syncfusion-blazor.min.js” script in your application to resolve the reported issue. Please find the package and script from the below links.
Package: https://www.nuget.org/packages/Syncfusion.Blazor.Maps
Script: https://cdn.syncfusion.com/blazor/26.1.42/syncfusion-blazor.min.js
Please
let us know if you need any further assistance.
Hi Kaouthar,
We have renamed the event "OnMouseMove" to "MouseMove" in the Maps component. This change is included in our Essential Studio 2024 Volume 3 release (v27.1.48), which has been rolled out and is available for download at the following link.
Meanwhile, you can find the documentation link below for your reference.
https://blazor.syncfusion.com/documentation/maps/maps-event#mousemove
We
thank you for your support and appreciate your patience in waiting for this
release. Please get in touch with us if you would require any further
assistance.