本文介绍了谷歌反向地理code并不总是返回STREET_ADDRESS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个很基本的谷歌地球倒转code调用,如:

I'm making a very basic google reverse geocode call like:

......,最近(我觉得这最近开始发生的事情)我没有变回一个街道地址。例如,我总是用得到的东西是这样的:

... and lately (I feel this started happening recently) I'm not getting back a street address. For example, I always use to get something like this:

{
    "results": [
        {
            "address_components": ... ,
            "formatted_address": "1 Stockton St, San Francisco, CA 94102, USA",
            "geometry": ...,
            "types": [
                "street_address"
            ]
        },
...

现在我常常没有得到一个STREET_ADDRESS,而是得到这样的事情是最准确的反向地理code测试结果:

Now I often don't get a street_address, but instead get something like this as the most accurate reverse geocode result:

{
    "results": [
        {
            "address_components": ...,
            "formatted_address": "4th St & Market St, San Francisco, CA 94103, USA",
            "geometry": ...,
            "types": [
                "transit_station"
            ]
        },

我总是想最近的街道地址。有谁知道的一种方式,迫使谷歌地图API总是返回一个?

I always want the nearest street address. Does anyone know of a way to force google maps api to always return one?

推荐答案

谈过谷歌这个问题。没有指定你想要一个真实的街道地址的方式。

Talked to Google about this. There isn't a way to specify that you want an actual street address.

这篇关于谷歌反向地理code并不总是返回STREET_ADDRESS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 23:58