Joke Collection Website - News headlines - How to realize the real-time positioning of Gaode map and get the coordinates and position of the current position?
How to realize the real-time positioning of Gaode map and get the coordinates and position of the current position?
When initializing the map object, add a mouse monitor.
mapObj.addEventListener(mapObj,MOUSE_CLICK,MclickMouse); //mouse click event
MclickMouse is what you want to do after clicking.
The function MclickMouse(param){ // passes in the map object param to get xydocument.getelementbyid ("MapX"). value = param.eventxdocument.getElementById("mapY ")。 value = param.eventY
}
So you can get x and y coordinates.
- Related articles
- What is a proverb?
- Content of inspirational blackboard newspaper for junior middle school youth
- Regarding Hainan Free Trade Port, these dry goods must be seen →
- Is Tinker Bell Hanfu genuine?
- Good morning sign-in and punch-in quotations are suitable for sending friends in the morning.
- What are the specific measures for the three major telecom companies to speed up and reduce fees?
- 202 1 model recommendation letter on outstanding students
- Colorful activities full score student essays 8 essays
- What are the creative points of fresh sweet waxy corn?
- Is the geomantic omen in front of the office exquisite?