-
-
Save fitomad/1f45a9d65070e56d90b2140936c47a1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
element("map").addEventListener("click", function(event) { | |
var domPoint = new DOMPoint(); | |
domPoint.x = event.pageX; | |
domPoint.y = event.pageY; | |
// Con el punto donde hemos hecho click se lo | |
// pasamos al mapa para que nos de las coordenadas | |
let coordinate = map.convertPointOnPageToCoordinate(domPoint); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment