为什么 HERE 地理编码器 API 会得到 return 与 HERE 地图搜索不同的结果?
Why does HERE geocoder API come return different results than HERE maps search?
给定一个示例地址,我从 HERE Geocoder API 返回了一个不准确的结果。但是,如果我在 HERE 地图网站 (https://maps.here.com/) 中输入相同的地址字符串,它似乎会正确放置地址。
HERE 地图网站没有使用相同的后端定位服务吗?
我的示例字符串:800 W Miner St, West Chester, PA 19382
如果您转到地图站点并搜索该字符串,它会在 Google 放置它的位置附近返回。但是 Geocoder API 返回下面的通用 "center of the city sort of near the street" 响应。
我会把它归结为错误的输入并继续,但奇怪的是地图网站返回的结果与 API 不同 - 我认为他们会做类似的工作。
来自 API 浏览器的 JSON 响应 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 用于地图站点查找位置的方法?或者有什么方法可以调和这两个不同的结果?
here.com 是一个定制的应用程序,我相信为了提供建议 here.com 首先使用 Places API 而不是 Geocoder
给定一个示例地址,我从 HERE Geocoder API 返回了一个不准确的结果。但是,如果我在 HERE 地图网站 (https://maps.here.com/) 中输入相同的地址字符串,它似乎会正确放置地址。
HERE 地图网站没有使用相同的后端定位服务吗?
我的示例字符串:800 W Miner St, West Chester, PA 19382
如果您转到地图站点并搜索该字符串,它会在 Google 放置它的位置附近返回。但是 Geocoder API 返回下面的通用 "center of the city sort of near the street" 响应。
我会把它归结为错误的输入并继续,但奇怪的是地图网站返回的结果与 API 不同 - 我认为他们会做类似的工作。
来自 API 浏览器的 JSON 响应 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 用于地图站点查找位置的方法?或者有什么方法可以调和这两个不同的结果?
here.com 是一个定制的应用程序,我相信为了提供建议 here.com 首先使用 Places API 而不是 Geocoder