我正在使用Geo :: Coder ::许多Perl模块&得到一些奇怪的结果。当我将Google设置为提供商时,结果将正确显示。但是,将提供者设置为Bing会颠倒纬度&经度值。例如:地理编码....我做错了什么?
use Geo::Coder::Google;
use Geo::Coder::Bing;
use Geo::Coder::Many;
use Geo::Coder::Many::Util qw(country_filter);
# Create the Geo::Coder::Many object, telling it to use a 'weighted random'
# scheduling method
my $options = {
scheduler_type => 'WRR',
};
my $geocoder_many = Geo::Coder::Many->new($options);
# Create and add a geocoder
my $Locatorize = Geo::Coder::Google->new(apikey => 'yur Key');
my $Locatorize_options = {
geocoder => $Locatorize,
daily_limit => 2500, #google has a 2,500 limit/day
};
$geocoder_many->add_geocoder($Locatorize_options);
my $result = $geocoder_many->geocode(
{
location => '1600 Amphitheatre Parkway Mountain View, CA 94043'
}
);
if (defined $result) {
print "Longitude: ", $result->{longitude}, "\n";
print "Latitude: ", $result->{latitude}, "\n";
}
else {
print "Failed to geocode!\n";
}
这将(正确)返回:
经度:-122.085099 纬度:37.422782
当我改变提供商兵,事情出差错:
my $WhereIzIt = Geo::Coder::Bing->new(key => 'Yur key');
my $WhereIzIt_options = {
geocoder => $WhereIzIt,
daily_limit => 4000,
};
$geocoder_many->add_geocoder($WhereIzIt_options);
此回报:
经度:37.42317 6 纬度:-122.085962
Bing一贯向后返回结果?我将如何改变这个模块?
我已通过电子邮件通知了该模块的作者,但我该如何自己修复此问题? – kristen 2010-10-02 22:16:59