/** * Formats a geo. * * @param \Libreworks\Microformats\Geo $geo The geo coordinates * @return string The HTML markup */ public function format(Geo $geo) { return '<span class="h-geo">' . '<span class="p-latitude">' . (string) $geo->getLatitude() . '</span>, ' . '<span class="p-longitude">' . (string) $geo->getLongitude() . '</span>' . ($geo->getAltitude() === null ? '' : ' (elevation <span class="p-altitude">' . (string) $geo->getAltitude() . '</span>)') . '</span>'; }