GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Geo::Cache(3) User Contributed Perl Documentation Geo::Cache(3)

Geo::Cache - Object interface for GPS waypoints

    use Geo::Cache;
    my $wpt = Geo::Cache->new(
        lat  => '37.99815',
        lon  => '-85.302017',
        time => $time,
        name => 'GCGVW8',
        desc => 'Neither Hill nor Dale',
        sym  => 'geocache',
        type => 'Geocache|Traditional Cache',
    );
    $wpt->url('http://www.geocaching.com/');


    my $wpt_from_xml = Geo::Cache->new( xml => $xml, );

    my $xml = $wpt->xml;

Provide an object interface to Geocaching.com waypoints and/or geocaches, using the Groundspeak GPX file as the reference for what fields are valid.

Methods are provide for various of the fields that require special treatment.

Three output methods are provided -- "gpx", "gpsdrive", and "loc", for outputting a single waypoint in one of these three formats. These can be used in conjunction with the "Geo::Gpx" module to produce files of those formats.

        Rich Bowen
        rbowen@rcbowen.com

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

The full text of the license can be found in the LICENSE file included with this module.

Create a new "Geo::Cache" object.

    my $wpt = Geo::Cache->new(
        lat  => '37.99815',
        lon  => '-85.302017',
        time => $time,
        name => 'GCGVW8',
        desc => 'Neither Hill nor Dale',
        sym  => 'geocache',
        type => 'Geocache|Traditional Cache',
    );

A data method is provided for each of the valid fields within a Cache object. Calling the method with no argument returns the value of that attribute. Calling the method with an argument changes the value of that attribute to that value.

 my $name = $cache->name;
 $cache->lon(-84.8934);

Returns a blob of XML which constitutes one <wpt> block of a Geocaching.com-style gpx data file. You'll generally not use this method by itself, but will call the "gpx" method from the "Geo::Gpx" module to generate the entire file of one or more waypoints.

"xml" is an alias for the "gpx" method.

2008-11-15 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.