Skip Menu |

This queue is for tickets about the Geo-Coder-Bing CPAN distribution.

Report information
The Basics
Id: 52769
Status: resolved
Priority: 0/
Queue: Geo-Coder-Bing

People
Owner: Nobody in particular
Requestors: pdxrlk [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Geo::Coder::Bing stopped working?
Date: Mon, 14 Dec 2009 20:22:14 -0800
To: bug-Geo-Coder-Bing [...] rt.cpan.org
From: Bob Kitzberger <pdxrlk [...] gmail.com>
Hi - I'm using v0.5 and it seems to have stopped working within the past few weeks. My code is extremely simple, see below. The geocoder returns a null... or is it just me? Thanks. I'm happy to try to debug. - Bob #!/usr/bin/perl -w use strict; use warnings; use Data::Dumper; use Geo::Coder::Bing; use feature "say"; my $location = join(' ', @ARGV) || die "Usage: $0 \$location_string"; my $geocoder = Geo::Coder::Bing->new; my $result = $geocoder->geocode(location => $location); local $Data::Dumper::Indent = 1; print Dumper($result);
Subject: Re: [rt.cpan.org #52769] AutoReply: Geo::Coder::Bing stopped working?
Date: Mon, 14 Dec 2009 21:12:55 -0800
To: bug-Geo-Coder-Bing [...] rt.cpan.org
From: Bob Kitzberger <pdxrlk [...] gmail.com>
Hi - I did some debugging and it looks like Bing is returning an illegal JSON response string. See below. If I add some perl code to remove the ".d" from the end of the JSON response prior to calling from_json, things seem to work. $VAR1 = '{"d":{"__type":"Microsoft.VirtualEarth.Engines.Core.Geocoding.GeocodingResponse","Results":[{"Name":"44111, OH","Type":132,"BestLocation":{"Precision":0,"Coordinates":{"Latitude":41.461782082915306,"Longitude":-81.788370832800865}},"Locations":[{"Precision":0,"Coordinates":{"Latitude":41.461782082915306,"Longitude":-81.788370832800865}}],"BestView":{"NorthEastCorner":{"Latitude":41.494351476430893,"Longitude":-81.732288524508476},"SouthWestCorner":{"Latitude":41.425825729966164,"Longitude":-81.853183731436729},"Type":0,"Center":{"Latitude":41.46009765414118,"Longitude":-81.7927361279726}},"Shape":null,"Address":{"AddressLine":"","Locality":"","PostalTown":"","District":"","AdminDistrict":"Ohio","PostalCode":"44111","CountryRegion":"United States","FormattedAddress":"44111, OH"},"CountryRegion":244,"MatchConfidence":0,"MatchCode":1},{"Name":"44111, Spain","Type":132,"BestLocation":{"Precision":0,"Coordinates":{"Latitude":40.435658767819405,"Longitude":-1.5249820053577423}},"Locations":[{"Precision":0,"Coordinates":{"Latitude":40.435658767819405,"Longitude":-1.5249820053577423}}],"BestView":{"NorthEastCorner":{"Latitude":40.501547232270241,"Longitude":-1.4213890582323074},"SouthWestCorner":{"Latitude":40.371515080332756,"Longitude":-1.6472672671079636},"Type":0,"Center":{"Latitude":40.436562591324275,"Longitude":-1.5343281626701355}},"Shape":null,"Address":{"AddressLine":"","Locality":"","PostalTown":"","District":"","AdminDistrict":"","PostalCode":"44111","CountryRegion":"Spain","FormattedAddress":"44111, Spain"},"CountryRegion":217,"MatchConfidence":1,"MatchCode":1}],"ParsedAddress":{"AddressLine":"","Locality":"","PostalTown":"","District":"","AdminDistrict":"","PostalCode":"44111","CountryRegion":"","FormattedAddress":"44111"},"ParsedKeyword":"","ParsedSeparator":"","VendorIds":null,"ResponseSummary":{"Copyright":"Copyright © 2009 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","StatusCode":0,"AuthResultCode":0,"ErrorMessage":null,"TraceId":"b7ba3a38-1734-4f4d-b730-07a8165643b6|BY2PLAT012"}}}.d'; garbage after JSON object, at character offset 2214 (before "d") at /usr/local/share/perl/5.10.0/Geo/Coder/Bing.pm line 94
fixed in 0.06. thanks for reporting.
Subject: Re: [rt.cpan.org #52769] AutoReply: Geo::Coder::Bing stopped working?
Date: Tue, 15 Dec 2009 06:25:56 -0800
To: bug-Geo-Coder-Bing [...] rt.cpan.org
From: Bob Kitzberger <pdxrlk [...] gmail.com>
The new version works perfectly; thanks for the quick response!