A
A
Alexander Vanin2020-11-19 17:06:43
JavaScript
Alexander Vanin, 2020-11-19 17:06:43

How can I get map cursor coordinates using Google API v3 and Vue?

The problem is this. On the map component, I'm trying to fix the position of the cursor and send its coordinates (both on the map canvas and geographic) to the server. I coped with the coordinates on the canvas, that is, XY, but I can’t get to latLng in any way. I catch it like this

<maps
   @mousemove.native="mapHover"
 />

mapHover is the method where catching and sending happens.
When I look at what comes to me in the event, I see only the MouseEvent object. So we come to the main question: can I get the latLng of the cursor by digging in this direction? If so, how? If not, how else can it be?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question