The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Geo::GoogleEarth::Document::Placemark - Geo::GoogleEarth::Document::Placemark

SYNOPSIS

  use Geo::GoogleEarth::Document;
  my $document=Geo::GoogleEarth::Document->new();
  $document->Placemark();

DESCRIPTION

Geo::GoogleEarth::Document::Placemark is a Geo::GoogleEarth::Document::Base with a few other methods.

USAGE

  my $placemark=$document->Placemark(name=>"Placemark Name",
                                     lat=>$lat,
                                     lon=>$lon,
                                     alt=>$alt);

CONSTRUCTOR

new

  my $placemark=$document->Placemark(
              name       => "White House",
              lat        => 38.89769,       #signed decimal degrees WGS-84
              lon        => -77.036549,     #signed decimal degrees WGS-84
              alt        => 30,             #meters above ellipsoid WGS-84
            );

  my $placemark=$document->Placemark(
              name       => "White House",
              address    => "1600 Pennsylvania Ave NW, Washington, DC 20006",
            );

METHODS

type

Returns the object type.

  my $type=$placemark->type;

structure

Returns a hash reference for feeding directly into XML::Simple.

  my $structure=$placemark->structure;

address

Sets or returns address

  my $address=$placemark->address;

description

Set or returns the description. Google Earth uses this as the HTML description in the Placemark popup window.

snippet

Sets or returns the "snippet", which is the descriptive text shown in the places list. Optionally sets the maximum number of lines to show.

  my $snippet=$placemark->snippet($text);
  $placemark->snippet($text, {maxLines=>2});
  $placemark->snippet("", {maxLines=>0});        #popular setting

visibility

Sets or returns visibility

  my $visibility=$placemark->visibility;

lat

Sets or returns latitude. The format is signed decimal degrees WGS-84.

  my $lat=$placemark->lat;

lon

Sets or returns longitude. The format is signed decimal degrees WGS-84.

  my $lon=$placemark->lon;

alt

Sets or returns altitude. The units are meters above the ellipsoid WGS-84.

  my $alt=$placemark->alt;

Typically, Google Earth "snaps" Placemarks to the surface regardless of how the altitude is set.

BUGS

SUPPORT

Try geo-perl email list.

AUTHOR

    Michael R. Davis (mrdvt92)
    CPAN ID: MRDVT

COPYRIGHT

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::Document creates a GoogleEarth KML Document.