我正在使用Google的新Places SDK客户端。我想显示x半径和类型= CAFE,BANK等的位置。有什么方法可以实现?
val placesClient = Places.createClient(this)
val placeFields = arrayListOf(
Place.Field.NAME,
Place.Field.LAT_LNG
)
val request = FindCurrentPlaceRequest.builder(placeFields).build()
placesClient.findCurrentPlace(request).addOnSuccessListener { placeResponse ->
placeResponse.placeLikelihoods.forEach {
Log.i("Places", String.format("Place '%s' has likelihood: %s",
it.place.latLng.toString(),
it.place.name
))
}
}