Example output
Here's the Overpass Query to find bike racks within the map bounding-box, along with a brief explanation. This query does not require a regular expression, as we are searching for a specific amenity value.
css code:
[out:json][timeout:25];
(
node["amenity"="bicycle_parking"]({{bbox}});
way["amenity"="bicycle_parking"]({{bbox}});
relation["amenity"="bicycle_parking"]({{bbox}});
);
out body;
>;
out skel qt;
Explanation:
1. [out:json] sets the output format to JSON.
2. [timeout:25] sets a timeout limit of 25 seconds for the query execution.
3. The query is executed for three different elements (node, way, and relation) that have the "amenity" key with the value "bicycle_parking". The ({{bbox}}) restricts the search to the map bounding-box.
4. The out body; statement outputs the main information about the elements found.
5. The >; statement is used to gather additional data (such as the nodes that make up a way or relation).
6. The out skel qt; statement outputs the skeleton data and sorts the result by their element type (nodes first, then ways, and finally relations).
You can use this query in Overpass turbo (overpass-turbo.eu) to find bike racks within the map bounding-box and display the data.