| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: location.georss.inc,v 1.1 2009/02/25 19:01:41 bdragon Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 8 |
|
|
| 9 |
/** |
/** |
| 10 |
* @function |
* @function |
| 11 |
|
* Return an array of namespaces needed for a mode. |
| 12 |
|
*/ |
| 13 |
|
function location_rss_namespaces($mode = 'simple') { |
| 14 |
|
switch ($mode) { |
| 15 |
|
case 'w3c': |
| 16 |
|
case 'w3c_bugcompat': |
| 17 |
|
return array('xmlns:geo' => 'http://www.w3.org/2003/01/geo/wgs84_pos#'); |
| 18 |
|
case 'simple': |
| 19 |
|
return array('xmlns:georss' => 'http://www.georss.org/georss'); |
| 20 |
|
case 'gml': |
| 21 |
|
return array( |
| 22 |
|
'xmlns:georss' => 'http://www.georss.org/georss', |
| 23 |
|
'xmlns:gml' => 'http://www.opengis.net/gml', |
| 24 |
|
); |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
| 28 |
|
/** |
| 29 |
|
* @function |
| 30 |
* Return an array of RSS items for a location. |
* Return an array of RSS items for a location. |
| 31 |
*/ |
*/ |
| 32 |
function _location_rss_item($location, $mode = 'simple') { |
function location_rss_item($location, $mode = 'simple') { |
| 33 |
$ret = FALSE; |
$ret = FALSE; |
| 34 |
if (location_has_coordinates($location, TRUE)) { |
if (location_has_coordinates($location, TRUE)) { |
| 35 |
switch ($mode) { |
switch ($mode) { |