You are here

function theme_smart_ip_longitude_dms in Smart IP 7

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.2 smart_ip.module \theme_smart_ip_longitude_dms()

Display longitude.

File

./smart_ip.module, line 340
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;
}