You are here

public function ParserVcalendar::parseGeofield in Date iCal 7.3

Handler that parses GEO fields.

Return value

array The latitude and longitude values, keyed by 'lat' and 'lon'.

File

libraries/ParserVcalendar.inc, line 201
Defines a class that parses iCalcreator vcalendar objects into Feeds-compatible data arrays.

Class

ParserVcalendar
@file Defines a class that parses iCalcreator vcalendar objects into Feeds-compatible data arrays.

Code

public function parseGeofield($property_key, $vcalendar_component) {
  $geo = array();
  if (!empty($vcalendar_component->geo['value'])) {
    $geo['lat'] = $vcalendar_component->geo['value']['latitude'];
    $geo['lon'] = $vcalendar_component->geo['value']['longitude'];
  }
  return $geo;
}