Skip to content

Lat and Lng inverted in twitter api #3

@dengarcia

Description

@dengarcia

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions