mirror of
https://github.com/publiclab/mapknitter.git
synced 2025-12-05 16:00:00 +01:00
* Remove trailing white spaces and unnecessary blank lines * Remove basic rubocop offenses * add few maps tests * refactor maps controller * fix 'line too long' rubocop offense
11 lines
311 B
Ruby
11 lines
311 B
Ruby
class UtilityController < ApplicationController
|
|
# translates TMS formats from one ordering to another
|
|
def tms_alt
|
|
# /z/x/y.png
|
|
# /z/x/y.png
|
|
# /z/x/(2*z-y-1).png
|
|
y = 2**params[:z].to_i - params[:y].to_i - 1
|
|
redirect_to "/tms/#{params[:id]}/#{params[:z]}/#{params[:x]}/#{y}.png"
|
|
end
|
|
end
|