Group
Extension

Matches 4

Geo-Google ( A/AL/ALLENDAY/Geo-Google-0.05.tar.gz, ALLENDAY, 2007; MetaCPAN )
Geo-Google/lib/Geo/Google.pm ( view source; MetaCPAN )
strStansDonutsXML = $stans->toXML();
 
  # Export a location as JSON data to use with Google Maps
  my $strRoscoesJSON = $roscoes->toJSON();

=head1 DESCRIPTION

Geo::Google provides access to the map
mentation.

=item JSON exporting is not exactly identical to the original Google 
JSON response.  Some of the Google Maps-specific data is discarded 
during parsing, and the perl JSON module does not 
allow for bare keys 
while exporting to a JSON string.  It should still be functionally 
interchangeable with a Google JSON reponse.

=back

=head1 SEE ALSO

  http://maps.google.com
  http://www.goog
Geo-Google ( A/AL/ALLENDAY/Geo-Google-0.05.tar.gz, ALLENDAY, 2007; MetaCPAN )
Geo-Google/lib/Geo/Google/Location.pm ( view source; MetaCPAN )
package Geo::Google::Location;
use strict;
use warnings;
use Data::Dumper;
use URI::Escape;
use JSON;
use Geo::Google;
our $VERSION = '0.04-rc3';

use constant FMT => <<_FMT_;
<location infoStyle="%s"
toJSON {
	my $self = shift;
	my $json = new JSON (barekey => 1);

	# Construct the shell of a new perl data structure that we
	# can pass off to the JSON module for rendering to a string
	my $preJSON 
= Geo::Google::_JSONrenderSkeleton();

	# Fill the perl data structure with information from this
	# location
	$preJSON->{"form"}->{"l"}->{"near"} = $self->title();
	$preJSON->{"form"}->{"q"}->{"q"} =
Geo-Google ( A/AL/ALLENDAY/Geo-Google-0.05.tar.gz, ALLENDAY, 2007; MetaCPAN )
Geo-Google/lib/Geo/Google/Segment.pm ( view source; MetaCPAN )
  Individual segments are used in Google Maps as 
HTML with JavaScript inside a JSON response from the server.  
The JSON structure used by Google Maps doesn't actually contain 
segments.  They are im
Geo-Google ( A/AL/ALLENDAY/Geo-Google-0.05.tar.gz, ALLENDAY, 2007; MetaCPAN )
Geo-Google/lib/Geo/Google/Path.pm ( view source; MetaCPAN )
toJSON {
	my $self = shift;
	my $json = new JSON (barekey => 1);

	# Construct the shell of a new perl data structure that we
	# can pass off to the JSON module for rendering to a string
	my $preJSON 
= Geo::Google::_JSONrenderSkeleton();

	# Fill the perl data structure with information from this
	# location
	my @locations = $self->locations();
	$preJSON->{"form"}->{"l"}->{"near"} = 
				$location
eJSON->{"form"}->{"q"}->{"q"} = "from:" . 
					$locations[0]->title();
	for (my $i=1; $i<=$#locations; $i++) {
		$preJSON->{"form"}->{"q"}->{"q"} .= " to:" .
			$locations[$i]->title();
	}
	$preJSON-

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.