HTML::Microformats::Format::geo(3pm) User Contributed Perl Documentation HTML::Microformats::Format::geo(3pm)

HTML::Microformats::Format::geo - the geo microformat

 use Data::Dumper;
 use HTML::Microformats::DocumentContext;
 use HTML::Microformats::Format::geo;
 my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
 my @geos    = HTML::Microformats::Format::geo->extract_all(
                   $dom->documentElement, $context);
 foreach my $geo (@geos)
 {
   printf("%s;%s\n", $geo->get_latitude, $geo->get_longitude);
 }

HTML::Microformats::Format::geo inherits from HTML::Microformats::Format. See the base class definition for a description of property getter/setter methods, constructors, etc.

"to_kml"

This method exports the geo object as KML. It requires RDF::KML::Exporter to work, and will throw an error at run-time if it's not available.

HTML::Microformats::Format::geo supports geo as described at <http://microformats.org/wiki/geo>, with the following additions:

Data is returned using the W3C's vCard vocabulary (<http://www.w3.org/2006/vcard/ns#>) and the W3C's WGS84 vocabulary (<http://www.w3.org/2003/01/geo/wgs84_pos#>).

For non-WGS84 co-ordinates, UNGEO (<http://buzzword.org.uk/rdf/ungeo#>) is used instead.

Please report any bugs to <http://rt.cpan.org/>.

HTML::Microformats::Format, HTML::Microformats, HTML::Microformats::Format::hCard.

Toby Inkster <tobyink@cpan.org>.

Copyright 2008-2012 Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

2021-09-12 perl v5.32.1