Geo::GoogleEarth::Document::NetworkLink - Geo::GoogleEarth::Document::NetworkLink


Geo-GoogleEarth-Document documentation Contained in the Geo-GoogleEarth-Document distribution.

Index


Code Index:

NAME

Top

Geo::GoogleEarth::Document::NetworkLink - Geo::GoogleEarth::Document::NetworkLink

SYNOPSIS

Top

  use Geo::GoogleEarth::Document;
  my $document=Geo::GoogleEarth::Document->new();
  $document->NetworkLink(url=>"./anotherdocument.cgi");

DESCRIPTION

Top

Geo::GoogleEarth::Document::NetworkLink is a Geo::GoogleEarth::Document::Base with a few other methods.

USAGE

Top

  my $networklink=$document->NetworkLink(name=>"My NetworkLink",
                                         url=>"./anotherdocument.cgi");

type

Returns the object type.

  my $type=$networklink->type;

structure

Returns a hash reference for feeding directly into XML::Simple.

  my $structure=$networklink->structure;

url

Sets or returns the Uniform Resource Locator (URL) for the NetworkLink

  my $url=$networklink->url;
  $networklink->url("./newdoc.cgi");

BUGS

Top

SUPPORT

Top

Try geo-perl email list.

AUTHOR

Top

    Michael R. Davis (mrdvt92)
    CPAN ID: MRDVT

COPYRIGHT

Top

SEE ALSO

Top

Geo::GoogleEarth::Document creates a GoogleEarth KML Document.


Geo-GoogleEarth-Document documentation Contained in the Geo-GoogleEarth-Document distribution.
package Geo::GoogleEarth::Document::NetworkLink;
use strict;
use base qw{Geo::GoogleEarth::Document::Base};

BEGIN {
    use vars qw($VERSION);
    $VERSION     = '0.07';
}

sub type {
  my $self=shift();
  return "NetworkLink";
}

sub structure {
  my $self=shift();
  my $structure={name=>[$self->name]};
  $structure->{'url'}={href=>[$self->url]};
  my %skip=map {$_=>1} qw{name url}; 
  foreach my $key (keys %$self) {
    next if exists $skip{$key};
    $structure->{$key}=[$self->{$key}];
  }
  return $structure;
}

sub url {
  my $self=shift();
  if (@_) {
    $self->{'url'}=shift();
  }
  return defined($self->{'url'}) ? $self->{'url'} : 'http://localhost/';
}

1;