openstreetmap-website

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

Ruby

The Rails application that powers OpenStreetMap

AmfController#putway

Save a way to the database, including all nodes. Any nodes in the previous
version and no longer used are deleted.

Parameters:
0. hash of renumbered nodes (added by amf_controller)
1. current user token (for authentication)
2. current changeset
3. new way version
4. way ID
5. list of nodes in way
6. hash of way tags
7. array of nodes to change (each one is [lon,lat,id,version,tags]),
8. hash of nodes to delete (id->version).

Returns:
0. '0' (code for success),
1. message,
2. original way id (unchanged),
3. new way id,
4. hash of renumbered nodes (old id=>new id),
5. way version,
6. hash of changed node versions (node=>version)
7. hash of deleted node versions (node=>version)

Source | Google | Stack overflow

Edit

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

cd openstreetmap-website

open app/controllers/amf_controller.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-AmfController-putway-for-pr


# Commit to git

git add app/controllers/amf_controller.rbgit commit -m "better docs for AmfController#putway"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-AmfController-putway-for-pr

hub pull-request


# Celebrate!