qw3n
qw3n

Reputation: 6334

Getting the lat and long of a click event

Is there a way to get the latitude and longitude when a user click somewhere on a planetary.js globe? It's not in the planetary.js API, but is there a way to do it in d3.js? If there isn't how hard would it be to implement the solution?

Upvotes: 3

Views: 456

Answers (1)

qw3n
qw3n

Reputation: 6334

After further digging into the D3 API if found that projection.invert([x,y]) returns [long,lat] of the supplied coordinates.

Upvotes: 4

Related Questions