Use node which-country

I  need to take the users country based on the geo-codinates provided by the mobile application. whlile doing some reaserch in node which-country , I found that ituseful,but need to pass value wisely.


 https://www.npmjs.com/package/which-country

 var whichCountry = require('which-country');
// pass it as  [latitudes,logitudes]
var userCountry = whichCountry([6.795019389999998,79.88569332999997]);
console.log('test userCountry :'+userCountry);  //return null

// pass it as [logitudes,latitudes]
var userCountry = whichCountry([79.88569332999997,6.795019389999998]);
console.log('test userCountry :'+userCountry);  //return LKA



I test the application with the given code of me in the test packges given by them.
https://github.com/vkurchatkin/which-country/blob/master/package.json

AUS -22.000825,132.889122
BLR 52.337547,24.080529
CAN 57.255393,-106.712553
CYP 35.315045,33.681395
DZA 23.184085,7.117638
ITA 39.926747,9.017427
JPN 43.771243,142.764986
NZL -38.910944,175.769288
RUS 45.989575,40.944542 55.656384,57.285312 45.597221,33.620021 67.384926,178.636193 66.472320,-177.408729
SOM 10.029561,47.741787
SRB 43.551167,20.641808
TWN 23.483591,121.012056
USA 66.981747,-148.812163
VEN 5.072656,-63.952391
LKA 6.795019389999998,79.88569332999997

Comments

Popular posts from this blog

ENOENT: no such file or directory, rename : node_modules/async

react-quill Integrate quill-image-resize-module