次のスクリプトは 2 週間前に XAMPP で動作していましたが、今日は動作しません。
var url = 'http://maps.googleapis.com/maps/api/directions/xml?origin=Chicago,IL&destination=Los+Angeles,CA&waypoints=Joplin,MO|Oklahoma+City,OK&sensor=false';
$.ajax({
type: "GET",
url: url,
dataType: "xml",
async: false,
success: function(xml) {
$(xml).find("route").each(function(){
var startaddresss = $(this).find('start_address').text();
alert(startaddresss);
});
}
});
XML を XAMPP に保存して AJAX から呼び出すと、正常に動作します。この2週間で何が変わった?
ありがとう