NAME
Geo::GoogleEarth::Document::Folder - Geo::GoogleEarth::Document::Folder object
SYNOPSIS
use Geo::GoogleEarth::Document;
my $document=Geo::GoogleEarth::Document->new();
my $folder=$document->Folder(name=>"My Folder");
DESCRIPTION
Geo::GoogleEarth::Document::Folder is a Geo::GoogleEarth::Document::Base with a few other methods.
USAGE
my $folder=$document->Folder(); #add folder to $document
my $folder=$folder->Folder(); #add folder to $folder
Folder
Constructs a new Folder object and appends it to the parent folder object. Returns the object reference if you need to make any setting changes after construction.
my $folder=$folder->Folder(name=>"My Folder");
$folder->Folder(name=>"My Folder");
Placemark
Constructs a new Placemark object and appends it to the parent folder object. Returns the object reference if you need to make any setting changes after construction.
my $placemark=$folder->Placemark(name=>"My Placemark",
address=>"1600 Pennsylvania Ave NW, Washington, DC");
$folder->Placemark(name=>"My Placemark", lat=>38.897607, lon=>-77.036554);
NetworkLink
Constructs a new NetworkLink object and appends it to the parent folder object. Returns the object reference if you need to make any setting changes after construction.
my $networklink=$folder->NetworkLink(name=>"My NetworkLink",
url=>"./anotherdoc.kml");
$folder->NetworkLink(name=>"My NetworkLink", url=>"./anotherdoc.kml");
type
Returns the object type.
my $type=$folder->type;
structure
Returns a hash reference for feeding directly into XML::Simple.
Unfortunately, this package cannot guarantee how Folders, Placemarks, or NetworkLinks are ordered when in the same folder. Because, it's a hash reference! But, order is preserved within a group of Folders, NetworkLink, and Placemarks.
my $structure=$folder->structure;
data
Pushes arguments onto data array and returns an array or reference that holds folder object content. This is a list of objects that supports a type and structure method.
my $data=$folder->data;
my @data=$folder->data;
$folder->data($placemark);
BUGS
LIMITATIONS
Due to a limitation in XML::Simple and the fact that we feed it a hash, it is not possible to specify the order of Folders, Placemarks and NetworkLinks. However, this package does preserve the order of creation within groups of Folders, Placemarks, and NetworkLinks. A good work around is to put unique types of objects in folders.
TODO
SUPPORT
Try geo-perl email list.
AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Geo::GoogleEarth::Document creates a GoogleEarth KML Document.