-1
Google지도에서 사용할 수 있도록 지오 코딩 된 약 60 개의 주소를 반복합니다. 내 콜백 (아래)은 위치를 수집하는 데는 효과가있는 것처럼 보이지만 루프를 통과하는 주소 개체에 연결하는 방법을 알아야합니다. 지오 코드 응답에서 내 요청이 무엇인지 알 수있는 것을 찾을 수 없습니다.내 지오 코더 지오 코드 콜백에서 결과가 어떤 요청에 해당하는지 결정하려면 어떻게해야합니까?
할 방법이 있습니까? 자바 스크립트에서
geocode() {
var lv_location;
var geocoder = new google.maps.Geocoder();
if (geocoder) {
geocoder.geocode({'address' : this.address},
function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
// what data in results can be used to relate the location to the address?
lv_location = results[0].geometry.location;
}
markerCounter++;
if (markerCounter >= 60) finishSurnames();
});
}