“findplacefromtext返回ZERO_RESULTS”

huangapple go评论61阅读模式
英文:

findplacefromtext returns ZERO_RESULTS

问题

我在使用findplacefromtext时遇到了一些问题。这是我试图通过API查找的地方:

UnderDog Property Services https://goo.gl/maps/WFPU2gca2LbVCxFeA

然而,无论我提供什么搜索词,似乎都找不到这个地方。您有关于如何构建查询以找到这个地方的任何提示吗?

curl --location 'https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=UnderDog%20Property%20Services&inputtype=textquery&key=<>&fields=formatted_address%2Cplace_id%2Cname&language=en'

我尝试了使用locationbias进行实验,但没有成功。

英文:

I am having trouble finding a specific place using the findplacefromtext. This is the place I am trying to look up via API:

UnderDog Property Services https://goo.gl/maps/WFPU2gca2LbVCxFeA

However, no matter what search term I provide, I can't seem to find the place. Do you have any tips on how to construct a query to find the place?

curl --location 'https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=UnderDog%20Property%20Services&inputtype=textquery&key=<>&fields=formatted_address%2Cplace_id%2Cname&language=en'

I tried to experiment with locationbias but no joy.

答案1

得分: 1

纯粹的服务区业务不受 Places API 支持。

经检查,似乎 UnderDog Property Services 注册为一个没有实际地址的服务区业务 (Service Area Business, SAB)。正如您在 Google 地图 Web 应用程序中所看到的,它显示的是一个区域,而不是一个具体的位置:

“findplacefromtext返回ZERO_RESULTS”

Places API 旨在使开发人员能够帮助用户找到相关的参观地点。由于服务区业务提供的是一个区域而不是用户用于办理业务的实际位置,因此它们不包括在 Places API 中。因此,您将无法使用 Places API 与服务区业务一起使用。

如果这是您的业务,并且您的业务为客户提供服务于您的业务地址,您可以在 Google 我的业务中添加该地址。您可以查阅以下 Google 我的业务帮助中心文章以获取更多信息:https://support.google.com/business/answer/9157481。

话虽如此,目前这是一个预期行为,但已经有一个公开的功能请求要求更改它:https://issuetracker.google.com/issues/35828187(支持服务区业务)。

根据问题链接,几年前有一位 Google 员工提到:

>状态: 不会修复 (预期行为)
>
> Places API 团队已经审查了此功能请求,并决定不包括服务区业务的结果在 API 响应中。
>
> Places API 的使命是使开发人员能够帮助用户找到相关的参观地点。由于服务区业务不是用户可以参观的地方,因此不属于 Places API。
>
> 寻找服务区业务的能力已经从 https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder 中移除,以保持与 Places API 通常可用的功能一致。Google 我的业务用户仍然可以使用专用的 PlaceID 查找工具找到其服务区业务的 Place ID,网址为 https://developers.google.com/my-business/content/tools/placeid-lookup
>
> 我们承认有人需要此功能,并将在未来考虑满足这一需求。为此,我们将感谢您分享此功能对您的具体用例和业务需求将产生的影响。

因此,我建议您也为该问题加星标以获取相关更新,或者发布您的用例并为支持此功能请求投票。

希望这对您有所帮助!

英文:

Pure Service Area Businesses are not supported in Places API

Upon checking, it seems that UnderDog Property Services is registered as a Service Area Business (SAB) without a physical address. As you can see in Google Maps Web App that it shows an area instead of a specific location:

“findplacefromtext返回ZERO_RESULTS”

The Places API is designed to enable developers to help users find relevant places to visit. As Service Area Businesses serve an area, rather than a physical location customers visit to conduct business, they are not included in the Places API. As a result, you will be unable to use the Places API with Service Area Businesses.

If this is your business, and if your business serves customers at your business address, you can add that address in Google My Business. You can consult the following Google My Business Help Center article for more information about this topic: https://support.google.com/business/answer/9157481.

With that said, this is currently an Intended Behavior, but there is a public feature request to change it: https://issuetracker.google.com/issues/35828187 (Support service area businesses).

As per the issue link, one Googler mentioned a few years ago that:

>Status: Won't Fix (Intended Behavior)
>
> The Places API team has reviewed this feature request and decided
> against including Service Area Businesses results in API responses.
>
> Places API mission is to enable developers to help users find relevant
> places to visit. Since Service Area Businesses are not places users
> can visit, and therefore do not belong in the Places API.
>
> The ability to find Service Area Businesses have been removed from
> https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder
> to be consistent with the funtionality generally available in the
> Places API. Google My Business users can still find Place IDs for
> their Service Area Businesses using a dedicated PlaceID Lookup Tool at
> https://developers.google.com/my-business/content/tools/placeid-lookup
>
> We do acknowledge there is demand for this feature and will look into
> accommodating it in the future. To this end, we would appreciate if
> you shared specific use cases and business needs that this feature
> would enable for you.

So what I would suggest also is for you to star the issue to get relevant updates or post your use case and upvote it to support the feature request.

I hope this helps!

huangapple
  • 本文由 发表于 2023年6月6日 09:38:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76410916.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定