Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/201.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在不使用搜索词的情况下获取附近的位置_Android_Google Places Api_Google Places - Fatal编程技术网

Android 在不使用搜索词的情况下获取附近的位置

Android 在不使用搜索词的情况下获取附近的位置,android,google-places-api,google-places,Android,Google Places Api,Google Places,我正试图找到一种方法,使用GooglePlacesAPI返回给定区域中的位置列表(当前位置在中间)。我最接近实现这一目标的方法是使用GeoDataApi.getautocompletedpredictions。但是,这需要一个搜索词字符串(就像用户键入搜索一样),空字符串返回0个结果。我想要一种返回给定区域中所有位置的方法,而不必使用任何搜索词来缩小范围 我还尝试了PlaceDetectionApi.getCurrentPlace,它返回附近的位置,不需要搜索词,但您无法控制区域,而且范围似乎非

我正试图找到一种方法,使用GooglePlacesAPI返回给定区域中的位置列表(当前位置在中间)。我最接近实现这一目标的方法是使用
GeoDataApi.getautocompletedpredictions
。但是,这需要一个搜索词字符串(就像用户键入搜索一样),空字符串返回0个结果。我想要一种返回给定区域中所有位置的方法,而不必使用任何搜索词来缩小范围

我还尝试了
PlaceDetectionApi.getCurrentPlace
,它返回附近的位置,不需要搜索词,但您无法控制区域,而且范围似乎非常小(由于该方法的用途,这是意料之中的)

使用web API似乎是可能的,但我找不到如何在Android API中实现这一点。有可能吗

我还应该补充一点,我不希望在地图中出现这种情况(因此我不能使用
PlacePicker
);我正在建立一个自定义的地点列表