为什么HERE地理编码器API会返回与HERE地图搜索不同的结果?

时间:2016-01-22 19:08:57

标签: here-api

给定一个示例地址,我从HERE Geocoder API中得到了一个不准确的结果。但是,如果我在HERE地图网站(https://maps.here.com/)中输入相同的地址字符串,则会显示正确的地址。

HERE地图网站是否使用相同的后端位置服务?

我的示例字符串:800 W Miner St, West Chester, PA 19382

如果你去地图网站并搜索该字符串,它会回到Google放置它的位置附近。但是Geocoder API在下面回复了一个通用的“城市中心附近的街道”响应。

我会把它归结为一个糟糕的输入并继续前进,但奇怪的是地图网站带来的结果与API不同 - 我认为他们会做类似的工作。

API资源管理器https://developer.here.com/api-explorer/rest/geocoder/latitude-longitude-no-attributes

的JSON响应
{
  "Response": {
    "MetaInfo": {
      "Timestamp": "2016-01-22T19:04:38.969+0000"
    },
    "View": [
      {
        "_type": "SearchResultsViewType",
        "ViewId": 0,
        "PerformedSearch": {
          "SearchText": "800 W Miner St, West Chester, PA 19382",
          "MetaInfo": {
            "internalUse": false,
            "Generation": 9
          },
          "RepresentationOptions": {
            "Language": [],
            "MaxResults": 10,
            "StrictLanguageMode": false,
            "SearchResponseAttributes": [
              "label",
              "didYouMeanSuggestion",
              "matchQuality",
              "matchType",
              "performedSearch"
            ],
            "PlaceAttributes": [
              "categories",
              "location",
              "supplier",
              "contact",
              "additionalData",
              "alternativeNames"
            ],
            "LocationAttributes": [
              "address",
              "mapView",
              "additionalData",
              "shape"
            ],
            "AddressAttributes": [
              "country",
              "state",
              "county",
              "city",
              "district",
              "subdistrict",
              "street",
              "houseNumber",
              "postalCode",
              "suite",
              "floor",
              "streetDetails",
              "localizedNames",
              "additionalData",
              "alternativeAttributes",
              "building"
            ]
          }
        },
        "Result": [
          {
            "Relevance": 0.82,
            "MatchLevel": "street",
            "MatchQuality": {
              "State": 1,
              "City": 1,
              "Street": [
                0.95
              ],
              "PostalCode": 1
            },
            "Location": {
              "LocationId": "NT_gJx8pmEXcMN1MhlAfdQfjD",
              "LocationType": "address",
              "DisplayPosition": {
                "Latitude": 39.96225,
                "Longitude": -75.5967
              },
              "NavigationPosition": [
                {
                  "Latitude": 39.96225,
                  "Longitude": -75.5967
                }
              ],
              "MapView": {
                "TopLeft": {
                  "Latitude": 39.96337,
                  "Longitude": -75.60351
                },
                "BottomRight": {
                  "Latitude": 39.95883,
                  "Longitude": -75.59413
                }
              },
              "Address": {
                "Label": "E Miner St, West Chester, PA 19382, United States",
                "Country": "USA",
                "State": "PA",
                "County": "Chester",
                "City": "West Chester",
                "Street": "E Miner St",
                "PostalCode": "19382",
                "AdditionalData": [
                  {
                    "value": "United States",
                    "key": "CountryName"
                  },
                  {
                    "value": "Pennsylvania",
                    "key": "StateName"
                  },
                  {
                    "value": "Chester",
                    "key": "CountyName"
                  },
                  {
                    "value": "N",
                    "key": "PostalCodeType"
                  }
                ]
              }
            }
          }
        ]
      }
    ]
  }
}

是否有一个API,但地图网站正在寻找位置?或者以任何方式调和这两种不同的结果?

1 个答案:

答案 0 :(得分:1)