Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lat and Lng inverted in twitter api #3

Open
dengarcia opened this issue Nov 1, 2016 · 0 comments
Open

Lat and Lng inverted in twitter api #3

dengarcia opened this issue Nov 1, 2016 · 0 comments

Comments

@dengarcia
Copy link

Twitter api defines coordinate as being:

"coordinates": { "coordinates": [-75.14310264, 40.05701649], "type":"Point"}
with longitude first, then latitude

But in the server.js file we take the latitude first
var outputPoint = {"lat": data.coordinates.coordinates[0],"lng": data.coordinates.coordinates[1]};

It is kind of self corrected when we pass the coordinates back to google maps where there is a second reverse :
var tweetLocation = new google.maps.LatLng(data.lng,data.lat);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant