user2959777
user2959777

Reputation: 1

Matching coordinates on Google Maps to planetary.js

I am looking to migrate from Google Maps to planetary.js and I need to move a bunch of markers. Does anyone know how Google Maps coordinates match to coordinates in planetary.js?

If I have a Google Maps location such as "-33.654437, 151.188164" - what does this map to in planetary.js?

Upvotes: 0

Views: 305

Answers (2)

Tobias - Phoenix_IV
Tobias - Phoenix_IV

Reputation: 1

As it seems they are the same, switching the x and y coordinate works for me.

Google / Openstreetmap: "-33.654437, 151.188164"
Planetary.js: (151.188164, -33.654437)

Upvotes: 0

Michelle Tilley
Michelle Tilley

Reputation: 159125

Those should be latitude/longitude coordinates, and you can be converted into x/y coordinates on the planet's projection via D3's projection. The projection is exposed in Planetary.js as planet.projection.

Upvotes: 0

Related Questions