Geo-Google
view release on metacpan or search on metacpan
location()
Usage : my $loc = $geo->location( address => $address );
Function : creates a new Geo::Google::Location object, given a
street address.
Returns : a Geo::Google::Location object, or undef on error
Args : an anonymous hash:
key required? value
------- --------- -----
address yes address to search for
id no unique identifier for the
location. useful if producing
XML.
icon no image to be used to represent
point in Google Maps web
application
infoStyle no unknown. css-related, perhaps?
near()
Usage : my @near = $geo->near( $loc, $phrase );
Function : searches Google Local for records matching the
phrase provided, with the constraint that they are
physically nearby the Geo::Google::Location object
provided. search phrase is passed verbatim to Google.
Returns : a list of Geo::Google::Location objects
Args : 1. A Geo::Google::Location object
2. A search phrase.
path()
Usage : my $path = $geo->path( $from, $OptionalWaypoints, $to );
Function : get driving directions between two points
Returns : a Geo::Google::Path object
Args : 1. a Geo::Google::Location object (from)
2. optional Geo::Google::Location waypoints
3. a Geo::Google::Location object (final destination)
INTERNAL FUNCTIONS AND METHODS
_decode()
Usage : my @points = _decode($encoded_points);
Function : decode a polyline into its composite lat/lon pairs
Returns : an array
Args : a string
_encode()
Usage : my $encoded_points = _encode(@points);
Function : encode lat/lon pairs into a polyline string
Returns : a string
Args : an array
_html_unescape()
Usage : my $clean = _html_unescape($dirty);
Function : does HTML unescape of & > < " special characters
Returns : an unescaped HTML string
Args : an HTML string.
_obj2location()
Usage : my $loc = _obj2location($obj);
Function : converts a perl object generated from a Google Maps
JSON response to a Geo::Google::Location object
Returns : a Geo::Google::Location object
Args : a member of the $obj->{overlays}->{markers}->[]
anonymous array that you get when you read google's
JSON response and parse it using JSON::jsonToObj()
_JSONrenderSkeleton()
Usage : my $perlvariable = _JSONrenderSkeleton();
Function : creates the skeleton of a perl data structure used by
the Geo::Google::Location and Geo::Google::Path for
rendering to Google Maps JSON format
Returns : a mildly complex multi-level anonymous hash/array
perl data structure that corresponds to the Google
Maps JSON data structure
Args : none
( run in 2.907 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )