What's the best practice with fuzzy search, when important cities (e.g. capitals) are not found with entityType=Municipality?

Wildanger, Martin 21 Reputation points
2022-12-20T09:03:07.517+00:00

Hi there!

We're using the fuzzy search API with the entityType=Municipality queryparam, but sometimes it doesn't find large/important/capital cities.

A few examples we encountered so far:

  • Havana (Cuba)
  • Tegucialpa (Honduras)
  • Conakry (Guinea)
  • Yangon (Myanmar)
  • Dili (East Timor)

Is there some kind of best practice to solve this?
Because if this is a data issue, it doesn't seem realistic to just report them one by one, since these are just a few that we encountered so far.

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
835 questions
{count} votes

2 answers

Sort by: Most helpful
  1. rbrundritt 20,921 Reputation points Microsoft Employee Moderator
    2023-01-03T17:15:06.76+00:00

    It looks like a possible data issue, or just a priority issue. The Fuzzy search service tends to prefer points of interest over geographic locations. This may be the cause.

    If you are just looking for cities, I recommend using the V2 search geocoding service and passing your query into the locality parameter. For example:

    https://atlas.microsoft.com/geocode?api-version=2022-02-01-preview&subscription-key={Your_Azure_Maps_Key}&locality={query}

    Cities will have a result type of PopulatedPlace. Trying these with the list of cities you provided works much more reliably.

    1 person found this answer helpful.
    0 comments No comments

  2. IoTGirl 3,621 Reputation points Microsoft Employee Moderator
    2023-03-10T05:58:53.53+00:00

    Hello @Wildanger, Martin ,

    I would agree with @rbrundritt on this one. I believe "municipality" may have a different interpretation in the data. Search V2 uses the Bing Maps entity types

    Sincerely,
    IoTGirl

    From: https://learn.microsoft.com/en-us/bingmaps/spatial-data-services/geodata-api

    entityType = A string that contains one of the following the entity types. Note that not all entity types are available for each location.

    • CountryRegion: Country or region
    • AdminDivision1: First administrative level within the country/region level, such as a state or a province.
    • AdminDivision2: Second administrative level within the country/region level, such as a county.
    • Postcode1: The smallest post code category, such as a zip code.
    • Postcode2: The next largest post code category after Postcode1 that is created by aggregating Postcode1 areas.
    • Postcode3: The next largest post code category after Postcode2 that is created by aggregating Postcode2 areas.
    • Postcode4: The next largest post code category after Postcode3 that is created by aggregating Postcode3 areas.
    • Neighborhood: A section of a populated place that is typically well-known, but often with indistinct boundaries.
    • PopulatedPlace: A concentrated area of human settlement, such as a city, town or village.
    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.