You are here

function smart_ip_views_bridge_handler_field_latitude::render in Smart IP 7.2

Same name and namespace in other branches
  1. 6.2 modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_latitude.inc \smart_ip_views_bridge_handler_field_latitude::render()
  2. 6 modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_latitude.inc \smart_ip_views_bridge_handler_field_latitude::render()

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides smart_ip_views_bridge_handler_field_coordinates::render

File

modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_latitude.inc, line 18
Contains the 'smart_ip_views_bridge_handler_field_latitude' field handler.

Class

smart_ip_views_bridge_handler_field_latitude
Field handler to display visitor's latitude.

Code

function render($values) {
  $smart_ip_session = smart_ip_session_get('smart_ip');
  $latitude = '';
  if (!empty($smart_ip_session['location']['latitude'])) {
    $latitude = $smart_ip_session['location']['latitude'];
  }
  if ($this->options['style'] == 'dd') {
    return $latitude;
  }
  else {
    return theme('smart_ip_latitude_dms', array(
      'view' => $latitude,
    ));
  }
}