Catch Maps MouseMove event and get Longitude and latitude

Hi,

How Can I catch the mouseMove event when moving in maps and get Longitude and latitude ?

Like in this attatched image : 

Image_3786_1718378739445


Thanks in advance.


5 Replies

HP Hemanathan Pandian Syncfusion Team June 17, 2024 11:00 AM UTC

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.


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



KA Kaouthar replied to Hemanathan Pandian June 19, 2024 09:44 AM UTC

Thank u  Hemanathan Pandian !



IR Indumathi Ravi Syncfusion Team July 10, 2024 10:59 AM UTC

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

Scripthttps://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.

Samplehttps://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.



IR Indumathi Ravi Syncfusion Team July 16, 2024 02:08 PM UTC

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

Scripthttps://cdn.syncfusion.com/blazor/26.1.42/syncfusion-blazor.min.js


Please let us know if you need any further assistance.



IR Indumathi Ravi Syncfusion Team September 19, 2024 10:58 AM UTC

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.


https://www.syncfusion.com/forums/194459/essential-studio-2024-volume-3-main-release-v27-1-48-is-available-for-download


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.


Loader.
Up arrow icon