X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ef7f3d800cbdd49b692df10d312e5fd880e2e938..cba08bb454a0e3571cfc3e858dc2b2817e7b7538:/lib/quad_tile.rb diff --git a/lib/quad_tile.rb b/lib/quad_tile.rb index 8aee1b74a..931ec04a3 100644 --- a/lib/quad_tile.rb +++ b/lib/quad_tile.rb @@ -1,7 +1,7 @@ module QuadTile begin require "quad_tile/quad_tile_so" - rescue MissingSourceFile + rescue LoadError def self.tile_for_point(lat, lon) x = ((lon.to_f + 180) * 65535 / 360).round y = ((lat.to_f + 90) * 65535 / 180).round @@ -72,7 +72,7 @@ module QuadTile end end - sql.push("#{prefix}tile IN (#{single.join(',')})") if single.size > 0 + sql.push("#{prefix}tile IN (#{single.join(',')})") unless single.empty? "( " + sql.join(" OR ") + " )" end