File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/app/features/location Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -69,10 +69,12 @@ export class GeoService {
6969 private reformatDisplayName ( result : OpenStreetMapsSearchResult ) : GeoResult {
7070 const addr = result ?. address ;
7171 if ( addr ) {
72+ const city = addr . city ?? addr . town ;
73+
7274 result . display_name = [
7375 addr . amenity ?? addr . office ,
7476 addr . road ? addr . road + " " + addr . house_number : undefined ,
75- addr . postcode ? addr . postcode + " " + addr . city : addr . city ,
77+ addr . postcode ? addr . postcode + " " + city : city ,
7678 ]
7779 . filter ( ( x ) => ! ! x )
7880 . join ( ", " ) ;
@@ -110,6 +112,7 @@ type OpenStreetMapsSearchResult = GeoResult & {
110112 suburb ?: string ;
111113 borough ?: string ;
112114 city ?: string ;
115+ town ?: string ;
113116 postcode ?: number ;
114117 country ?: string ;
115118 country_code ?: string ;
You can’t perform that action at this time.
0 commit comments