Tag: geocoding

使用jquery.getJson和Google的GeoCoding HTTP服务

Google提供了一个出色的REST界面,用于对地址进行地理编码和反向地理编码。 我的API密钥有效,如果我直接在浏览器地址中输入请求,它的效果很好。 然而,以下jquery失败可怕,我没有理解为什么。 希望你能在这里帮助我。 $.getJSON(“http://maps.google.com/maps/geo?q=”+ address+”&key=”+apiKey+”&sensor=false&output=json”, function(data, textStatus){ console.log(data); }); Google针对此服务的REST界面文档: http : //code.google.com/apis/maps/documentation/geocoding/index.html