代码之家  ›  专栏  ›  技术社区  ›  Parth Shah

无法使用商业帐户在Google Geocoder API上搜索地址

  •  0
  • Parth Shah  · 技术社区  · 8 年前

    请查看以下不起作用的格式URL: https://maps.googleapis.com/maps/api/geocode/xml?address=29+Esplanade%2c+St+Helier+JE2+3QA%2c+Jersey%2c+UK&sensor=false&new_forward_geocoder=true&region=UK&client=client_Id&channel=channel_ID&components=country%3aUK&signature=signature

    上述URL不适用于商业帐户。我没有提到Clint Id、signature&以上URL中的频道Id。

    Url: https://maps.googleapis.com/maps/api/geocode/xml?address=29+esplanade+st+helier

    你能提供一些选择吗?我的方法有什么错?如果你需要我提供更多细节来解决这个问题,请告诉我。

    提前谢谢。

    2 回复  |  直到 8 年前
        1
  •  1
  •   sangram parmar    8 年前

    29 Esplanade, St Helier JE2 3QA, Jersey, UK “不是英国的一部分( Jersey is not part of the United Kingdom ),并且在应用过滤器时 country:UK 未显示地址。

    1) 将组件查询从更改为 country:JE

    https://maps.googleapis.com/maps/api/geocode/xml?address=29+Esplanade%2c+St+Helier+JE2+3QA%2c+Jersey%2c+UK&sensor=false&new_forward_geocoder=true&region=UK&client=client_Id&channel=channel_ID&components=country%3aJE&signature=signature

    注意:您也可以删除 The component filters 从url查询。 组件过滤器 region 不会完全限制结果。你可以在 google here