i want to get google place bounding box. i am getting viewports by using google places api but viewports do not give desired co-ordinates, actually i want to trigger some function when user entered in place, e.g when user enter in hotel
this is what i am doing
Places.GeoDataApi.getPlaceById(googleApiClientPlaces, "dummyPlaceID").setResultCallback(new ResultCallback<PlaceBuffer>()
{
@Override
public void onResult(@NonNull PlaceBuffer places)
{
if (places.getStatus().isSuccess() && places.getCount() > 0)
{
Place place = places.get(0);
LatLngBounds latLngBounds = place.getViewport();
// check is user withing place bounds
/*if(currentLocation.within(latLngBounds))
{
// do something
}*/
}
places.release();
}
});