mkoryak / address-validator Goto Github PK
View Code? Open in Web Editor NEWnodejs address validator via google api
nodejs address validator via google api
nvm found the issue!
Tried using this api but gives following error.
Cannot find ./lib/validator
It would be nice if the validation could preserve this data so that if a user passes in any type of unique data it comes back within the validation.
when I have time again
The example on the NPM website and here on Github doesn't provide any inexact or exact matches. After adding a key for the Maps API, the error callback returns null, but still no inexact or exact matches are found.
Hi,
For some addresses which can easily be translated by google on google maps, it seems not to translate when using this module.
var address = new addressValidator.Address({street: "Existing street", city: "Existing city", country: 'NL'});
addressValidator.validate(address, addressValidator.match.streetAddress, function(err, exact, inexact){
console.log('input: '+ address.toString());
console.log('match: '+ exact);
console.log('did you mean: '+inexact);
});
Result is that there is no exact match and no inexact match found.
But when I use the google API, it does however work:
https://maps-api-ssl.google.com/maps/api/geocode/xml?address=Existing street Existing city NL&sensor=false&client=gme-kickzag&signature=VF930KLrbu98sKKLqIjn4adIoTs=
I'm trying to do a null check of "err" in the callback but I'm not sure if there could be an error but I still get exact and/or inexact matches.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.