]> git.openstreetmap.org Git - rails.git/blob - app/views/api/map/_way.xml.builder
9f2e7721cd17b28d985663a688eb0c3e4e4eddfb
[rails.git] / app / views / api / map / _way.xml.builder
1 attrs = {
2   "id" => way.id,
3   "visible" => way.visible,
4   "version" => way.version,
5   "changeset" => way.changeset_id,
6   "timestamp" => way.timestamp.xmlschema,
7   "user" => way.changeset.user.display_name,
8   "uid" => way.changeset.user_id
9 }
10
11 xml.way(attrs) do |w|
12   way.nodes.each do |n|
13     w.nd(:ref => n.id)
14   end
15
16   way.tags.each do |k, v|
17     w.tag(:k => k, :v => v)
18   end
19 end