We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While working on Issue #6 , got this error at the route for JSON file of user's restaurant visits
Need to see how to pass the latitude and longitude that are Decimal types, which is not accepted by JSON
The text was updated successfully, but these errors were encountered:
Could convert latitude and longitude to strings/floats, which works:
"latitude": float(visit.restaurant.latitude), "longitude": float(visit.restaurant.longitude)
But read that converting to floats could have rounding issues. Did not see any issues when I converted these two to floats, but saw solutions suggesting simplejson, which has support for Decimal type http://stackoverflow.com/questions/1960516/python-json-serialize-a-decimal-object
Used simplejson as json
Sorry, something went wrong.
When creating javascript function (for loop) to access each of user's visited restaurants and plotting markers, got this error in the browser console:
InvalidValueError: setPosition: not a LatLng or LatLngLiteral: in property lat: not a number
Per solution (http://stackoverflow.com/questions/20585055/uncaught-invalidvalueerror-setposition-not-a-latlng-or-latlngliteral-in-prope), numbers are not being passed in for latitude and longitude.
Decided to not use simplejson and just convert the latitude and longitude to floats in server.py, which fixed the error and markers now being plotted!
No branches or pull requests
While working on Issue #6 , got this error at the route for JSON file of user's restaurant visits
Need to see how to pass the latitude and longitude that are Decimal types, which is not accepted by JSON
The text was updated successfully, but these errors were encountered: