georss.php 317 B

12345678910111213141516
  1. <?php
  2. /**
  3. * GeoRSS view
  4. *
  5. * This implements GeoRSS-Simple
  6. *
  7. * @uses $vars['entity']
  8. */
  9. $longitude = $vars['entity']->getLongitude();
  10. $latitude = $vars['entity']->getLatitude();
  11. if ($vars['entity'] instanceof Locatable && $longitude && $latitude) {
  12. echo "<georss:point>$latitude $longitude</georss:point>";
  13. }