2015-12-01 12 views
2

我有在什麼是最好的地址碼,以獲得長和很多的街道地址?

1 Rue du Four, 60200 COMPIEGNE, France 

2 Rue de Lancry, 60200 COMPIEGNE, France 

格式街道地址和地址的列表可以達到100萬十萬。

目前我使用谷歌地理碼,但它有像每天2500的限制。我不斷收到此錯誤。

google.maps.GeocoderStatus.OVER_QUERY_LIMIT

然後我管理中包含

功能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); 
    } 
    } 
}); 

然而這種方法在引起緩慢超時做瀏覽器有100000條記錄時。那麼有沒有更好的方法來使用api獲取地理編碼?

+1

100,000條記錄是您的問題的全部。將該數量減少到可管理的數量,或者[使用您自己的數據庫將結果緩存幾天或幾周](http://leavesofcode.net/2013/05/07/caching-google-maps-geocoding-lookups/)。 – Blazemonger

+4

谷歌的地理編碼幾乎是最好的。如果您每天需要提出超過2,500次的請求,那麼無論您使用誰,您都必須使用付費服務。如果您確實需要在地圖上顯示100,000個商品,我建議您着手獲取Google地圖專業版帳戶,儘管這絕不應該是這樣。值得實施某種過濾器來減少這個數量。 –

+1

[我如何在沒有收到OVER \ _QUERY \ _LIMIT響應的情況下獲得地址解析20個地址?](http://stackoverflow.com/questions/2419219/how-do-i-geocode-20-addresses-without-receiving -an-over-query-limit-response) –

回答