Tôi đang sử dụng Geo :: Coder :: Nhiều mô-đun perl & nhận được một số kết quả lạ. Khi tôi đặt Google làm nhà cung cấp, kết quả được hiển thị chính xác. Tuy nhiên, việc đặt nhà cung cấp thành Bing sẽ đảo ngược vĩ độ & giá trị kinh độ. Ví dụ:Mã hóa địa lý .... tôi có làm gì sai không?
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";
}
này sẽ trở lại (chính xác):
Longitude: -122,085099 Latitude: 37,422782
Khi tôi thay đổi nhà cung cấp để Bing, mọi thứ không như mong đợi:
my $WhereIzIt = Geo::Coder::Bing->new(key => 'Yur key');
my $WhereIzIt_options = {
geocoder => $WhereIzIt,
daily_limit => 4000,
};
$geocoder_many->add_geocoder($WhereIzIt_options);
Trả lại:
Longitude: 37.42317 6 Vĩ độ: -122.085962
Bing luôn trả về kết quả ngược? Làm thế nào tôi sẽ thay đổi điều này trong mô-đun?
Tôi đã thông báo cho tác giả của mô-đun qua email nhưng tôi làm cách nào để tự khắc phục? – kristen