Skip to content

Commit

Permalink
Fixed nominatim reverse search issue for New York City
Browse files Browse the repository at this point in the history
  • Loading branch information
LoicTouzard committed Jun 8, 2016
1 parent 93de032 commit 134bf80
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#### V1.2.1
* fix de la reverse search nominatim
* fix de la validation d'email

## V1.2.0
* ajout de la page de profil
* edition du profil disponible
Expand All @@ -11,7 +15,7 @@
* Refactoring du code en back et front
* fix #6

## V1.0.1
#### V1.0.1
* fix #3
* fix #4

Expand Down
2 changes: 1 addition & 1 deletion src/static/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"MAPBOXTOKEN":"pk.eyJ1IjoibHRvdXphcmQiLCJhIjoiY2lvMGV5OTJhMDB2Y3dka2xrZHpycGlrZiJ9.70MUkG_bCx7MPyIOhwfcKA",
"SERVER_ADDR":"localhost:5000",
"VERSION" : "1.2.0",
"VERSION" : "1.2.1",
"DEBUG":true,
"PROTOCOL": "http"
}
4 changes: 4 additions & 0 deletions src/utils/nominatim.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ def reverse_location_for(osm_id, osm_type):
if address:
city = address.get('city', None)
if not city:
# problem for Dublin Issue #4 (osm_id=3473474851, osm_type=N)
city = address.get('county', None)
if not city:
# problem for New York City (osm_id=175905, osm_type=R)
city = address.get('state_district', None)
country = address.get('country', None)
return (lat, lon, city, country)

Expand Down

0 comments on commit 134bf80

Please sign in to comment.