I'm trying to implement Geocoding with Mapbox. To get better results I want to limit my search to one country. I found this guide on how to do that. But unfortunatly when I do it in my code:
$(document).on('keyup', "#place",
function() {
var text = $(this).val();
if (text.length >= 5) {
geocoder.query({query:text, country:'de'}, setMap());
}
it seems to ignore the country-options and searches worldwide...
Check out this minimal Jsfiddle.
Can anyone please help me?