Getting lat and long click event

Is there a way to get the latitude and longitude when the user clicks somewhere on the planetary world? It's not in the planetary.js API, but is there a way to do it in d3.js? If it's not that hard to implement the solution?

+3


source to share


1 answer


After further diving into the D3 API, if found that projection.invert([x,y])

returns the [long,lat]

provided coordinates.



+4


source







All Articles