jquery 获取jason的问题
本帖最后由 jellday 于 2013-11-07 18:24:31 编辑
{
"results" : [
{
"address_components" : [
{
"long_name" : "LS2",
"short_name" : "LS2",
"types" : [ "postal_code_prefix", "postal_code" ]
},
{
"long_name" : "Leeds",
"short_name" : "Leeds",
"types" : [ "locality", "political" ]
},
{
"long_name" : "West Yorkshire",
"short_name" : "West York",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "United Kingdom",
"short_name" : "GB",
"types" : [ "country", "political" ]
},
{
"long_name" : "Leeds",
"short_name" : "Leeds",
"types" : [ "postal_town" ]
}
],
"formatted_address" : "Leeds, West Yorkshire LS2, UK",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 53.8127,
"lng" : -1.5303786
},
"southwest" : {
"lat" : 53.7936373,
"lng" : -1.5654246
}
},
"location" : {
"lat" : 53.8055355,
"lng" : -1.5551816
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 53.8127,
"lng" : -1.5303786
},
"southwest" : {
"lat" : 53.7936373,
"lng" : -1.5654246
}
}
},
"types" : [ "postal_code_prefix", "postal_code" ]
}
],
"status" : "OK"
}
$.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address=ls22nd&sensor=false',function(data){
alert(data.status);
});