You are here

function theme_getlocations_longitude_dms in Get Locations 7

Same name and namespace in other branches
  1. 7.2 getlocations.module \theme_getlocations_longitude_dms()

Returns HTML of a longitude in decimal degress expressed in degrees, minutes and seconds.

from location module

Parameters

array $variables: An associative array containing:

  • longitude: A longitude in decimal degrees.
4 theme calls to theme_getlocations_longitude_dms()
getlocations_fields_handler_field_coordinates::render in modules/getlocations_fields/handlers/getlocations_fields_handler_field_coordinates.inc
Render the field.
getlocations_fields_handler_field_longitude::render in modules/getlocations_fields/handlers/getlocations_fields_handler_field_longitude.inc
Render the field.
getlocations_search_info_sql in modules/getlocations_search/getlocations_search.module
theme_getlocations_fields_show in modules/getlocations_fields/getlocations_fields.module

File

./getlocations.module, line 7756
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function theme_getlocations_longitude_dms($variables) {
  $longitude = $variables['longitude'];
  $output = '';
  list($degrees, $minutes, $seconds, $negative) = getlocations_dd_to_dms($longitude);
  $output .= $degrees . "° " . $minutes . "' " . $seconds . "" ";
  if (!$negative) {
    $output .= 'E';
  }
  else {
    $output .= 'W';
  }
  return $output;
}