[英]Mapbox API: How do I get a list of addresses under a given postal code?
As in the question - I have a given zip code and I need to get a list of addresses with Mapbox API就像问题一样 - 我有一个给定的邮政编码,我需要使用 Mapbox API 获取地址列表
After request for the endpoint below:在请求以下端点后:
`https://api.mapbox.com/geocoding/v5/mapbox.places/${postcode}.json?types=postcode&access_token=${mapboxToken}`
I got the following response:我得到以下回复:
[
{
"id":"postcode.17660822408923720",
"type":"Feature",
"place_type":[
"postcode"
],
"relevance":1,
"properties":{
},
"text":"HP1 3EN",
"place_name":"HP1 3EN, Hemel Hempstead, Hertfordshire, England, United Kingdom",
"matching_text":"HP13EN",
"matching_place_name":"HP13EN, Hemel Hempstead, Hertfordshire, England, United Kingdom",
"bbox":[
-0.489006,
51.760773,
-0.487601,
51.761635
],
"center":[
-0.488395,
51.7610944
],
"geometry":{
"type":"Point",
"coordinates":[
-0.488395,
51.7610944
]
},
"context":[
{
"id":"place.15727584894798730",
"wikidata":"Q3532",
"text":"Hemel Hempstead"
},
{
"id":"district.8002140812776250",
"wikidata":"Q3410",
"text":"Hertfordshire"
},
{
"id":"region.13483278848453920",
"wikidata":"Q21",
"short_code":"GB-ENG",
"text":"England"
},
{
"id":"country.12405201072814600",
"wikidata":"Q145",
"short_code":"gb",
"text":"United Kingdom"
}
]
}
]
In this response, there is nothing about the addresses under the given zip code.在此响应中,没有关于给定邮政编码下的地址。
When I specify the 'address' type in the URL query, it gets an empty array as a response.当我在 URL 查询中指定“地址”类型时,它会得到一个空数组作为响应。
`https://api.mapbox.com/geocoding/v5/mapbox.places/${postcode}.json?types=address&access_token=${mapboxToken}`
I can't find help in the Mapbox documentation , can someone help me solve this problem?我在Mapbox 文档中找不到帮助,有人可以帮我解决这个问题吗?
It sounds like you're trying to get the list of every single address within a given zipcode?听起来您正在尝试获取给定邮政编码内每个地址的列表? You can't do this with Mapbox.
你不能用 Mapbox 做到这一点。
I doubt you will find any geocoding service which allows you to do this.我怀疑您会找到任何允许您执行此操作的地理编码服务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.