On Fri, Apr 27, 2012 at 5:02 PM, Ramiro Cosentino <ramaug...@gmail.com> wrote:

> Yes, sure. What I mean is I have different pre-loaded locations
> (restaurants, hotels, etc. ) already stored with their lon/lat
> on the phone's database, and I'd like to show all of them which are in the
> range of, let's say, 20 blocks
> near the user's current location.

As Richard points out, the easiest thing for you to do is decide what
a block is in some measurement system (ala meters). From there you can
determine the radius you'll need to work out.

You shouldn't use the OSM servers directly from your phone's app, but
you may be able to get permission from, say the MapQuest one (I can't
speak for them, but they have fairly generous terms).

Now, an XAPI call requires a bounding box, so you'll need to calculate
your radius to a degrees, and your circle to a square. Once you do
that, you're ready to make your XAPI call.

http://open.mapquestapi.com/xapi/

That page uses an improved version of a little cutsey frontend I wrote
a long time ago (theirs is nicer!).

if you're unfamiliar with OSM's tagging system, you should spend some
time on the wiki, or watch the videos I put out about a year ago that
cover OSM basics:

http://www.youtube.com/playlist?list=PLCE6296A33CF47955&feature=mh_lolz

- Serge

_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to