Skip to content

Commit

Permalink
OSM is breaking with Rochester again
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed May 26, 2017
1 parent 55811cf commit 489ac21
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions t/osm.t
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,18 @@ OSM: {
delta_within($location->{geometry}{location}{lat}, 51.50, 1e-1);
delta_within($location->{geometry}{location}{lng}, -0.13, 1e-1);

# But putting it here succeeds!
$location = $geocoderlist->geocode('Rochester, Kent, England');
ok(defined($location));
ok(ref($location) eq 'HASH');
delta_within($location->{geometry}{location}{lat}, 51.38, 1e-1);
delta_within($location->{geometry}{location}{lng}, 0.5067, 1e-1);
ok($location->{address}{country_code} eq 'gb');
ok($location->{address}{country} eq 'United Kingdom');
# OSM fails this look up
TODO: {
local $TODO = 'OSM fails on search for Rochester in Kent';

$location = $geocoderlist->geocode('Rochester, Kent, England');
ok(defined($location));
ok(ref($location) eq 'HASH');
delta_within($location->{geometry}{location}{lat}, 51.38, 1e-1);
delta_within($location->{geometry}{location}{lng}, 0.5067, 1e-1);
ok($location->{address}{country_code} eq 'gb');
ok($location->{address}{country} eq 'United Kingdom');
};

$location = $geocoderlist->geocode(location => '8600 Rockville Pike, Bethesda MD, 20894 USA');
ok(defined($location));
Expand Down

0 comments on commit 489ac21

Please sign in to comment.