Autocomplete requires correct spelling, US only?

4 posts / 0 new
Last post
davmar
Autocomplete requires correct spelling, US only?

Hi,

I'm trying to get the search ahead API to return results of cities, state and countries. Users will type in the search box and upon selecting a result, the map will move to the location they pick. Becuase the users may want to go anywhere in the world, I don't have a starting location that can be used for geographical context.

I'm having two problems with the Search Ahead API:

  1. Results require correct spelling. The trouble is that minor typos prevent any results from showing up. For example: "Denvr Colorado" fails. Is this fuzzy matching available in a different API mapquest offers besides search ahead?
  2. US only, or at least, mostly US. This app will (fingers crossed) used by people in the US who want to search outside of the country, and also by people located outside of the US serarching in their home countries. For example "Budapest" returns the capitol of Hungary, but "Venice" does not return any results in Italy

https://developer.mapquest.com/docs/searchahead-api/

Is there another API mapquest offers that might be a better fit for me? Or perhaps a different approach to using the Search Ahead API?

Thank you in advance,

David


MQBrianCoakley
You are correct about the

You are correct about the search ahead API. It currently supports the US and Canada and does need correct spelling.

 

The geocode API is much better at returning close matches for incorrect input.


sds30103
Is there a way to search

Is there a way to search Canada only or Canada first?


MQBrianCoakley
You can set the countryCode

You can set the countryCode and/or the location to encourage Canadian results.

 

http://www.mapquestapi.com/search/v3/prediction?limit=10&collection=addr... Queen St&countryCode=CA&location=-79.57672,43.73141&key=KEY