Use tile based queries for unwayed segments.
authorTom Hughes <tom@compton.nu>
Fri, 21 Sep 2007 16:04:36 +0000 (16:04 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 21 Sep 2007 16:04:36 +0000 (16:04 +0000)
app/controllers/swf_controller.rb

index 084a7d57a181692db0b34343b1a68f3e90161a74..628a95e064ceda1e4043c73faf63650bb6cfd76e 100644 (file)
@@ -95,8 +95,7 @@ class SwfController < ApplicationController
                                "       LEFT OUTER JOIN current_way_segments"+
                                "       ON segment_id=current_segments.id,"+
                                "       current_nodes AS cn1,current_nodes AS cn2"+
-                               " WHERE (cn1.longitude BETWEEN #{xmin} AND #{xmax})"+
-                               "   AND (cn1.latitude  BETWEEN #{ymin} AND #{ymax})"+
+                               " WHERE "+OSM.sql_for_area(ymin,xmin,ymax,xmax,"cn1.")+
                                "   AND segment_id IS NULL"+
                                "   AND current_segments.visible=1"+
                                "   AND cn1.id=node_a AND cn1.visible=1"+