line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geo::GoogleEarth::Pluggable::Plugin::Default; |
2
|
5
|
|
|
5
|
|
15339
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
139
|
|
3
|
5
|
|
|
5
|
|
26
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
113
|
|
4
|
5
|
|
|
5
|
|
1542
|
use Geo::GoogleEarth::Pluggable::Contrib::Point; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
54
|
|
5
|
5
|
|
|
5
|
|
1618
|
use Geo::GoogleEarth::Pluggable::Contrib::LineString; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
48
|
|
6
|
5
|
|
|
5
|
|
1519
|
use Geo::GoogleEarth::Pluggable::Contrib::LinearRing; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
45
|
|
7
|
5
|
|
|
5
|
|
1596
|
use Geo::GoogleEarth::Pluggable::Contrib::Polygon; |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
48
|
|
8
|
5
|
|
|
5
|
|
1595
|
use Geo::GoogleEarth::Pluggable::Contrib::MultiPolygon; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
44
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION='0.17'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Geo::GoogleEarth::Pluggable::Plugin::Default - Geo::GoogleEarth::Pluggable Default Plugin Methods |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 METHODS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Methods in this package are AUTOLOADed into the Geo::GoogleEarth::Pluggable::Folder namespace at runtime. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 CONVENTIONS |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Plugin Naming Convention: Geo::GoogleEarth::Pluggable::Plugin::CPANID (e.g. "MRDVT") |
23
|
|
|
|
|
|
|
Object Naming Convention: Geo::GoogleEarth::Pluggable::Contrib::"$method" (e.g. Point, CircleByCenterPoint) |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
You only need to have one plugin pointing to all of your contributed objects. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
The package should be named after the plugin not the objects since there is a many to one relationship. (e.g. Geo-GoogleEarth-Pluggable-Plugin-MRDVT) |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 Point |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Constructs a new Placemark Point object and appends it to the parent folder object. Returns the object reference if you need to make any setting changes after construction. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $point=$folder->Point(name=>"My Placemark", |
34
|
|
|
|
|
|
|
lat=>38.897607, |
35
|
|
|
|
|
|
|
lon=>-77.036554, |
36
|
|
|
|
|
|
|
alt=>0); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub Point { |
41
|
2
|
|
|
2
|
1
|
232
|
my $self=shift; #This will be a Geo::GoogleEarth::Pluggable::Folder object |
42
|
2
|
|
|
|
|
9
|
my $obj=Geo::GoogleEarth::Pluggable::Contrib::Point->new(document=>$self->document, @_); |
43
|
2
|
|
|
|
|
46
|
$self->data($obj); |
44
|
2
|
|
|
|
|
6
|
return $obj; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 Polygon |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
$folder->Polygon( |
50
|
|
|
|
|
|
|
name => "My Polygon", |
51
|
|
|
|
|
|
|
coordinates => [ |
52
|
|
|
|
|
|
|
[ #outerBoundaryIs |
53
|
|
|
|
|
|
|
[ -95.74356, 29.61974 ], |
54
|
|
|
|
|
|
|
[ -95.74868, 29.62188 ], |
55
|
|
|
|
|
|
|
[ -95.74857, 29.62210 ], |
56
|
|
|
|
|
|
|
[ -95.74256, 29.62266 ], |
57
|
|
|
|
|
|
|
[ -95.74356, 29.61974 ], |
58
|
|
|
|
|
|
|
], |
59
|
|
|
|
|
|
|
\@innerBoundaryIs1, |
60
|
|
|
|
|
|
|
\@innerBoundaryIs2, |
61
|
|
|
|
|
|
|
\@innerBoundaryIs3, |
62
|
|
|
|
|
|
|
], |
63
|
|
|
|
|
|
|
style => $style, |
64
|
|
|
|
|
|
|
open => 1, |
65
|
|
|
|
|
|
|
description => $html, |
66
|
|
|
|
|
|
|
), |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub Polygon { |
71
|
1
|
|
|
1
|
1
|
151
|
my $self = shift; #This will be a Geo::GoogleEarth::Pluggable::Folder object |
72
|
1
|
|
|
|
|
4
|
my $obj = Geo::GoogleEarth::Pluggable::Contrib::Polygon->new(document=>$self->document, @_); |
73
|
1
|
|
|
|
|
22
|
$self->data($obj); |
74
|
1
|
|
|
|
|
2
|
return $obj; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 MultiPolygon |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
$folder->MultiPolygon( |
80
|
|
|
|
|
|
|
name => "My MultiPolygon", |
81
|
|
|
|
|
|
|
coordinates => [ #MultiGeometry |
82
|
|
|
|
|
|
|
[ #Polygon1 |
83
|
|
|
|
|
|
|
[ |
84
|
|
|
|
|
|
|
[ -95.45662, 29.77814 ], |
85
|
|
|
|
|
|
|
[ -95.45668, 29.77809 ], |
86
|
|
|
|
|
|
|
[ -95.45675, 29.77814 ], |
87
|
|
|
|
|
|
|
[ -95.45669, 29.77820 ], |
88
|
|
|
|
|
|
|
[ -95.45662, 29.77814 ], |
89
|
|
|
|
|
|
|
], |
90
|
|
|
|
|
|
|
\@innerBoundaryIs1, |
91
|
|
|
|
|
|
|
], |
92
|
|
|
|
|
|
|
[ #Polygon2 |
93
|
|
|
|
|
|
|
[ |
94
|
|
|
|
|
|
|
[ -95.45677, 29.77785 ], |
95
|
|
|
|
|
|
|
[ -95.45683, 29.77780 ], |
96
|
|
|
|
|
|
|
[ -95.45689, 29.77785 ], |
97
|
|
|
|
|
|
|
[ -95.45683, 29.77791 ], |
98
|
|
|
|
|
|
|
[ -95.45677, 29.77785 ], |
99
|
|
|
|
|
|
|
], |
100
|
|
|
|
|
|
|
], |
101
|
|
|
|
|
|
|
], |
102
|
|
|
|
|
|
|
); |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=cut |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub MultiPolygon { |
107
|
1
|
|
|
1
|
1
|
130
|
my $self = shift; #This will be a Geo::GoogleEarth::Pluggable::Folder object |
108
|
1
|
|
|
|
|
6
|
my $obj = Geo::GoogleEarth::Pluggable::Contrib::MultiPolygon->new(document=>$self->document, @_); |
109
|
1
|
|
|
|
|
27
|
$self->data($obj); |
110
|
1
|
|
|
|
|
3
|
return $obj; |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head2 LineString |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
$folder->LineString(name=>"My Placemark", |
116
|
|
|
|
|
|
|
coordinates=>[ |
117
|
|
|
|
|
|
|
[lat,lon,alt], |
118
|
|
|
|
|
|
|
{lat=>$lat,lon=>$lon,alt=>$alt}, |
119
|
|
|
|
|
|
|
]); |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub LineString { |
124
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
125
|
0
|
|
|
|
|
|
my $obj=Geo::GoogleEarth::Pluggable::Contrib::LineString->new(document=>$self->document, @_); |
126
|
0
|
|
|
|
|
|
$self->data($obj); |
127
|
0
|
|
|
|
|
|
return $obj; |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head2 LinearRing |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
$folder->LinearRing(name=>"My Placemark", |
133
|
|
|
|
|
|
|
coordinates=>[ |
134
|
|
|
|
|
|
|
[lat,lon,alt], |
135
|
|
|
|
|
|
|
{lat=>$lat,lon=>$lon,alt=>$alt}, |
136
|
|
|
|
|
|
|
]); |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=cut |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
sub LinearRing { |
141
|
0
|
|
|
0
|
1
|
|
my $self=shift; |
142
|
0
|
|
|
|
|
|
my $obj=Geo::GoogleEarth::Pluggable::Contrib::LinearRing->new(document=>$self->document, @_); |
143
|
0
|
|
|
|
|
|
$self->data($obj); |
144
|
0
|
|
|
|
|
|
return $obj; |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 TODO |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Need to determine what methods should be in the Folder package and what should be on the Plugin/Default package and why. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head1 BUGS |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
Please log on RT and send to the geo-perl email list. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head1 SUPPORT |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
DavisNetworks.com supports all Perl applications including this package. |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head1 AUTHOR |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
Michael R. Davis (mrdvt92) |
162
|
|
|
|
|
|
|
CPAN ID: MRDVT |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head1 COPYRIGHT |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
This program is free software licensed under the... |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
The BSD License |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
The full text of the license can be found in the LICENSE file included with this module. |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=head1 SEE ALSO |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
L, L, L |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=cut |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
1; |