tompi/jeoquery

Multiple country codes

vr55 opened this issue · 1 comments

vr55 commented

Hello. How can i use multiple contry code in 'search' request?
i.e. "country=US&country=RU"

tompi commented

Hi. Just assign an array to "country" param, like this:

jeoquery.getGeoNames('countryInfo', { country: ['GB', 'NO'] }, function(countries) {
    console.log(countries.length); 
});

Latest version uses jquery ajax param "traditional=true" so this serializes to "country=GB&country=NO" instead of "country[]=GB&country[]=NO".