line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::GoogleEarth::Pluggable::LookAt; |
2
|
7
|
|
|
7
|
|
40
|
use strict; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
181
|
|
3
|
7
|
|
|
7
|
|
32
|
use warnings; |
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
193
|
|
4
|
7
|
|
|
7
|
|
45
|
use base qw{Geo::GoogleEarth::Pluggable::Constructor}; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
625
|
|
5
|
7
|
|
|
7
|
|
44
|
use XML::LibXML::LazyBuilder qw{E}; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
2794
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION='0.17'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Geo::GoogleEarth::Pluggable::LookAt - Geo::GoogleEarth::Pluggable LookAt package |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $lookat=$document->LookAt( |
16
|
|
|
|
|
|
|
latitude => 38.1741527, |
17
|
|
|
|
|
|
|
longitude => -96.7839388, |
18
|
|
|
|
|
|
|
range => 3525808, |
19
|
|
|
|
|
|
|
heading => 0, |
20
|
|
|
|
|
|
|
tilt => 0, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Assign LookAt during construction |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $folder=$document->Folder(name=>"MyLook", lookat=>$lookat); |
26
|
|
|
|
|
|
|
my $point=$folder->Point(lat=>$lat, lon=>$lon, lookat=>$lookat); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Assign LookAt afer construction |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$document->lookat($lookat); |
31
|
|
|
|
|
|
|
$folder->lookat($lookat); |
32
|
|
|
|
|
|
|
$point->lookat($lookat); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Do it all at one time |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
my $point=$folder->Point(lat => $lat, |
37
|
|
|
|
|
|
|
lon => $lon, |
38
|
|
|
|
|
|
|
lookat => $document->LookAt(%data)); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Provides a way to configure a LookAt for all Folders and Placemarks. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 USAGE |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
All Folder objects have a LookAt constructor. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my $object=$document->LookAt(%data); |
51
|
|
|
|
|
|
|
my $object=$folder->LookAt(%data); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 new |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 type |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Returns the object type. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my $type=$lookat->type; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
0
|
1
|
|
sub type {'LookAt'}; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 latitude |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub latitude { |
71
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
72
|
0
|
0
|
|
|
|
|
$self->{'latitude'}=shift if @_; |
73
|
0
|
|
|
|
|
|
return $self->{'latitude'}; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 longitude |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub longitude { |
81
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
82
|
0
|
0
|
|
|
|
|
$self->{'longitude'}=shift if @_; |
83
|
0
|
|
|
|
|
|
return $self->{'longitude'}; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 range |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=cut |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub range { |
91
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
92
|
0
|
0
|
|
|
|
|
$self->{'range'}=shift if @_; |
93
|
0
|
|
|
|
|
|
return $self->{'range'}; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 tilt |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
sub tilt { |
101
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
102
|
0
|
0
|
|
|
|
|
$self->{'tilt'}=shift if @_; |
103
|
0
|
|
|
|
|
|
return $self->{'tilt'}; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 heading |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=cut |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
sub heading { |
111
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
112
|
0
|
0
|
|
|
|
|
$self->{'heading'}=shift if @_; |
113
|
0
|
|
|
|
|
|
return $self->{'heading'}; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head2 node |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Returns the L element for the LookAt object. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
sub node { |
123
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
124
|
0
|
|
|
|
|
|
my @elements=(); |
125
|
0
|
|
|
|
|
|
my %skip=map {$_=>1} qw{document}; |
|
0
|
|
|
|
|
|
|
126
|
0
|
|
|
|
|
|
foreach my $key (sort keys %$self) { |
127
|
0
|
0
|
|
|
|
|
next if exists $skip{$key}; |
128
|
0
|
|
|
|
|
|
push @elements, E($key => {}, $self->{$key}); |
129
|
|
|
|
|
|
|
} |
130
|
0
|
|
|
|
|
|
return E(LookAt => {}, @elements); |
131
|
|
|
|
|
|
|
} |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 BUGS |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Please log on RT and send to the geo-perl email list. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head1 SUPPORT |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
DavisNetworks.com supports all Perl applications including this package. |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 AUTHOR |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Michael R. Davis (mrdvt92) |
144
|
|
|
|
|
|
|
CPAN ID: MRDVT |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head1 COPYRIGHT |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
This program is free software licensed under the... |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
The BSD License |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
The full text of the license can be found in the LICENSE file included with this module. |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head1 SEE ALSO |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
L creates a GoogleEarth Document. |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=cut |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
1; |