Geocoder API China - BETA Developer's Guide

Location for an Address in an Area

The user wants to retrieve the latitude, longitude and the complete address details of 'W Chang'an St, Beijing, People's Republic of China' by searching for 'Chang'an St' with a given viewport.

Request

The following GET request uses the parameter searchtext to specify the encoded value of the free-form address and the parameter mapview to define the area in which to search.

https://geocoder.hereapi.cn/6.2/geocode.json
  ?app_id={YOUR_APP_ID}
  &app_code={YOUR_APP_CODE}
  &searchtext=West%20Chang'an%20st
  &language=zh-CN
  &mapview=40.0713628%2C116.1545658%3B39.7300201%2C116.6159916

Response

The response to the request contains the following information blocks:
  • metadata about the request
  • information about each address that matches the address information in the mapview, including
    • match quality
    • location information
    • address information
{
  "Response": {
  "MetaInfo": {
    "Timestamp": "2018-11-30T10:47:17.345+0000"
  },
  "View": [
    {
    "_type": "SearchResultsViewType",
    "ViewId": 0,
    "Result": [
      {
      "Relevance": 1,
      "Distance": 1116.8,
      "MatchLevel": "street",
      "MatchQuality": {
        "Street": [
        1
        ]
      },
      "Location": {
        "LocationId": "NT_hwkRqFqgkXdMuhc.xlL0wC",
        "LocationType": "address",
        "DisplayPosition": {
        "Latitude": 39.9076499,
        "Longitude": 116.39472
        },
        "NavigationPosition": [
        {
          "Latitude": 39.9076499,
          "Longitude": 116.39472
        }
        ],
        "MapView": {
        "TopLeft": {
          "Latitude": 39.90773,
          "Longitude": 116.39174
        },
        "BottomRight": {
          "Latitude": 39.90751,
          "Longitude": 116.39756
        }
        },
        "Address": {
        "Label": "中国北京市西 长安街",
        "Country": "CHN",
        "State": "北京市",
        "City": "北京市",
        "Street": "西 长安街",
        "AdditionalData": [
          {
          "value": "中国",
          "key": "CountryName"
          },
          {
          "value": "北京市",
          "key": "StateName"
          }
        ]
  ...
  }
}