Files
mapknitter/app/controllers/utility_controller.rb
Jeffrey Warren af3552012d Cleanup (#313)
* initial cleanup

* export unit tests, basic

* map tests

* basic comment tests

* cleanup

* export functional tests

* fixes

* Update export.rb

* test fixes and further cleanup

* extra test

* trying again

* another unit test

* output errors?

* Update map_test.rb

* Update maps.yml

* Update tag_test.rb
2019-01-30 09:15:12 -05:00

16 lines
331 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
def tms_info
end
end