function smart_ip_views_bridge_handler_field_longitude::render in Smart IP 7.2
Same name and namespace in other branches
- 6.2 modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_longitude.inc \smart_ip_views_bridge_handler_field_longitude::render()
- 6 modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_longitude.inc \smart_ip_views_bridge_handler_field_longitude::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_longitude.inc, line 18 - Contains the 'smart_ip_views_bridge_handler_field_longitude' markup field handler.
Class
- smart_ip_views_bridge_handler_field_longitude
- Field handler to display visitor's longitude.
Code
function render($values) {
$smart_ip_session = smart_ip_session_get('smart_ip');
$longitude = '';
if (!empty($smart_ip_session['location']['longitude'])) {
$longitude = $smart_ip_session['location']['longitude'];
}
if ($this->options['style'] == 'dd') {
return $longitude;
}
else {
return theme('smart_ip_longitude_dms', array(
'view' => $longitude,
));
}
}