为什么HERE地理编码器API返回的结果与HERE地图搜索不同? [英] Why does HERE geocoder API come return different results than HERE maps search?

查看:78
本文介绍了为什么HERE地理编码器API返回的结果与HERE地图搜索不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给出一个示例地址,我从HERE Geocoder API中获得了不正确的结果.但是,如果我在HERE地图网站上输入相同的地址字符串( https://maps.here.com/),它似乎可以正确放置地址.

Given a sample address, I get back an inaccurate result from the HERE Geocoder API. However, if I enter that same address string into the HERE maps website (https://maps.here.com/), it appears to place the address correctly.

HERE Maps网站是否未使用相同的后端定位服务?

Is the HERE maps website not using the same back end location services?

我的示例字符串:宾夕法尼亚州西切斯特,W Miner St 800 W,邮政编码19382

如果您转到地图站点并搜索该字符串,它将返回到Google放置位置附近的位置.但是,Geocoder API随即返回了以下通用的城市中心附近的街道"响应.

If you go to the maps site and search for that string it comes back somewhat near where Google places it. But the Geocoder API comes back with a generic "center of the city sort of near the street" response below.

我会把它归结为错误的输入并继续前进,但是奇怪的是,地图网站返回的结果与API的结果不同-我以为他们会做类似的工作.

I would chalk it up to a bad input and move on, but it's strange the maps website comes back with a different result than the API - I would assume they would be doing similar work.

来自API资源管理器的JSON响应 https://developer.here.com/api-explorer/rest/geocoder/latitude-longitude-no-attributes

The JSON response from the API explorer https://developer.here.com/api-explorer/rest/geocoder/latitude-longitude-no-attributes

{
  "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,但是地图站点正在查找位置?还是可以调和这两种不同结果的方法?

Is there an API for however the maps site is finding locations? Or any way to reconcile these two different results?

推荐答案

here.com是一个自定义应用程序,我相信为提供建议,here.com首先使用Places API而不是Geocoder

here.com is a customized application, i believe for providing suggestions here.com uses Places API first rather than Geocoder

查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆