[英]google nearby places api to display places types and places count
I want to display the places types first & places count while clicking on the types,i want to display the particular type only.please provide the solution for it.i am providing the screenshot my screen.every time category clicked i have to hit the google url it will not good way.please suggest me simple way to use it. 我想先显示地点类型,然后单击类型,仅显示特定类型。请提供解决方案。我将屏幕截图提供给我。每次单击类别,我都必须点击谷歌的URL将不是一个好方法。请建议我一个简单的方法来使用它。
This is very simple ...try this code: 这非常简单...尝试以下代码:
StringBuilder url = new StringBuilder("https://maps.googleapis.com/maps/api/place/nearbysearch/json?");
url.append("location=" + latLng.latitude + "," + latLng.longitude);
url.append("&radius=5000");
url.append("&types=" + "gas_station");
url.append("&sensor=true");
url.append("&key=your key");
here i used gas_station
, you can use as per your need 在这里我使用了
gas_station
,您可以根据需要使用
use this api in each option and just change &types=""
according to your options. 在每个选项中使用此api,然后根据您的选项更改
&types=""
。
for supported types you have to refer this link 对于受支持的类型,您必须参考此链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.