[openstreetmap-website] fixes for trac #4730 (also #4748) (#216)

Eric Theise notifications at github.com
Fri Mar 1 07:21:47 UTC 2013


> @@ -40,4 +40,41 @@ def describe_location(lat, lon, zoom = nil, language = nil)
>        "#{number_with_precision(lat, :precision => 3)}, #{number_with_precision(lon, :precision => 3)}"
>      end
>    end
> +
> +  def nsew_to_decdeg(captures)
> +    begin
> +      Float(captures[0])
> +      captures[1].downcase != 's' ? lat = captures[0].to_f : lat = -(captures[0].to_f)
> +      captures[3].downcase != 'w' ? lon = captures[2].to_f : lon = -(captures[2].to_f)
> +    rescue
> +      captures[0].downcase != 's' ? lat = captures[1].to_f : lat = -(captures[1].to_f)
> +      captures[2].downcase != 'w' ? lon = captures[3].to_f : lon = -(captures[3].to_f)
> +      end
> +    return "#{number_with_precision(lat, :precision => 5)}, #{number_with_precision(lon, :precision => 5)}"

Removed.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/216/files#r3201259
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20130228/4dbcb622/attachment.html>


More information about the rails-dev mailing list