한 번의 클릭으로이 기능을 호출하고 싶지만 한 번의 클릭으로 작동하지 않습니다.한 번의 클릭으로 작동하지 않음
<input id="search" type="button" onClick="codeAddress();" value="Search Location" />
function codeAddress() {
geocoder = new google.maps.Geocoder();
var address = document.getElementById("box").value;
geocoder.geocode({ 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
a = results[0].geometry.location.lat();
b = results[0].geometry.location.lng();
myLatlng = new google.maps.LatLng(a, b);
}
else {
alert("Geocode was not successful for the following reason: " + status);
}
});
initialize();
}
"가 작동하지 않습니다"이 내가 항상 – madalinivascu
Google지도 자바 스크립트 API v3을 포함한이 사이트에 얻을 오류의 가장 상세한 설명입니다? 문제를 나타내는 [mcve]를 제공해주세요. – geocodezip