IGeocodeProvider
Interface for a geocoder provider.
Constructor
IGeocodeProvider()
Methods
Name |
Returns |
Description |
Sends a request for geocoding. 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. |
||
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
geocode
{vow.Promise} geocode(request[, options])
Sends a request for geocoding. 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 |
— |
Type: String Request string. |
|
— |
Type: Object Options. |
|
— |
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]]. |
|
— |
Type: Number Maximum number of results to be returned. |
|
— |
Type: Number Number of results that must be skipped. |
|
— |
Type: Boolean Search only inside the area defined by the "boundedBy" option. |
* 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 |
— |
Type: String Request string. |
|
— |
Type: Object Options. |
|
— |
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]]. |
|
— |
Type: Number Maximum number of results to be returned. |
|
— |
Type: Boolean Search only inside the area defined by the "boundedBy" option. |
* Mandatory parameter/option.
Mandatory parameter/option.