A class that acts as a simple interface to the Search Ahead API. The class provides predictive location results based on the provided input parameters.
Send a predictive search ahead request. Refer to the Search Ahead API page for more information.
var services = new mqgl.Service('KEY');
services.searchAhead.search({q: 'Den', collection: 'address,adminArea,airport'})
.then(response => console.log(response));
Refer to the options from the Search Ahead API for detailed information.
A Promise, containing the prediction response object.
Loading...