mapbox - Mapbox Geocoding API 中的荷兰邮政编码
问题描述
更新这是一个错误,他们修复了它!
荷兰邮政编码包含 4 位数字和 2 个字母。输入 4 位数字时,它会找到全球邮政编码位置,但是当您添加 2 个字母(对应于街道)时,响应不会返回正确的位置。
例如:1012 返回阿姆斯特丹的一般邮政编码位置。但是当您输入 1012 AW 时,它会返回完全不同的结果(甚至不同的城市)。但它应该返回 1012 邮政编码区域内的特定位置。
网址 https://api.mapbox.com/geocoding/v5/mapbox.places/ ${search}.json
参数
{
language: 'nl',
country: 'NL',
limit: 1,
access_token: config.accessToken,
types: 'address,place,poi'
}
返回的邮政编码没有两个字母数字。如何让 Mapbox 添加两个字母?
示例响应。
是 4694 但应该是 4694EG
{
"type":"FeatureCollection",
"query":[
"***",
"***"
],
"features":[
{
"id":"address.7144861498943104",
"type":"Feature",
"place_type":[
"address"
],
"relevance":0.75,
"properties":{
"accuracy":"point"
},
"text_nl":"Beatrixlaan",
"place_name_nl":"Beatrixlaan 2, 4694 Scherpenisse, Nederland",
"text":"Beatrixlaan",
"place_name":"Beatrixlaan 2, 4694 Scherpenisse, Nederland",
"center":[
4.103576,
51.546267
],
"geometry":{
"type":"Point",
"coordinates":[
4.103576,
51.546267
]
},
"address":"2",
"context":[
{
"id":"postcode.10605073597498580",
"text_nl":"4694",
"text":"4694"
},
{
"id":"place.5585596482812836",
"wikidata":"Q2381830",
"text_nl":"Scherpenisse",
"language_nl":"nl",
"text":"Scherpenisse",
"language":"nl"
},
{
"id":"region.13950781060383020",
"short_code":"NL-ZE",
"wikidata":"Q705",
"text_nl":"Zeeland",
"language_nl":"nl",
"text":"Zeeland",
"language":"nl"
},
{
"id":"country.9349515904622050",
"short_code":"nl",
"wikidata":"Q55",
"text_nl":"Nederland",
"language_nl":"nl",
"text":"Nederland",
"language":"nl"
}
]
}
],
"attribution":"NOTICE: © 2019 Mapbox and its suppliers. All rights reserved. Use of this data is subject to the Mapbox Terms of Service (https://www.mapbox.com/about/maps/). This response and the information it contains may not be retained. POI(s) provided by Foursquare."
}
解决方案
推荐阅读
- firebase - 离子:是否可以将传入的推送 FCM 推送通知从显示到我的设备上延迟到特定时间
- webpack - 在 webpack 中使用文件加载器导入更少的文件
- wix - 通过 Wix Bundle 安装 MSP 时标记为不适用
- wordpress - 如何在最新的 Wordpress Rest API v2 中获取原始值?
- php - PHP - 无法更改 php-fpm 上的 memory_limit
- javascript - 如何将javascript放入媒体查询条件中
- python - 通过 python 解析 Outlook *.msg 电子邮件中的表格
- tfs - 卸载完整应用程序和取消配置 TFS 的区别
- bots - 无需任何人工干预即可将我的 Messenger 应用程序(“bot”)添加到页面
- html - 溢出:隐藏和溢出-y:在 ul 上滚动不起作用;