Google Maps API地理编码失败,状态:OVER_QUERY_LIMIT

时间:2017-06-14 16:01:28

标签: javascript google-maps google-maps-api-3 google-geocoder

如果这是重复,我道歉。但我仍然无法解决这个问题。我正在尝试对多个位置进行地理编码(大约20个)。我目前正在Geocode failed, status: OVER_QUERY_LIMIT。我试图设置一个超时,从我在其他Stack Overflow问题上看到的。但是,这对我来说目前不起作用。我的地理编码目前设置如下:

         setTimeout(function geocodeLocations(data) {
                    var geocoder = new google.maps.Geocoder();
                    geocoder.geocode( { 'address': fullAddress }, function(data, status) {
                        if ( status == google.maps.GeocoderStatus.OK ) {
                            var coordinates = data[0].geometry.location;
                            var lat = coordinates.lat();
                            var lng = coordinates.lng();


                            // sets the items in the marker 
                            var markerInfo = {
                                name: name,
                                lat: lat,
                                lng: lng,
                                locationStatus: locationStatus,
                                project: project,
                                date: FormattedDate,
                                storytellerFlag: storytellerFlag,
                                RegistrationLink: RegistrationLink,
                                ID: ID
                            };
                            map.setCenter(markerInfo);
                            createMarker(markerInfo);
                        } else {
                         console.log("Geocode failed, status: " + status);
                        }
                    });
                }, 2000);

任何人都可以帮我弄清楚如何对10个以上的查询进行地理编码吗?

0 个答案:

没有答案
相关问题