Class SuggestOptions

Warning

This feature is available in the Full MapKit SDK version

Package com.yandex.mapkit.search

java.lang.Object
    ↳ com.yandex.mapkit.search.SuggestOptions

final class SuggestOptions implements Serializable

Struct to fine-tune suggest request.

Summary

Constructors

Signature and Description

SuggestOptions(int suggestTypes,
               @Nullable Point userPosition,
               boolean suggestWords,
               boolean strictBounds)

SuggestOptions()
Use constructor with parameters in your code.

Methods

Type and modifiers

Method and Description

int

getSuggestTypes()
The suggest type can be one of mapkit.search.SuggestType values or their bitwise 'OR' combination.

SuggestOptions

setSuggestTypes(int suggestTypes)
See #getSuggestTypes().

Point

getUserPosition()
The server uses the user position to calculate the distance from the user to suggest results.

SuggestOptions

setUserPosition(@Nullable Point userPosition)
See #getUserPosition().

boolean

getSuggestWords()
Enable word-by-word suggestion items.

SuggestOptions

setSuggestWords(boolean suggestWords)
See #getSuggestWords().

boolean

getStrictBounds()
Strictly limit the output and keep only objects that fall within the window.

SuggestOptions

setStrictBounds(boolean strictBounds)
See #getStrictBounds().

void

serialize(com.yandex.runtime.bindings.Archive archive)

Constuctors

SuggestOptions

SuggestOptions(int suggestTypes,
               @Nullable Point userPosition,
               boolean suggestWords,
               boolean strictBounds)


SuggestOptions

SuggestOptions()

Use constructor with parameters in your code.

This one is for bindings only!


Methods

getSuggestTypes

int getSuggestTypes()

The suggest type can be one of mapkit.search.SuggestType values or their bitwise 'OR' combination.

If suggestType is not initialized, it means to use server-defined types.


setSuggestTypes

SuggestOptions setSuggestTypes(int suggestTypes)

See #getSuggestTypes().


getUserPosition

@Nullable
Point getUserPosition()

The server uses the user position to calculate the distance from the user to suggest results.

Optional field, can be null.


setUserPosition

SuggestOptions setUserPosition(@Nullable Point userPosition)

See #getUserPosition().


getSuggestWords

boolean getSuggestWords()

Enable word-by-word suggestion items.


setSuggestWords

SuggestOptions setSuggestWords(boolean suggestWords)

See #getSuggestWords().


getStrictBounds

boolean getStrictBounds()

Strictly limit the output and keep only objects that fall within the window.

The window is advisory in nature and doesn't impose strict restrictions on search results, helping to select the most relevant hints.


setStrictBounds

SuggestOptions setStrictBounds(boolean strictBounds)

See #getStrictBounds().


serialize

@Override
void serialize(com.yandex.runtime.bindings.Archive archive)