From: Matt Amos Date: Thu, 2 Jul 2009 16:40:29 +0000 (+0000) Subject: Changed shortlink zoom level correction char to '-', as this seems to fare better... X-Git-Tag: live~6894 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/57e571d241875e867ba5d419fc71cd47c1792a67?ds=sidebyside Changed shortlink zoom level correction char to '-', as this seems to fare better with twitter et al.'s URL highlighting. Decoder is backwards-compatible with the old system. --- diff --git a/lib/short_link.rb b/lib/short_link.rb index afcf1ef37..b91d7e569 100644 --- a/lib/short_link.rb +++ b/lib/short_link.rb @@ -57,7 +57,7 @@ module ShortLink # append characters onto the end of the string to represent # partial zoom levels (characters themselves have a granularity # of 3 zoom levels). - ((z + 8) % 3).times { str << "=" } + ((z + 8) % 3).times { str << "-" } return str end diff --git a/public/javascripts/site.js b/public/javascripts/site.js index b7ad7d7e4..59999b8c0 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -231,7 +231,7 @@ function makeShortCode(lat, lon, zoom) { str += char_array.charAt(digit); } for (var i = 0; i < ((zoom + 8) % 3); ++i) { - str += "="; + str += "-"; } return str; }