Geo::GoogleEarth::Pluggable::Plugin::Others - Geo::GoogleEarth::Pluggable Others Plugin Methods


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

Index


Code Index:

NAME

Top

Geo::GoogleEarth::Pluggable::Plugin::Others - Geo::GoogleEarth::Pluggable Others Plugin Methods

SYNOPSIS

Top

  use Geo::GoogleEarth::Pluggable;
  my $document=Geo::GoogleEarth::Pluggable->new;
  my @point=$document->MultiPoint(%data); #()
  my $point=$document->MultiPoint(%data); #[]

METHODS

Top

Methods in this package are AUTOLOADed into the Geo::GoogleEarth::Pluggable::Folder namespace at runtime.

MultiPoint

  my @point=$document->MultiPoint(
                         name=>"Point",              #SCALAR sprintf("%s (%s)", $name, $index)
                         coordinates=>[{}, {}, ...], #CODE ($index, $point)
                   #TODO#name=>["pt1", "pt2", ...],  #ARRAY
                   #TODO#name=>sub{sprintf("Point %s is a %s", shift, ref(shift))},
                              );

Note: Currently coordinates must be {lat=>$lat, lon=>$lon, alt=>$alt}

TODO: Coordinates can be any format supported by Placemark->coordinates

TODO

Top

BUGS

Top

Please log on RT and send to the geo-perl email list.

SUPPORT

Top

DavisNetworks.com supports all Perl applications including this package.

AUTHOR

Top

  Michael R. Davis (mrdvt92)
  CPAN ID: MRDVT

COPYRIGHT

Top

SEE ALSO

Top

Geo::GoogleEarth::Pluggable


Geo-GoogleEarth-Pluggable documentation Contained in the Geo-GoogleEarth-Pluggable distribution.
package Geo::GoogleEarth::Pluggable::Plugin::Others;
use strict;
use warnings;

our $VERSION='0.09';

sub MultiPoint {
  my $self=shift; #$self isa Geo::GoogleEarth::Pluggable::Folder object
  my %data=@_;
  $data{"name"}||="Point";
  $data{"coordinates"}=[] unless ref($data{"coordinates"}) eq "ARRAY";
  my @point=();
  my $index=0;
  foreach my $pt (@{$data{"coordinates"}}) {
    my $name=sprintf("%s (%s)", $data{"name"}, $index++);
    push @point, $self->Point(
                              name=>$name,
                              %$pt
                             ); 
  }
  return wantarray ? @point : \@point;
}

1;