i have street addresses in the format of
1 Rue du Four, 60200 COMPIEGNE, France
2 Rue de Lancry, 60200 COMPIEGNE, France
And the list of address can be up to 100 000. hundred thousand.
currently i am using google gecode but it has limitations like per day 2500. i kept on getting this error.
google.maps.GeocoderStatus.OVER_QUERY_LIMIT
then i managed to do it with a timeout like below
function codeAddress(markersAddress) {
var address = markersAddress.address;
var name = markersAddress.name;
var info = markersAddress.info;
geocoder.geocode({'address': address}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var latLng = results[0].geometry.location;
} else {
if (status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT) {
setTimeout(function() { codeAddress(markersAddress); }, (timeout * 3));
} else {
console.log('Geocode was not successful for the following reason: ' + status);
}
}
});
however this method is causing slowness in the browser when there is 100 000 records. so is there any better way to get geocode with a api ?