Documentation
Reference
2.1.55 (current version)
collection
interactivityModel
Interfaces

ISearchProvider

Search provider interface.

Constructor | Methods

Constructor

ISearchProvider()

Methods

NameReturnsDescription
search(request[, options])

vow.Promise

Sends a request to search for geo objects. A handler function for processing geocoding results can be added via the returned promise object. The object input to the handler function can contain only the following types of fields: geoObjects, layers, mapState, and metaData.

suggest(request[, options])

vow.Promise

Sends a request for search suggestions. Returns a promise object that is either rejected with an error, or confirmed by an array of objects in the format { displayName: "Mitishi, Moscow region", value: "Russia, Moscow region, Mitishi " }. The displayName field represents the toponym in a user-friendly way, and the value field represents the value which should be inserted into the search field after the user selects the suggestion.

This method is optional.

Methods details

search

Sends a request to search for geo objects. A handler function for processing geocoding results can be added via the returned promise object. The object input to the handler function can contain only the following types of fields: geoObjects, layers, mapState, and metaData.

Returns Promise object.

Parameters:

ParameterDefault valueDescription
request*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: String

Request string.

options

Type: Object

Options.

options.boundedBy

Type: Number[][]

A rectangular area on the map, where the object being searched for is presumably located. Must be set as an array, such as [[30, 40], [50, 50]].

options.results

Type: Number

Maximum number of results to be returned.

options.skip

Type: Number

Number of results that must be skipped.

* Mandatory parameter/option.

suggest

Sends a request for search suggestions. Returns a promise object that is either rejected with an error, or confirmed by an array of objects in the format { displayName: "Mitishi, Moscow region", value: "Russia, Moscow region, Mitishi " }. The displayName field represents the toponym in a user-friendly way, and the value field represents the value which should be inserted into the search field after the user selects the suggestion.

This method is optional.

Returns a Promise object.

Parameters:

ParameterDefault valueDescription
request*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: String

Request string.

options

Type: Object

Options.

options.boundedBy

Type: Number[][]

A rectangular area on the map, where the object being searched for is presumably located. Must be set as an array, such as [[30, 40], [50, 50]].

options.results

Type: Number

Maximum number of results to be returned.

options.strictBounds

Type: Boolean

Search only inside the area defined by the "boundedBy" option.

* Mandatory parameter/option.