Open brandonbryant12 opened 2 years ago
Hi @brandonbryant12 Looks like google geocoder do not return a locality
component for that address what is the expected city here? to see if we can improve it and find a good fallback if there is no locality
Hi @brandonbryant12 Looks like google geocoder do not return a
locality
component for that address what is the expected city here? to see if we can improve it and find a good fallback if there is no locality
This is in Staten Island NYC. Experienced the same thing for a user in the Bronx. I think it's a NYC thing afaik
The result from google geocoder looks like this maybe we can use the sublocality
as a fallback, but it need a little more investigation to be sure it's a safe fallback
"results" : [
{
"address_components" : [
{
"long_name" : "407",
"short_name" : "407",
"types" : [ "street_number" ]
},
{
"long_name" : "Adams Avenue",
"short_name" : "Adams Ave",
"types" : [ "route" ]
},
{
"long_name" : "Midland Beach",
"short_name" : "Midland Beach",
"types" : [ "neighborhood", "political" ]
},
{
"long_name" : "Staten Island",
"short_name" : "Staten Island",
"types" : [ "political", "sublocality", "sublocality_level_1" ]
},
{
"long_name" : "Richmond County",
"short_name" : "Richmond County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "New York",
"short_name" : "NY",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
},
{
"long_name" : "10306",
"short_name" : "10306",
"types" : [ "postal_code" ]
},
{
"long_name" : "5237",
"short_name" : "5237",
"types" : [ "postal_code_suffix" ]
}
],
"formatted_address" : "407 Adams Ave, Staten Island, NY 10306, USA",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 40.5781923,
"lng" : -74.09489739999999
},
"southwest" : {
"lat" : 40.5780057,
"lng" : -74.09511169999999
}
},
"location" : {
"lat" : 40.5781315,
"lng" : -74.0949888
},
"location_type" : "ROOFTOP",
"viewport" : {
"northeast" : {
"lat" : 40.5794094302915,
"lng" : -74.0936871697085
},
"southwest" : {
"lat" : 40.5767114697085,
"lng" : -74.09638513029151
}
}
},
"place_id" : "ChIJ0XTVVclOwokR7QkAK-R0HTc",
"types" : [ "premise" ]
}
]
Looks like it could work
This will return
I have a service that depends on having the
city
field populated