Simple concept: Map users current location with specific points of interest around their vicinity.
Details: I have my own map mash-up web site, that provides a service for people to search for as well as contribute GPS location data of toboggan hills.
Now I need to build a companion iPhone app for the site.
My Challenge: I'm kindly asking for input as to which API tools/design best suit this task?
I'm aware of the Core Location Framework. But am ignorant of how best to go about getting my list of location data points from my own Rails web site. (I didn't code the web site, it was outsourced)
I'll need to explain this to the rails team for any site changes. As well as figure out f开发者_Python百科or myself the iPhone portion.
Ideally, I'm imagining a protocol where I ask the server to only give me the list of location points within a certain GPS radius that the iPhone is in.
Is that possible? Will that tax the server too much?Downloading the entire world-wide list of hills and then filtering on the iPhone for just the ones 'in view' seems inefficient.
How do other apps do it?
Thank you.
You are going down the correct path. In a nutshell you want to:
- Have the iPhone provide an updated location when the user moves more than X meters
- Take the new GPS location and make a request to the server. (Preferrably SSL with some posted key info to prevent open access)
- The server searches for POIs within a radius of that location and returns JSON or XML of POI GPS information
- Use that information to draw the POIs
The question you have, is if you want to store the POI info on the device or if you want to get it fresh every time.
精彩评论