Google지도에서 건물/전제에 마커를 추가하려고합니다.이를 수행하려면 Geocoding API을 사용하고 있습니다. 나는 주소를 요청하여 그것을 테스트하고 완벽하게 작동했습니다.Google지도 지오 코드 : 속성 전제를 알 수 없음
var address = "...";
var geocoder = new google.maps.Geocoder();
geocoder.geocode({'address': address }, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var location_marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
}
});
는 지오 코딩 API에 따르면 당신은 premise
속성을 사용하여,하지만 난 자바 스크립트 오류 Uncaught InvalidValueError: unknown property premise
납니다 premise
를 사용하는 경우하여 building/premise를 요청할 수 있습니다.
이 내가 premise
속성을 요청하고있어 어떻게 :
var premise = "...";
var geocoder = new google.maps.Geocoder();
geocoder.geocode({'premise': premise }, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var location_marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
}
});
나는 누군가가이 문제를 이전 한 경우 확실하지이
question
주어진 답을 따랐다. 어쩌면이 문제를 해결할 또 다른 방법이있을 수 있습니다.
UPDATE
경우 누군가가 Google지도에서 비즈니스/장소는 Places Library을 사용할 수를 검색하려면이 질문에 실수를 한단다. 이 희망이 사람 :)
질문을 편집하여 "전제"를 사용하는 방법을 보여줄 수 있습니까? – Andy
@Andy 질문이 업데이트되었습니다. 기본적으로'address' 속성을 사용하는 것과 같은'premise'를 사용하고 있습니다. –