X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/701325e9ef6720a16646c7218010e33b5c58d544..2c397321c9309eb9cd4dfed21375fc821a8d2d37:/app/helpers/application_helper.rb diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ce0c5d67b..4aec9f5c1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -125,6 +125,10 @@ module ApplicationHelper end end + def scale_to_zoom(scale) + Math.log(360.0 / (scale.to_f * 512.0)) / Math.log(2.0) + end + private def javascript_strings_for_key(key)