Closed helloitsm3 closed 3 years ago
Thanks for the proposal. At the moment it looks like this is hardcoding the country to
SG
, though. If this becomes a feature, it should be configurable at initialization time.
I was using "SG" to test out to see if it was able to grab only SG.txt. Users will need to specify the country they plan to grab and it'll dump the data into geonames_dump folder
Yes, but your PR right now hardcodes this.
Yes, but your PR right now hardcodes this.
Sorry, my bad. I'll remove it and make another pull request
The way this works should be:
const geocoder = require('local-reverse-geocoder');
geocoder.init(
{
load: {
admin1: true,
admin2: false,
admin3And4: false,
alternateNames: false,
},
countries: ['SG'], // <== New, defaults to all countries
},
function () {
// Ready to call lookUp
}
);
The way this works should be:
const geocoder = require('local-reverse-geocoder'); geocoder.init( { load: { admin1: true, admin2: false, admin3And4: false, alternateNames: false, }, countries: ['SG'], // <== New, defaults to all countries }, function () { // Ready to call lookUp } );
Okay thanks. I'll make the necessary changes later
Could you add documentation in the README how people would use this, please?
Yes. I'll work on that and push it later
Fixes https://github.com/tomayac/local-reverse-geocoder/issues/23.
The release just went out as v0.11.0. Thanks again! You're also credited in the README :-)
Tried to implement loading of single country instead of getting data from all countries and cities. Helps to reduce the time taken when initializing the app