X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/52d7cae438d4b6f57423a3e22e4a5aa922a47336..2af0840ff314f9d1e0265a4a1b50fc6db4af9047:/lib/short_link.rb diff --git a/lib/short_link.rb b/lib/short_link.rb index 69634cea5..ddf37b67a 100644 --- a/lib/short_link.rb +++ b/lib/short_link.rb @@ -55,7 +55,7 @@ module ShortLink # given a location and zoom, return a short string representing it. def self.encode(lon, lat, z) code = interleave_bits(((lon + 180.0) * 2**32 / 360.0).to_i, - ((lat + 90.0) * 2**32 / 180.0).to_i) + ((lat + 90.0) * 2**32 / 180.0).to_i) str = "" # add eight to the zoom level, which approximates an accuracy of # one pixel in a tile.