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

Geo Data not saving the correct way even when lat/lng in correct order #5907

Closed
REPTILEHAUS opened this issue Aug 12, 2019 · 0 comments
Closed

Comments

@REPTILEHAUS
Copy link

REPTILEHAUS commented Aug 12, 2019

Expected Results

Geo Query returns correct values

Actual Outcome

GeoPoint seems to save backwards even though lat/lang is saved in correct order

Environment Setup

  • Server

    • parse-server version 3.50
    • Operating System: OSX / Mongo Atlas DB v4
    • Hardware: Macbook pro
    • Localhost or remote server? Localhost but DB is cloud based on MongoAtlas running mongo v4
  • Database

    • MongoDB version: v4

Logs/Trace

I saved user location like so

When I try to retrieve it it comes back backwards
{"__type":"GeoPoint","latitude":14.40,"longitude":50.00}
desired result is
{"__type":"GeoPoint","latitude":50.00,"longitude":14.40}

Once saved it looks like a standard array in the DB and appears to be in the right order, but testing and outputting in the server console reveals the full type as above with lat/lng incorrect.

location: Array[
0:50.09
1:14.46
]```


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