MapQuest.js
L.mapquest.search().place
A class that acts as a simple interface to the Place Search API. The class provides location results based on the provided input parameters.
Syntax
js
L.mapquest.key = 'KEY';
var options = {
q: 'hotels',
sort: 'relevance'
};
L.mapquest.search().place(options, searchCallback);
function searchCallback(error, result) {
console.log(result);
}
Parameters
Request Parameter | Description | Required |
---|---|---|
options Object | An object containing options from the Place Search API. | Yes |
callback Function | An error-first callback to be invoked upon completion of the place search function call. | Yes |
Return Value
The Place Search API response will be returned.