| 1 | package Geo::GoogleEarth::Pluggable::Plugin::Others; | ||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | |||||||||||||
| 5 | 1 | our $VERSION='0.17'; | |||||||||||
| 6 | |||||||||||||
| 7 | =head1 NAME | ||||||||||||
| 8 | |||||||||||||
| 9 | Geo::GoogleEarth::Pluggable::Plugin::Others - Geo::GoogleEarth::Pluggable Others Plugin Methods | ||||||||||||
| 10 | |||||||||||||
| 11 | =head1 SYNOPSIS | ||||||||||||
| 12 | |||||||||||||
| 13 | use Geo::GoogleEarth::Pluggable; | ||||||||||||
| 14 | my $document=Geo::GoogleEarth::Pluggable->new; | ||||||||||||
| 15 | my @point=$document->MultiPoint(%data); #() | ||||||||||||
| 16 | my $point=$document->MultiPoint(%data); #[] | ||||||||||||
| 17 | |||||||||||||
| 18 | =head1 METHODS | ||||||||||||
| 19 | |||||||||||||
| 20 | Methods in this package are AUTOLOADed into the Geo::GoogleEarth::Pluggable::Folder namespace at runtime. | ||||||||||||
| 21 | |||||||||||||
| 22 | =head2 MultiPoint | ||||||||||||
| 23 | |||||||||||||
| 24 | my @point=$document->MultiPoint( | ||||||||||||
| 25 | name=>"Point", #SCALAR sprintf("%s (%s)", $name, $index) | ||||||||||||
| 26 | coordinates=>[{}, {}, ...], #CODE ($index, $point) | ||||||||||||
| 27 | #TODO#name=>["pt1", "pt2", ...], #ARRAY | ||||||||||||
| 28 | #TODO#name=>sub{sprintf("Point %s is a %s", shift, ref(shift))}, | ||||||||||||
| 29 | ); | ||||||||||||
| 30 | |||||||||||||
| 31 | Note: Currently coordinates must be {lat=>$lat, lon=>$lon, alt=>$alt} | ||||||||||||
| 32 | |||||||||||||
| 33 | TODO: Coordinates can be any format supported by Placemark->coordinates | ||||||||||||
| 34 | |||||||||||||
| 35 | =cut | ||||||||||||
| 36 | |||||||||||||
| 37 | 0 | ▶ | sub MultiPoint { | ||||||||||
|
Subroutine
MultiPoint: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||
| 38 | 0 | my $self=shift; #$self isa Geo::GoogleEarth::Pluggable::Folder object | |||||||||||
| 39 | 0 | my %data=@_; | |||||||||||
| 40 | 0 | ▶ | $data{"name"}||="Point"; | ||||||||||
|
Condition0%0/2
$data{"name"} ||= "Point"
MC/DC0%0/1
$data{"name"} ||= "Point"
$data{"name"}
Truth table0%0/2
A
A= $data{"name"}
| |||||||||||||
| 41 | 0 | ▶ | $data{"coordinates"}=[] unless ref($data{"coordinates"}) eq "ARRAY"; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 42 | 0 | my @point=(); | |||||||||||
| 43 | 0 | my $index=0; | |||||||||||
| 44 | 0 | foreach my $pt (@{$data{"coordinates"}}) { | |||||||||||
| 45 | 0 | my $name=sprintf("%s (%s)", $data{"name"}, $index++); | |||||||||||
| 46 | 0 | push @point, $self->Point( | |||||||||||
| 47 | name=>$name, | ||||||||||||
| 48 | %$pt | ||||||||||||
| 49 | ); | ||||||||||||
| 50 | } | ||||||||||||
| 51 | 0 | ▶ | return wantarray ? @point : \@point; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 52 | } | ||||||||||||
| 53 | |||||||||||||
| 54 | =head1 TODO | ||||||||||||
| 55 | |||||||||||||
| 56 | =head1 BUGS | ||||||||||||
| 57 | |||||||||||||
| 58 | Please log on RT and send to the geo-perl email list. | ||||||||||||
| 59 | |||||||||||||
| 60 | =head1 SUPPORT | ||||||||||||
| 61 | |||||||||||||
| 62 | DavisNetworks.com supports all Perl applications including this package. | ||||||||||||
| 63 | |||||||||||||
| 64 | =head1 AUTHOR | ||||||||||||
| 65 | |||||||||||||
| 66 | Michael R. Davis (mrdvt92) | ||||||||||||
| 67 | CPAN ID: MRDVT | ||||||||||||
| 68 | |||||||||||||
| 69 | =head1 COPYRIGHT | ||||||||||||
| 70 | |||||||||||||
| 71 | This program is free software licensed under the... | ||||||||||||
| 72 | |||||||||||||
| 73 | The BSD License | ||||||||||||
| 74 | |||||||||||||
| 75 | The full text of the license can be found in the LICENSE file included with this module. | ||||||||||||
| 76 | |||||||||||||
| 77 | =head1 SEE ALSO | ||||||||||||
| 78 | |||||||||||||
| 79 | L<Geo::GoogleEarth::Pluggable> | ||||||||||||
| 80 | |||||||||||||
| 81 | =cut | ||||||||||||
| 82 | |||||||||||||
| 83 | 1 | 1; | |||||||||||