I\'m using Google places API and it is returning all the places in my location. However I only want it to return a type for \"car-repair\" I think I nearly have it but I\'m
Because this API return the place type inside a scope. There is a method may improve the result but still not optimal, which is called setLatLngBounds
.The link is https://developers.google.com/android/reference/com/google/android/gms/location/places/ui/PlacePicker.IntentBuilder#public-method-summary
I have tried this API before and find it is totally a mess in some degree.
For example, if you want to find restaurant inside a university, this API will not only return you the restaurant but also many other types like University
. Setting a bound maybe be good but still get annoying result if you only use the API.
If you just want the type of car-repair
, I suggest you write a filter to filter other types and only keep car-repair type and relevant information.