How do you debug a request? Like the code below. This is javascript. And I am running through firebug. But I never get anything on
if (status == google.maps.GeocoderStatus.OK)
To check the status. So the call goes out. And nothing back. How can someone debug this? Is there some other way to get an error code?
thank you
function codeAddress() {
geocoder = new google.maps.Geocoder();
service = new google.maps.DistanceMatrixService();
var address = document.getElementById("storeAddress").value;
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
storeGeo = results[0].geometry.location;
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}
您可以使用wireshark来检查是否将请求发送到接口,也可以将GET-URL字符串XESSION_XDEBUG_START附加到URL。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.