return blank <osm> if no nodes found
authorSteve Coast <steve@asklater.com>
Tue, 8 May 2007 07:53:39 +0000 (07:53 +0000)
committerSteve Coast <steve@asklater.com>
Tue, 8 May 2007 07:53:39 +0000 (07:53 +0000)
app/controllers/api_controller.rb

index bb135a01f55a7733de3fb75f22a54848844007bf..820a5cb6615fe0bfe009a9ed16c7c8d94628abeb 100644 (file)
@@ -60,6 +60,11 @@ class ApiController < ApplicationController
       report_error("You requested too many nodes (limit is 50,000). Either request a smaller area, or use planet.osm")
     end
 
+    if node_ids.length == 0
+      render :text => '<osm></osm>'
+      return
+    end
+
     # grab the segments
     segments = Array.new
     if node_ids.length > 0