Google geo API

Google geo API
http://ditu.google.com/maps/geo?output=json&oe=utf-8&q=要查的地址

/**
 * a positive response:
 * 
 * 
 {
    "name": "上海金桥开发区",
    "Status": {
        "code": 200,
        "request": "geocode"
    },
    "Placemark": [
        {
            "id": "p1",
            "address": "中国上海市浦东新区金桥开发\r\r\n区",
            "AddressDetails": {
                "Country": {
                    "CountryNameCode": "CN",
                    "CountryName": "中国",
                    "Locality": {
                        "LocalityName": "上海\r\r\n市",
                        "DependentLocality": {
                            "DependentLocalityName": "浦东新区",
                            "AddressLine": [
                                "金桥开发区"
                            ]
                        }
                    }
                },
                "Accuracy": 9
            },
            "Point": {
                "coordinates": [
                    121.588633,
                    31.240829,
                    0
                ]
            }
        },
        {
            "id": "p2",
            "address": "中国上海市浦东新区浦东金桥开发\r\r\n区",
            "AddressDetails": {
                "Country": {
                    "CountryNameCode": "CN",
                    "CountryName": "中国",
                    "Locality": {
                        "LocalityName": "上海\r\r\n市",
                        "DependentLocality": {
                            "DependentLocalityName": "浦东新区",
                            "AddressLine": [
                                "浦东金桥开发区"
                            ]
                        }
                    }
                },
                "Accuracy": 9
            },
            "Point": {
                "coordinates": [
                    121.588633,
                    31.240829,
                    0
                ]
            }
        }
    ]
}

a negetive response:

{
    "name": "东西打点",
    "Status": {
        "code": 602,
        "request": "geocode"
    }
}

你可能感兴趣的:(Google geo API)