sdaniels
Joined: 24/01/2014 16:15:19
Messages: 1
Offline
|
I am using GeoNames API search method to populate a typeahead autocomplete menu for my users when they type in a city input field. Since the input is in a known language (English) I would like the menu to only display names in English.
I am using the name_startsWith parameter as the main search term.
I thought that by passing the searchlang param it would limit the results to names in that language, but that does not seem to be the case. For example, when I call the API here:
http://api.geonames.org/search?country=US&name_startsWith=cam&searchlang=en&isNameRequired=true&lang=en&maxRows=20&orderby=relevance&adminCode1=MA&username=XXXXXXX&featureClass=P&
The second result in the list is "Campifons" which is apparently the Latin for "Springfield".
Is this expected behavior? Am I misinterpreting what the searchlang param does or does it not work in combination with the name_startsWith param?
Any workaround ideas?
|