2015-06-16 51 views
5

我正在研究andorid google地方api自動完成,一切正常,但是當我設置自定義LatLongBounds來限制搜索到GoogleApiClient對象的特定區域時,返回的結果不在那邊界。我不是我做錯了什麼。這就是我正在做的。Google Places API(Android)LatLongBounds不工作

LatLngBounds bounds = new LatLngBounds(new LatLng(24.85764939832254,67.0641630948748), new LatLng(24.866642601677466,67.07407490512522)); 
LatLng northeast = bounds.northeast; 
LatLng southwest = bounds.southwest; 

android.util.Log.e("North-East", northeast.toString()); 
android.util.Log.e("South-West", southwest.toString()); 

mAdapter = new PlaceAutocompleteAdapter(getActivity(), android.R.layout.simple_list_item_1, GoogleApiClientHelper.get(getActivity()).getGoogleApiClient(), bounds, null); 
mAutocompleteView.setAdapter(mAdapter); 

回答