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
Jonah Kesoyan
2,055 PointsGeneral programming question
On a photosharing app like IG, how would you display photos on the feed nearby in your city. Can someone point me in the right direction. Thank you!
2 Answers
Douglass Turner
Treehouse Guest TeacherOff the top of my dome, Assuming IG photos store lat/long you can present them as photo-pushpins on a map. See iOS frameworks MapKit and CoreLocation.
Note, from an info-vis perspective it is best to provide more then one representation - see Edward Tufte - the map being just one.
Brett Doffing
4,978 PointsI'd think that's quite the loaded question, but what immediately comes to mind is hooking up the backend of your application with Parse.com. They make geolocation services, working with a simple database, and communicating with your app just about as easy as it can get, with many other features as well. You could easily have users upload photos, attach a location to the photo, and query the database from within your app to see photos that were taken nearby.
Jonah Kesoyan
2,055 PointsWhat if you dont want the users to attach a location, what if you want the app to determine the location automatically and then when youre in the feed, it automatically shows you nearby pics
Brett Doffing
4,978 PointsYou would have to at least ask users for permission to gather location data in the app. After that, gather and use all the location data any way you imagine. Very easy with Parse.
Jonah Kesoyan
2,055 PointsI'm new to iOS development, I know about Parse and some functionality of it, but can you be a bit more specific. Thanks a bunch!
Brett Doffing
4,978 PointsParse's documentation should be sufficient for learning how to use and implement their geolocation services, start looking there. Otherwise I'm sure there are many basic tutorials in gathering coordinates in iOS if Googled. If you haven't yet, work with a library here that integrates iOS and Parse to familiarize yourself.