Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
ez a
2,491 PointsShift with the same coordinates
hello everyone!
I have a little problem, and i was wondering if you guys can help me solve it or if you can give me some hints.
The problem is that i'am coding a website, and i am using the google maps api (dynamic map), so that users can select where they did park their cars(with a marker), then i take the latLng values and i save it in my database. after that, and when the user wants to have a look on his informations, i use the reverse geocoding script with the values of latLng that i saved (with a marker), but i dont get the same result, there is a difference between the two markers place.
Do you have any idea Why is that? and what can i do to get an excat result?
Thank you,
2 Answers
ez a
2,491 Pointsi resolved the problem, thank you anw ^^
Cody Coats
7,469 PointsMake sure your data types sync up across getting the value to saving the value. If you get a float from the API, then save it to a database field which is an int you'll lose some data.
Best way to store it in your database is actually as a geolocation rather than a number (if your DB supports that).
Cody Coats
7,469 PointsCody Coats
7,469 PointsJust for the rest of the treehouse community, incase they run into a similar problem, do you mind posting your resolution?