谷歌地图如何显示包含特定单词的位置(Android studio)?
我目前在谷歌地图公司工作,寻找特定的地点 我尝试使用PlaceType,但它只包括一般的词,如餐厅等 我想做一个搜索功能,可以搜索特定的单词或名称的地方谷歌地图如何显示包含特定单词的位置(Android studio)?,android,google-maps,google-api,Android,Google Maps,Google Api,我目前在谷歌地图公司工作,寻找特定的地点 我尝试使用PlaceType,但它只包括一般的词,如餐厅等 我想做一个搜索功能,可以搜索特定的单词或名称的地方 public void showPlaceInformation(LatLng location) { mMap.clear(); if (previous_marker != null) previous_marker.clear(); new NRPlaces.Builder()
public void showPlaceInformation(LatLng location)
{
mMap.clear();
if (previous_marker != null)
previous_marker.clear();
new NRPlaces.Builder()
.listener(MainActivity.this)
.key("Key")
.latlng(location.latitude, location.longitude)
.radius(500)
.type(PlaceType.RESTAURANT)
.build()
.execute();
}
代码运行得很好,但PlaceType非常有限。所以我想更改代码以找到特定的位置。试试这个
new NRPlaces.Builder()
.listener(MainActivity.this)
.key("Key")
.latlng(location.latitude, location.longitude)
.radius(500)
.keyword("Restaurant")
.type(null)
.build()
.execute();
您是否尝试过使用setKeyword(“餐厅”),并将设置类型更改为null.type(null)?您能否解释更多细节?