//调用 google weather api ,返回一个当地天气列表的 xml文件 //var strURL="http://www.google.com/ig/api?hl=zh-cn&weather=,,,"+point.lat()*1000000+","+point.lng()*1000000; var strURL = "Weather.aspx?lat=" + point.lat()*1000000+"&lng="+point.lng()*1000000;
var xmlDoc= new ActiveXObject("MSXML2.DOMDocument");
try { request.open("GET",strURL,false); request.send(); xmlDoc.loadXML(request.responseText); } catch(err) { return ""; }
本机调试没问题,可找了个服务器却不支持.net2,效果出不来,更晕! :( 参考: