You are here

function location_views_handler_field_coordinates::render in Location 7.5

Same name and namespace in other branches
  1. 6.3 handlers/location_views_handler_field_coordinates.inc \location_views_handler_field_coordinates::render()
  2. 7.3 handlers/location_views_handler_field_coordinates.inc \location_views_handler_field_coordinates::render()
  3. 7.4 handlers/location_views_handler_field_coordinates.inc \location_views_handler_field_coordinates::render()

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides location_views_handler_field_latitude::render

File

handlers/location_views_handler_field_coordinates.inc, line 15
Coordinates field handler.

Class

location_views_handler_field_coordinates
@file Coordinates field handler.

Code

function render($values) {
  if ($this->options['style'] == 'dms') {
    return theme('location_latitude_dms', array(
      'latitude' => $values->{$this->field_alias},
    )) . ', ' . theme('location_longitude_dms', array(
      'longitude' => $values->{$this->aliases['longitude']},
    ));
  }
  else {
    return check_plain($values->{$this->field_alias}) . ', ' . check_plain($values->{$this->aliases['longitude']});
  }
}