The following URL fails:
As a result this program fails:
#!/usr/bin/env perl
use strict;
use warnings;
use Geo::Coder::Google;
use Data::Dumper;
my $gcg = Geo::Coder::Google->new(apiver => 3);
my @l = $gcg->geocode(location => 'Wisdom Hospice, High Bank, Rochester, Kent, England');
print Data::Dumper->new([@l])->Dump();
And yet, if I search for "wisdom hospice high bank rochester kent england" at google maps it works giving this:
Thoughts?
You should be aware that Geocoding API works only with street addresses, any business results are out of the scope.
In your example 'Wisdom Hospice' is the business place. In such situation Places API is the right API to use.
You can execute the following Places API request to get this place:
https://maps.googleapis.com/maps/api/place/textsearch/json?query=wisdom%20hospice%20high%20bank%20rochester%20kent%20england&key=YOUR_API_KEY