openstreetmap-website

https://github.com/openstreetmap/openstreetmap-website

Ruby

The Rails application that powers OpenStreetMap

ApiController#map

This is probably the most common call of all. It is used for getting the
OSM data for a specified bounding box, usually for editing. First the
bounding box (bbox) is checked to make sure that it is sane. All nodes
are searched, then all the ways that reference those nodes are found.
All Nodes that are referenced by those ways are fetched and added to the list
of nodes.
Then all the relations that reference the already found nodes and ways are
fetched. All the nodes and ways that are referenced by those ways are then
fetched. Finally all the xml is returned.

Source | Google | Stack overflow

Edit

git clone [email protected]:openstreetmap/openstreetmap-website.git

cd openstreetmap-website

open app/controllers/api_controller.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ApiController-map-for-pr


# Commit to git

git add app/controllers/api_controller.rbgit commit -m "better docs for ApiController#map"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ApiController-map-for-pr

hub pull-request


# Celebrate!