🔧 Location search fix

Fixed bug where cities were not showing up in some county location searches

Project: 👯 Find relevant people Type: 🔧 Fix User: 🏢 Company

Key changes

  • Searching for engineers in a specific county in the current location search will now show you all engineers in that area

Why?

A number of users had pointed out that they were facing issues with the current location search on streams. For example, they were searching Leicestershire, but engineers in Leicester were not appearing (not ideal!).

What?

Now, when you search for a county, you’ll see absolutely all engineers who are currently based in that area.

For example, if you search Derbyshire, you’ll see any engineer based in that county - including engineers in Derby.

How?

We use Google Place API for autocompleting location and getting more details on a location. Google provides different geographic levels e.g. city, county and county.

Below is for Liverpool and Leicester, can see that administrative_area_level_2 which is usually the county is correct for Liverpool but not for Leicester (why Google!? 🤔)

To fix this we used locationIQ to complement google. When we see that the city and county are the same, we double check the county with locationIQ and override the county that Google has given us.

 
"address_components" : [
         {
            "long_name" : "Liverpool",
            "short_name" : "Liverpool",
            "types" : [ "locality", "political" ]
         },
         {
            "long_name" : "Merseyside",
            "short_name" : "Merseyside",
            "types" : [ "administrative_area_level_2", "political" ]
         },
         {
            "long_name" : "England",
            "short_name" : "England",
            "types" : [ "administrative_area_level_1", "political" ]
         },
         {
            "long_name" : "United Kingdom",
            "short_name" : "GB",
            "types" : [ "country", "political" ]
         }
      ],
"address_components" : [
         {
            "long_name" : "Leicester",
            "short_name" : "Leicester",
            "types" : [ "locality", "political" ]
         },
         {
            "long_name" : "Leicester",
            "short_name" : "Leicester",
            "types" : [ "postal_town" ]
         },
         {
            "long_name" : "Leicester",
            "short_name" : "Leicester",
            "types" : [ "administrative_area_level_2", "political" ]
         },
         {
            "long_name" : "England",
            "short_name" : "England",
            "types" : [ "administrative_area_level_1", "political" ]
         },
         {
            "long_name" : "United Kingdom",
            "short_name" : "GB",
            "types" : [ "country", "political" ]
         }
      ],

Big shoutout to BE dev Hasan for fixing this issue so quickly.

What’s next?

We’ll be fixing some FE bugs on the current location filter, and changing the way we collect location preferences from engineers so that it is super clear on their profile where they want to work, and how (remote, hybrid, onsite).

Did this answer your question?
😞
😐
🤩

Last updated on February 24, 2023