ISearchProvider
Search provider interface.
Constructor
ISearchProvider()
Methods
Name | Returns | Description |
---|---|---|
search(request[, options]) | 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]) | 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. |
Name | Returns | Description |
---|---|---|
search(request[, options]) | 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]) | 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
{vow.Promise} search(request[, options])
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:
Parameter | Default value | Description |
---|---|---|
request * | — | 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. |
Parameter | Default value | Description |
---|---|---|
request * | — | 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
{vow.Promise} suggest(request[, options])
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:
Parameter | Default value | Description |
---|---|---|
request * | — | 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. |
Parameter | Default value | Description |
---|---|---|
request * | — | 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.