开发者

How to design a location data app integrated with own RoR web site for iPhone

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:

  1. Have the iPhone provide an updated location when the user moves more than X meters
  2. Take the new GPS location and make a request to the server. (Preferrably SSL with some posted key info to prevent open access)
  3. The server searches for POIs within a radius of that location and returns JSON or XML of POI GPS information
  4. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜