Google 地点的搜索功能检索的数据与 Google 地图的数据不同

Google Places' Search Functionality Is Not Retrieving The Same Data As Google Maps'

我已经实现了 Google 个地方 API。如果我在 Google 地图中搜索 "Cafes near my location",我会得到一个结果列表,而当我对 Google 地点执行相同的搜索时,我会得到 0 个结果。

我还在 Google Places 的实现中使用了 Place.TYPE_CAFE PlaceFilter(即咖啡馆过滤器),尽管至少有 returns 0 个咖啡馆结果当我搜索 "Cafes near my location"

时,根据 Google 地图,在我所在位置 0.5 英里范围内有 2 家咖啡馆

这是我使用 Places.PlaceDetectionApi

实现的 PlaceFilter
     ArrayList<Integer> placeType = new ArrayList<Integer>();
     placeType.add(Integer.parseInt(""+Place.TYPE_CAFE));

    PlaceFilter placeFilter = new PlaceFilter(placeType,false,null,null) ;

    PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi
            .getCurrentPlace(mGoogleApiClient, placeFilter);
    result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {
        @Override
        public void onResult(PlaceLikelihoodBuffer likelyPlaces) {
            for (PlaceLikelihood placeLikelihood : likelyPlaces) {
                Log.i("placesAPI", String.format("Place '%s' has likelihood: %g",
                        placeLikelihood.getPlace().getName(),
                        placeLikelihood.getLikelihood()));
            }
            likelyPlaces.release();
        }
    })

问题简而言之:如何使 Google 地方的搜索功能 return 与 Google 地图的搜索功能一样多?

如果您需要更多代码,请告诉我,

提前致谢

您可以在 Google Places API for Android and you can also get palces near by your location using Google Place API 中使用地点自动完成服务。自动完成 returns 放置预测以响应用户搜索查询。当用户键入时,自动完成服务 returns 会为感兴趣的地点提供建议。

这是使用 Google 地点 API 和 Google 地图 Android V2 显示附近地点的示例教程:http://wptrafficanalyzer.in/blog/showing-nearby-places-using-google-places-api-and-google-map-android-api-v2/

Google 地点 API 可能在我提出这个问题后有所改善,但解决此问题的一种方法是使用 Google 地图网络 API。