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
close icon

Want to show infowindow on marker click.

Hello Team,


I am using other maps component. I have added markers on map. Now, I want to open popup as infowindow to show specific details on marker click. In this popup I have show image also. So how to achieve this with syncfusion.


Thanks,

Yogesh


4 Replies

YP Yogesh Patil October 28, 2022 07:39 AM UTC

Forget to mention that, I am using OSM map to render.



IR Indumathi Ravi Syncfusion Team October 31, 2022 05:36 PM UTC

Hi Yogesh,


To achieve the scenario, use the "Syncfusion Dialog" component and the "markerClick" event in the Maps component. They both assist in the display of specific details and images in the Dialog component on marker click. Please see the code snippet below.


We have created a sample to demonstrate the same and it can be downloaded from the below link.

https://stackblitz.com/edit/react-25xy8e-ybbgit


Please let us know if the above solution meets your requirement.


Regards,

Indumathi R.



YP Yogesh Patil replied to Indumathi Ravi February 20, 2023 06:05 AM UTC

Hello Syncfusion,


Above solution is working. But I have to identify which mouse key pressed i.e. Left Mouse Key or Right. So can we find out on marker click. Please suggest.




Thanks,

Yogesh





IR Indumathi Ravi Syncfusion Team February 21, 2023 12:51 PM UTC

Hi Yogesh,


In the "markerClick" event, we can't tell whether the left or right button is pressed. However, the Maps component includes a "rightClick" event that notifies us of a right click event on the Maps. However, the event is currently not being properly triggered in the component, and we are working to resolve the issue. So, could you please confirm whether you require a property in the event argument of the "markerClick" event or if the "rightClick" event will be enough?


Loader.
Live Chat Icon For mobile
Up arrow icon