我想得到谷歌的地方边界框 . 我通过使用google places api获取视口,但视口不提供所需的坐标,实际上我想在用户输入到位时触发某些功能,例如当用户进入酒店时

这就是我在做的事情

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();
                        }
                    });