【发布时间】:2018-06-10 12:03:28
【问题描述】:
我使用此代码,我可以更改纬度和经度,但是当我运行应用程序时,应用程序不显示我的搜索详细信息
private ArrayList<MyGooglePlaces> getPredictions(String constraint)
{
//pass your current latitude and longitude to find nearby and ranky=distance means places will be found in ascending order
// according to distance
double latitude=30.7333;
double longitude=76.7794;
String API_KEY="AIzaSyByodZEsDBTC-J3brJ39JiYTkqbtJhlSKo";
String url= "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location="+latitude+","+longitude+"&rankby=distance&name="+constraint+"&key="+API_KEY;
return getPlaces(url);
我怎样才能在我附近的地方解决这个问题???
【问题讨论】:
-
你想根据你的位置获取附近的地方吗?
-
是的,我想根据我的位置获取附近的地点
-
检查我的答案。
标签: java android google-maps android-studio