X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/349413a520d05cf9c55fe6870de6ea2f933a3248..b42a28067dc0519e77621ab0af3b549ce360ce17:/lib/quad_tile.rb diff --git a/lib/quad_tile.rb b/lib/quad_tile.rb index 6e4fb6d22..a818f6a27 100644 --- a/lib/quad_tile.rb +++ b/lib/quad_tile.rb @@ -3,8 +3,8 @@ module QuadTile require "quad_tile/quad_tile_so" rescue MissingSourceFile def self.tile_for_point(lat, lon) - x = ((lon + 180) * 65535 / 360).round - y = ((lat + 90) * 65535 / 180).round + x = ((lon.to_f + 180) * 65535 / 360).round + y = ((lat.to_f + 90) * 65535 / 180).round return tile_for_xy(x, y) end