Geo::G...:Style(3pm)

πŸ“¦
version 0.17 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute

✨ Geo::GoogleEarth::Pluggable::Plugin::Style(3pm) ✨

okay bestie, gather round πŸ’– this is the manual page for Geo::GoogleEarth::Pluggable::Plugin::Style(3pm) (it shows up in the header all squished as Geo::G...:Style(3pm), but you know her full name now). She's a plugin package, and she's the one handing out all the Style methods for Geo::GoogleEarth::Pluggable. It's giving "user contributed perl documentation" and honestly? iconic.


🌸 NAME 🌸

Geo::GoogleEarth::Pluggable::Plugin::Style β€” the Style Plugin Methods for Geo::GoogleEarth::Pluggable. no cap, that's literally her whole job πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new;     #ISA L<Geo::GoogleEarth::Pluggable>
my $style=$document->IconStyle(color=>{red=>255}); #ISA L<Geo::GoogleEarth::Pluggable::Style>
my $point=$document->Point(style=>$style);         #ISA L<Geo::GoogleEarth::Pluggable::Contrib::Point>
print $document->render;

see how easy? build a document, grab a style, slap it on a point, render. main character workflow fr fr πŸ‘‘


πŸ’œ METHODS πŸ’œ

okay so here's the tea: the methods in this package get AUTOLOADed into the Geo::GoogleEarth::Pluggable::Folder namespace at runtime. yes, at runtime. she's mysterious like that ✨

πŸŽ€ Style πŸŽ€

Constructs a brand new Style object and appends it to the document object. Returns the Style object reference. two ways to call her, and both are valid bestie:

my $style=$folder->Style(
                         id => $id, #default is good
                         IconStyle  => {},
                         LineStyle  => {},
                         PolyStyle  => {},
                         LabelStyle => {},
                         ListStyle  => {},
                        );
note the id there β€” the comment says #default is good, so you can just... let her do her thing 🫢

or, if you already have styles lying around and you just want to lift parts out of them:

my $style=$folder->Style(
                         IconStyle  => $style1, #extracts IconStyle from $style1
                         LineStyle  => $style2, #extracts LineStyle from $style2
                         PolyStyle  => $style3, #extracts PolyStyle from $style3
                        );

she extracts what she needs. very efficient. very demure. πŸ’…

🌈 StyleMap 🌈

Constructs a new StyleMap object and appends it to the document object. Returns the StyleMap object reference. she takes a normal and a highlight, like moods, but for styles:

my $stylemap=$document->StyleMap(
                          normal    => $style1,
                          highlight => $style2,
                        );

⭐ IconStyle ⭐

my $style=$folder->IconStyle(
                             color => $color,
                             scale => $scale,
                             href  => $url,
                            );

🧚 LineStyle 🧚

my $color={red=>255, green=>255, blue=>255, alpha=>255};
my $style=$folder->LineStyle(color=>$color);

πŸ“ PolyStyle πŸ“

my $color={red=>255, green=>255, blue=>255, alpha=>255};
my $style=$folder->PolyStyle(color=>$color);

πŸ’– LabelStyle πŸ’–

my $style=$folder->LabelStyle(
                              color => $color,
                              scale => $scale,
                             );

🌸 ListStyle 🌸

my $style=$folder->ListStyle(
                             href => $url,
                            );

πŸ™ˆ TODO πŸ™ˆ

Need to determine what methods should be in the Folder package and what should be on the Plugin/Style package and why.

(yeah. she said it. open question. we love an honest queen 😭)


πŸ’€ BUGS πŸ’€

Please log on RT and send to the geo-perl email list.


😭 LIMITATIONS 😭

listen. this is important. this will construct 100 identical style objects and that's not the vibe:
foreach (1 .. 100) {
  $document->Point(style=>$document->IconStyle(color=>{red=>255}));
}

Do this instead:

my $style=$document->IconStyle(color=>{red=>255});
foreach (1 .. 100) {
  $document->Point(style=>$style);
}

build the style once, reuse it, save your poor little machine the drama. periodt. πŸ”₯


🫢 SUPPORT 🫢

Try geo-perl email list.


πŸ‘‘ AUTHOR πŸ‘‘

Michael R. Davis (mrdvt92)
CPAN ID: MRDVT

This program is free software licensed under the...

The BSD License

The full text of the license can be found in the LICENSE file included with this module.


πŸ”₯ SEE ALSO πŸ”₯

  • Geo::GoogleEarth::Pluggable creates a GoogleEarth Document.

and that's the whole page bestie, you ate it πŸ’… this was Geo::G...:Style(3pm) from perl v5.32.1, dated 2021-11-28 β€” go forth and style responsibly πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from