fail OSM::APIBadXMLError.new("relation", pt, "The #{member['type']} is not allowed only, #{TYPES.inspect} allowed") unless TYPES.include? member["type"]
fail OSM::APIBadXMLError.new("relation", pt, "The #{member['type']} is not allowed only, #{TYPES.inspect} allowed") unless TYPES.include? member["type"]
# member_ref = member['ref']
# member_role
member["role"] ||= "" # Allow the upload to not include this, in which case we default to an empty string.
# member_ref = member['ref']
# member_role
member["role"] ||= "" # Allow the upload to not include this, in which case we default to an empty string.
relation.add_member(member["type"].classify, member["ref"], member["role"])
end
fail OSM::APIBadUserInput.new("Some bad xml in relation") if relation.nil?
relation.add_member(member["type"].classify, member["ref"], member["role"])
end
fail OSM::APIBadUserInput.new("Some bad xml in relation") if relation.nil?
##
# if any members are referenced by placeholder IDs (i.e: negative) then
# this calling this method will fix them using the map from placeholders
##
# if any members are referenced by placeholder IDs (i.e: negative) then
# this calling this method will fix them using the map from placeholders