Jquery 为什么status OVER_QUERY_LIMIT在status.OK之前运行

Jquery 为什么status OVER_QUERY_LIMIT在status.OK之前运行,jquery,function,google-maps-api-3,delay,timedelay,Jquery,Function,Google Maps Api 3,Delay,Timedelay,为什么status OVER_QUERY_LIMIT在status.OK之前运行?我使用以下代码: directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { var response = Math.ceil(response.routes[0].legs[0].distance.value / 1000);

为什么status OVER_QUERY_LIMIT在status.OK之前运行?我使用以下代码:

directionsService.route(request, function(response, status) {
    if (status == google.maps.DirectionsStatus.OK) {
        var response = Math.ceil(response.routes[0].legs[0].distance.value / 1000);

        stores.push({
            distance: response,
            id: item.properties.Nid,
        });

        console.log('STATUS.OK');
    } else if (status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT){
        console.log('OVER_QUERY_LIMIT');
    }
});
超过查询限制的状态记录在Status.OK之前。我知道OVER_QUERY_LIMIT正在运行,因为我对许多请求都做了修改

但我不知道当总是首先运行“超过查询限制”时,如何创建延迟


有人能给我解释一下吗?

请求是异步的。为status=“OK”响应生成数据比返回status=“OVER\u QUERY\u LIMIT”响应需要更多的时间


您需要处理导致“超过查询限制”状态的请求,如相关问题中所述:

请求是异步的。为status=“OK”响应生成数据比返回status=“OVER\u QUERY\u LIMIT”响应需要更多的时间

您需要处理导致“超出查询限制”状态的请求,如相关问题中所述: