package Geo::Coder::Mapbox;
use strict;
use warnings;
use Carp;
use Encode;
use JSON::MaybeXS;
use HTTP::Request;
use LWP::UserAgent;
use LWP::Protocol::https;
use URI;
=head1 NAME
Geo::Coder::Map
8($location);
}
my $uri = URI->new("https://$self->{host}/geocoding/v5/mapbox.places/$location.json");
$location =~ s/\s/+/g;
my %query_parameters = ('access_token' => $self->{'access_token'});
ned error: on $url ", $res->status_line());
return { };
}
my $json = JSON::MaybeXS->new()->utf8();
my $rc;
eval {
$rc = $json->decode($res->content());
};
if(!defined($rc)) {
if($@) {