I am looking into switching our apps mapping platform away from google maps. After a bit of trail and error, I was able to get a somewhat working example. I however have run into a deal breaking scenario.

The scenario I have is this. Given a users current location, find me all of the POI's in their area based on a specific amenity or cuisine type.

Ideally I would like to use the current users lat/lng to determine where they are and then do a radius search based on this.

The question I have is, how do I pass the current users lat/lng into the Overpass api? The only thing I can see is that I can set a bounding box.

This is the current (non working) query that I am using

<osm-script output="json" timeout="25"> <union> <query type="node"> <has-kv k="cuisine" v="coffee_shop"/> <around radius="1000"/> <bbox-query {{bbox}}=""/> </query> </union> <print mode="body"/> <recurse type="down"/> <print mode="skeleton" order="quadtile"/> </osm-script>

asked 10 Feb '14, 23:21

Tempname's gravatar image

accept rate: 0%

The Overpass API does actually support this directly in the around statement:

<around radius="1000" lat="52.3691" lon="4.88941" />

Or see this example.

permanent link

answered 11 Feb '14, 08:54

tyr_asd's gravatar image

accept rate: 64%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 10 Feb '14, 23:21

question was seen: 2,293 times

last updated: 11 Feb '14, 08:54

powered by OSQA