Enumerations

The following enumerations are available globally.

AutocompleteResultType

FeedbackEventType

  • Feedback event type that describes the user actions performed on a specific search result.

    See more

    Declaration

    Swift

    public enum FeedbackEventType

FeedbackResultIDFactory

Geometry

  • The protocol used to specify searchArea in SearchOptions

    See more

    Declaration

    Swift

    public enum Geometry : Equatable, Hashable

SortOrder

  • Specifies the type of result sorting.

    See more

    Declaration

    Swift

    public enum SortOrder

AutocompleteSegment

  • AutocompleteSegment represents an entity found within the autocomplete search term.

    An entity can be a brand, a point of interest (POI) category, or plain text. Every case has a corresponding associated object. This enum is used in AutocompleteResult to describe the matched entities returned from the autocomplete search.

    An example of handling segments:

    let options = AutocompleteOptions(
        query: "mar",
        position: .AMSTERDAM,
        radius: Measurement(value: 100, unit: .kilometers),
        countries: ["NL"]
    )
    search.autocomplete(options: options) { result in
        if case let .success(response) = result {
            response.results.forEach { result in
                result.segments.forEach { segment in
                    switch segment {
                    case .brand(let brand):
                        print("Brand: \(brand.brand.name)")
                    case .poiCategory(let category):
                        print("Category: \(category.poiCategory.name)")
                    case .plainText(let text):
                        print("Text: \(text.plainText)")
                    @unknown default:
                        print("unknown")
                    }
                }
            }
        }
    }
    
     // Prints:
     //   Category: Market
     //   Brand: Marqt
     //   Category: Marina
     //   Brand: Marriott
    
    
    See more

    Declaration

    Swift

    public enum AutocompleteSegment