[osm] Adding border_type=city to override tags
This commit is contained in:
@@ -227,7 +227,7 @@ class OpenAddressesFormatter(object):
|
|||||||
if address_state:
|
if address_state:
|
||||||
components[AddressFormatter.STATE] = address_state
|
components[AddressFormatter.STATE] = address_state
|
||||||
|
|
||||||
if add_osm_boundaries:
|
if add_osm_boundaries or AddressFormatter.CITY not in components:
|
||||||
osm_components = self.components.osm_reverse_geocoded_components(latitude, longitude)
|
osm_components = self.components.osm_reverse_geocoded_components(latitude, longitude)
|
||||||
self.components.add_admin_boundaries(components, osm_components, country, language)
|
self.components.add_admin_boundaries(components, osm_components, country, language)
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ class OSMAddressComponents(object):
|
|||||||
'suburb': AddressFormatter.SUBURB,
|
'suburb': AddressFormatter.SUBURB,
|
||||||
'quarter': AddressFormatter.SUBURB,
|
'quarter': AddressFormatter.SUBURB,
|
||||||
'neighbourhood': AddressFormatter.SUBURB
|
'neighbourhood': AddressFormatter.SUBURB
|
||||||
|
},
|
||||||
|
'border_type': {
|
||||||
|
'city': AddressFormatter.CITY
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user