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.

This commit is contained in:
Matt Amos 2009-07-02 16:40:29 +00:00
parent 901d77837b
commit 57e571d241
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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;
}