# Can search by tag k, v, or both (type->k,value->v)
# Can search by name (k=name,v=....)
- before_filter :authorize
after_filter :compress_output
def search_all
def do_search(do_ways,do_segments,do_nodes)
- response.headers["Content-Type"] = 'text/xml'
-
type = params['type']
value = params['value']
unless type or value
# Print
- doc = OSM::API.get_xml_doc
+ doc = OSM::API.new.get_xml_doc
nodes.each do |node|
doc.root << node.to_xml_node()
end
doc.root << way.to_xml_node()
end
- render :text => doc.to_s
+ render :text => doc.to_s, :content_type => "text/xml"
end
end