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

L.mapquest.key = 'KEY';

var options = {
  q: 'hotels',
  sort: 'relevance'
};

L.mapquest.search().place(options, searchCallback);

function searchCallback(error, result) {
  console.log(result);
}

Parameters

  • options required object

    An object containing options from the Place Search API.

  • callback required Function

    An error-first callback to be invoked upon completion of the place search function call.

Return Value

The Place Search API response will be returned.