You are here

function smart_ip_views_bridge_handler_field_coordinates::render in Smart IP 6.2

Same name and namespace in other branches
  1. 6 modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_coordinates.inc \smart_ip_views_bridge_handler_field_coordinates::render()
  2. 7.2 modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_coordinates.inc \smart_ip_views_bridge_handler_field_coordinates::render()
2 methods override smart_ip_views_bridge_handler_field_coordinates::render()
smart_ip_views_bridge_handler_field_latitude::render in modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_latitude.inc
smart_ip_views_bridge_handler_field_longitude::render in modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_longitude.inc

File

modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_coordinates.inc, line 35
Contains the 'smart_ip_views_bridge_handler_field_coordinates' field handler.

Class

smart_ip_views_bridge_handler_field_coordinates
Field handler to display visitor's coordinates.

Code

function render($values) {
  $smart_ip_session = smart_ip_session_get('smart_ip');
  if ($this->options['style'] == 'dd') {
    return $smart_ip_session['location']['latitude'] . ', ' . $smart_ip_session['location']['longitude'];
  }
  else {
    return theme('smart_ip_longitude_dms', $smart_ip_session['location']['latitude']) . ', ' . theme('smart_ip_longitude_dms', $smart_ip_session['location']['longitude']);
  }
}