Geo::Google::StaticMaps::V2::Markers - Generate Images from Google Static Maps V2 API
use Geo::Google::StaticMaps::V2; my $map=Geo::Google::StaticMaps::V2->new; my $marker=$map->marker(location=>[$lat=>$lon]); #isa Geo::Google::StaticMaps::V2::Markers
The packages generates images from the Google Static Maps V2 API which can be saved locally for use in accordance with your license with Google.
size: (optional) specifies the size of marker from the set {tiny, mid, small}. If no size parameter is set, the marker will appear in its default (normal) size.
Set and returns a formatted marker color code.
color: (optional) specifies a 24-bit color (example: color=0xFFFFCC) or a predefined color from the set {black, brown, green, purple, yellow, blue, gray, orange, red, white}.
my $color=$marker->color("blue"); my $color=$marker->color("0xFFFFCC"); my $color=$marker->color({r=>255,g=>0,b=>0}); #maps to red my $color=$marker->color([255,0,0]); #maps to red
label: (optional) specifies a single uppercase alphanumeric character from the set {A-Z, 0-9}. (The requirement for uppercase characters is new to this version of the API.) Note that default and mid sized markers are the only markers capable of displaying an alphanumeric-character parameter. tiny and small markers are not capable of displaying an alphanumeric-character.
icon specifies a URL to use as the marker's custom icon. Images may be in PNG, JPEG or GIF formats, though PNG is recommended.
The icon parameter must be specified using a URL (which should be URL-encoded). You may use any valid URL of your choosing, or a URL-shortening service such as http://goo.gl. Most URL-shortening services have the advantage of automatically encoding URLs. Icons are limited to sizes of 4096 pixels (64x64 for square images), and the Static Maps service allows up to five unique custom icons per request. Note that each of these unique icons may be used multiple times within the static map.
Custom icons that have a shadow:true descriptor (the default) will have their "anchor point" set as the bottom center of the provided icon image, from which the shadow is cast. Icons without a shadow (setting a shadow:false descriptor) are instead assumed to be icons centered on their specified locations, so their anchor points are set as the center of the image.
Note: As of March 2014, the API does not support HTTPS only HTTP icons
shadow (default true) indicates that the Static Maps service should construct an appropriate shadow for the image. This shadow is based on the image's visible region and its opacity/transparency.
$marker->addLocation("Clifton, VA"); $marker->addLocation({lat=>38.7802903, lon=>-77.3867659}); $marker->addLocation([38.7802903, -77.3867659]);
Please log on RT and send an email to the author.
DavisNetworks.com supports all Perl applications including this package.
Michael R. Davis CPAN ID: MRDVT Satellite Tracking of People, LLC mdavis@stopllc.com http://www.stopllc.com/
This program is free software licensed under the...
The General Public License (GPL) Version 2, June 1991
The full text of the license can be found in the LICENSE file included with this module.
Geo::Google::StaticMaps::V2
To install Geo::Google::StaticMaps::V2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Google::StaticMaps::V2
CPAN shell
perl -MCPAN -e shell install Geo::Google::StaticMaps::V2
For more information on module installation, please visit the detailed CPAN module installation guide.