-
-
Notifications
You must be signed in to change notification settings - Fork 597
GeoPoint storing as strings if constructed by a string array #592
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
Comments
@Krilwya are you willing to open a PR with the failing test and add additional validation? |
Sure, I runned the jest test on my changes locally, that succeed them, if you could explain to me the procedure to ask for a pull request as it's my first time on github that'd be great. I am only used to vsts. |
Did you check the github pull request guide? https://help.github.com/articles/creating-a-pull-request/ Usually:
|
Thank you for your answer, I think I did all the requirement to do so. If you need anything else to verify or something seems wrong I'd be pleased to hear from you. |
Closing via #671 |
I encountered an issue using near after migrating string gps positions into GeoPoints.
So basically when you do something like :
new Parse.GeoPoint(["48.84023", "2.33334"])
it returns :
ParseGeoPoint {_latitude: "48.84023", _longitude: "2.33334"}
So it passes through the constuctor of the Geopoint, it shall be more efficient in the _validate method of the Geopoint to check typeof latitude == "number" and same with longitude or try to cast those into parseFloat or whatever.
Knowing all of that, having string geopoints break all near, withinKilometers, and so on functions as mongodb would look for floats.
The text was updated successfully, but these errors were encountered: