update_changeset(rel, cs_id)
# check that the downloaded tags are the same as the uploaded tags...
update_changeset(rel, cs_id)
# check that the downloaded tags are the same as the uploaded tags...
update_changeset(rel, cs_id)
# check that the downloaded tags are the same as the uploaded tags...
update_changeset(rel, cs_id)
# check that the downloaded tags are the same as the uploaded tags...
relation_xml = current_relations(:visible_relation).to_xml
relation_element = relation_xml.find("//osm/relation").first
new_tag = XML::Node.new("tag")
relation_xml = current_relations(:visible_relation).to_xml
relation_element = relation_xml.find("//osm/relation").first
new_tag = XML::Node.new("tag")
relation_xml = Relation.find(relation_id).to_xml
relation_element = relation_xml.find("//osm/relation").first
new_member = XML::Node.new("member")
relation_xml = Relation.find(relation_id).to_xml
relation_element = relation_xml.find("//osm/relation").first
new_member = XML::Node.new("member")
- new_member['ref'] = element.id.to_s
- new_member['type'] = element.class.to_s.downcase
- new_member['role'] = "some_role"
+ new_member["ref"] = element.id.to_s
+ new_member["type"] = element.class.to_s.downcase
+ new_member["role"] = "some_role"
- new_member['ref'] = 5.to_s
- new_member['type'] = 'node'
- new_member['role'] = 'new first'
+ new_member["ref"] = 5.to_s
+ new_member["type"] = "node"
+ new_member["role"] = "new first"
doc.find("//osm/relation").first.child.prev = new_member
# update the version, should be 1?
doc.find("//osm/relation").first.child.prev = new_member
# update the version, should be 1?
- doc.find("//osm/relation").first['id'] = relation_id.to_s
- doc.find("//osm/relation").first['version'] = 1.to_s
+ doc.find("//osm/relation").first["id"] = relation_id.to_s
+ doc.find("//osm/relation").first["version"] = 1.to_s
new_doc = XML::Parser.string(xml).parse
doc_members = doc.find("//osm/relation/member").collect do |m|
new_doc = XML::Parser.string(xml).parse
doc_members = doc.find("//osm/relation/member").collect do |m|
# the parsed XML doc is retured.
def with_update_diff(rel)
rel_id = rel.find("//osm/relation").first["id"].to_i
# the parsed XML doc is retured.
def with_update_diff(rel)
rel_id = rel.find("//osm/relation").first["id"].to_i
##
# update the changeset_id of a node element
def update_changeset(xml, changeset_id)
##
# update the changeset_id of a node element
def update_changeset(xml, changeset_id)