gpt4 book ai didi

javascript - 获取街道地址的最佳地理编码是什么?

转载 作者:行者123 更新时间:2023-11-29 21:38:34 25 4
gpt4 key购买 nike

<分区>

我有以下格式的街道地址

1 Rue du Four, 60200 COMPIEGNE, France

2 Rue de Lancry, 60200 COMPIEGNE, France

并且地址列表最多可达10万.十万。

目前我正在使用 google gecode 但它有限制,例如每天 2500。我一直收到此错误。

google.maps.GeocoderStatus.OVER_QUERY_LIMIT

然后我设法像下面这样超时了

函数代码地址(标记地址){

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

但是,当有 100 000 条记录时,此方法会导致浏览器运行缓慢。那么有没有更好的方法来使用 api 进行地理编码?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com