I got a point on my map and now I'm just trying to get the name of the city (or suburb) in which the point is. My first attempt was like this:
<query type="node">
<bbox-query {{bbox}}/>
<has-kv k="place" v="suburb"/>
</query>
<print/>
But this won't work for me, if the suburb-node isn't in my bounding-box. Is there something like an around-, nearest- or is-in-condition to get this node?
Thanks a lot!
If you are looking for the city, country or an otherwise named place a given coordinate is in, then you are better of using a geocoder. Nominatim provides geocoding capabilities based on OSM data.
To answer your original question: If the feature you are searching for is not inside the bounding box, then you can of course just try extending the bounding box. But there is also an around keyword for searching something near something else. Note that this will return all data matching the given tags, not just the closest one to your given point. Furthermore because Overpass is not a geocoder it won't work correctly for features mapped as an area or relation instead of a simple node.