line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::GoogleEarth::Pluggable::LookAt; |
2
|
1
|
|
|
1
|
|
2071
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
4
|
use base qw{Geo::GoogleEarth::Pluggable::Constructor}; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
104
|
|
5
|
1
|
|
|
1
|
|
410
|
use XML::LibXML::LazyBuilder qw{E}; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION="0.14"; |
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
|
|
|
|
|
|
|
sub type {"LookAt"}; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 latitude |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub latitude { |
71
|
|
|
|
|
|
|
my $self=shift; |
72
|
|
|
|
|
|
|
$self->{"latitude"}=shift if @_; |
73
|
|
|
|
|
|
|
return $self->{"latitude"}; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 longitude |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub longitude { |
81
|
|
|
|
|
|
|
my $self=shift; |
82
|
|
|
|
|
|
|
$self->{"longitude"}=shift if @_; |
83
|
|
|
|
|
|
|
return $self->{"longitude"}; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 range |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=cut |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub range { |
91
|
|
|
|
|
|
|
my $self=shift; |
92
|
|
|
|
|
|
|
$self->{"range"}=shift if @_; |
93
|
|
|
|
|
|
|
return $self->{"range"}; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 tilt |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
sub tilt { |
101
|
|
|
|
|
|
|
my $self=shift; |
102
|
|
|
|
|
|
|
$self->{"tilt"}=shift if @_; |
103
|
|
|
|
|
|
|
return $self->{"tilt"}; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 heading |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=cut |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
sub heading { |
111
|
|
|
|
|
|
|
my $self=shift; |
112
|
|
|
|
|
|
|
$self->{"heading"}=shift if @_; |
113
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
my $self=shift; |
124
|
|
|
|
|
|
|
my @elements=(); |
125
|
|
|
|
|
|
|
my %skip=map {$_=>1} qw{document}; |
126
|
|
|
|
|
|
|
foreach my $key (sort keys %$self) { |
127
|
|
|
|
|
|
|
next if exists $skip{$key}; |
128
|
|
|
|
|
|
|
push @elements, E($key => {}, $self->{$key}); |
129
|
|
|
|
|
|
|
} |
130
|
|
|
|
|
|
|
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; |