line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::GoogleEarth::Pluggable::Plugin::Others; |
2
|
1
|
|
|
1
|
|
1294
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
233
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION='0.09'; |
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
|
|
|
|
|
|
|
sub MultiPoint { |
38
|
0
|
|
|
0
|
1
|
|
my $self=shift; #$self isa Geo::GoogleEarth::Pluggable::Folder object |
39
|
0
|
|
|
|
|
|
my %data=@_; |
40
|
0
|
|
0
|
|
|
|
$data{"name"}||="Point"; |
41
|
0
|
0
|
|
|
|
|
$data{"coordinates"}=[] unless ref($data{"coordinates"}) eq "ARRAY"; |
42
|
0
|
|
|
|
|
|
my @point=(); |
43
|
0
|
|
|
|
|
|
my $index=0; |
44
|
0
|
|
|
|
|
|
foreach my $pt (@{$data{"coordinates"}}) { |
|
0
|
|
|
|
|
|
|
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
|
0
|
|
|
|
|
return wantarray ? @point : \@point; |
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 |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
1; |