AutocompleteSegmentPOICategory

public struct AutocompleteSegmentPOICategory

AutocompleteSegmentPOICategory represents a point of interest (POI) category segment in the autocomplete search results.

A POI category segment contains a POICategory, which can be used as a filter in the search method to refine search results based on the POI category information. It also includes an optional matchedAlternativeName to provide an alternative name for the matched POI category, if available. This structure is used in AutocompleteSegment to describe POI category-related information in the autocomplete search results.

  • Creates a point of interest (POI) category segment for autocomplete results.

    For example, for the query “petrol station,” the poiCategory.name is “petrol station,” while matchedAlternativeName could be “gas station” if it’s an alternative name used in the results.

    Declaration

    Swift

    public init(poiCategory: POICategory, matchedAlternativeName: String?)

    Parameters

    poiCategory

    The POICategory information to be included in the segment.

    matchedAlternativeName

    An alternative name of the matched POI category, if available.

  • Contains information about matching POI Category.

    For example, for the category “Automotive Dealer”:

    POICategory(id: POICategoryID(standard: StandardCategoryID(rawValue: 9910)!),
                name: "Automotive Dealer")
    

    Declaration

    Swift

    public let poiCategory: POICategory
  • An alternative name of the matched POI category, if available.

    For example, for the category with poiCategory.name == "petrol station", the matchedAlternativeName could be “gas station”.

    Declaration

    Swift

    public let matchedAlternativeName: String?