You are here

function theme_smart_ip_longitude_dms in Smart IP 7.2

Same name and namespace in other branches
  1. 8.4 smart_ip.module \theme_smart_ip_longitude_dms()
  2. 8.2 smart_ip.module \theme_smart_ip_longitude_dms()
  3. 8.3 smart_ip.module \theme_smart_ip_longitude_dms()
  4. 6.2 smart_ip.module \theme_smart_ip_longitude_dms()
  5. 6 smart_ip.module \theme_smart_ip_longitude_dms()
  6. 7 smart_ip.module \theme_smart_ip_longitude_dms()

Display longitude.

2 theme calls to theme_smart_ip_longitude_dms()
smart_ip_views_bridge_handler_field_coordinates::render in modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_coordinates.inc
Render the field.
smart_ip_views_bridge_handler_field_longitude::render in modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_longitude.inc
Render the field.

File

./smart_ip.module, line 368
Determines country, geo location (longitude/latitude), region, city and postal code of the user, based on IP address

Code

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