Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created January 5, 2009 12:55
Show Gist options
  • Save ahoward/43381 to your computer and use it in GitHub Desktop.
Save ahoward/43381 to your computer and use it in GitHub Desktop.
def longitude_float_to_display longitude
longitude > 0 ? longitude.abs.to_s << " E" : longitude.abs.to_s << " W"
rescue
longitude
end
def latitude_float_to_display latitude
latitude > 0 ? latitude.abs.to_s << " N" : latitude.abs.to_s << " S"
rescue
latitude
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment