# Capturing mouse events/position

**URL:** <https://community.plotly.com/t/capturing-mouse-events-position/4616>\
**Category:** Dash Python\
**Created:** [June 25, 2017, 2:47pm UTC](https://community.plotly.com/t/capturing-mouse-events-position/4616 "2017-06-25T14:47:03Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![fkratzert](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@fkratzert](https://community.plotly.com/u/fkratzert)\
**Post date:** [November 16, 2017, 9:23am UTC](https://community.plotly.com/t/capturing-mouse-events-position/4616/21 "2017-11-16T09:23:21Z")

</div>

@chriddyp Thanks for coming back to this issue after such a long time. I wrote my comment under the github discussion.

---

<div class="post-metadata">

**Author:** ![datadrinkr](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@datadrinkr](https://community.plotly.com/u/datadrinkr)\
**Post date:** [April 4, 2019, 5:23pm UTC](https://community.plotly.com/t/capturing-mouse-events-position/4616/22 "2019-04-04T17:23:24Z")

</div>

@jimmybow  
Is there any way to get the latitude/longitude of the mouse hover point, rather than just the ‘x’ and ‘y’ values?

---

<div class="post-metadata">

**Author:** ![jimmybow](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jimmybow/32/6281_2.png) [@jimmybow](https://community.plotly.com/u/jimmybow)\
**Post date:** [April 5, 2019, 2:27pm UTC](https://community.plotly.com/t/capturing-mouse-events-position/4616/23 "2019-04-05T14:27:07Z")

</div>

Hi, you can use [visdcc.Run\_js](https://github.com/jimmybow/visdcc#3-visdccrun_js-) to write your own javascript event listener. 🙂  
here is the example code [https://github.com/jimmybow/visdcc/blob/master/example/Run\_js/Add\_event\_and\_callback.py](https://github.com/jimmybow/visdcc/blob/master/example/Run_js/Add_event_and_callback.py)

---

<div class="post-metadata">

**Author:** ![Qahan](https://avatars.discourse-cdn.com/v4/letter/q/91b2a8/32.png) [@Qahan](https://community.plotly.com/u/Qahan)\
**Post date:** [October 2, 2019, 1:35pm UTC](https://community.plotly.com/t/capturing-mouse-events-position/4616/25 "2019-10-02T13:35:05Z")

</div>

Hi, this is a good example of mouse hover but is it possible to update the string store location and year to the map hover itself instead of returning it to the html div element.

[Previous page](https://community.plotly.com/t/capturing-mouse-events-position/4616.md?page=1)
