com.baidu.mapapi.search.poi.PoiDetailResult Java Examples
The following examples show how to use
com.baidu.mapapi.search.poi.PoiDetailResult.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SearchInteracter.java From BmapLite with GNU General Public License v3.0 | 6 votes |
private void getPoiDetailsByBaidu(String uid, OnBaseListener listener) { mPoiSearchBaidu.setOnGetPoiSearchResultListener(new OnGetPoiSearchResultListener() { @Override public void onGetPoiResult(PoiResult poiResult) { } @Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { } @Override public void onGetPoiIndoorResult(PoiIndoorResult poiIndoorResult) { } }); mPoiSearchBaidu.searchPoiDetail(new PoiDetailSearchOption().poiUid(uid)); }
Example #2
Source File: SearchInteracter.java From BmapLite with Apache License 2.0 | 6 votes |
private void getPoiDetailsByBaidu(String uid, OnBaseListener listener) { mPoiSearchBaidu.setOnGetPoiSearchResultListener(new OnGetPoiSearchResultListener() { @Override public void onGetPoiResult(PoiResult poiResult) { } @Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { } @Override public void onGetPoiIndoorResult(PoiIndoorResult poiIndoorResult) { } }); mPoiSearchBaidu.searchPoiDetail(new PoiDetailSearchOption().poiUid(uid)); }
Example #3
Source File: AddressEditDelegate.java From FastWaiMai with MIT License | 5 votes |
/** * 获取POI详情搜索结果,得到searchPoiDetail返回的搜索结果 * V5.2.0版本之后,该方法废弃,使用{@link #onGetPoiDetailResult(PoiDetailSearchResult)}代替 * * @param poiDetailResult POI详情检索结果 */ @Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { if (poiDetailResult.error != SearchResult.ERRORNO.NO_ERROR) { Toast.makeText(getContext(), "抱歉,未找到结果", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(getContext(), poiDetailResult.getName() + ": " + poiDetailResult.getAddress(), Toast.LENGTH_SHORT).show(); } }
Example #4
Source File: MainActivity.java From BaiDuMapSelectDemo with Apache License 2.0 | 5 votes |
/** * 获取POI详情搜索结果,得到searchPoiDetail返回的搜索结果 * V5.2.0版本之后,该方法废弃,使用{@link #onGetPoiDetailResult(PoiDetailSearchResult)}代替 * * @param poiDetailResult POI详情检索结果 */ @Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { if (poiDetailResult.error != SearchResult.ERRORNO.NO_ERROR) { Toast.makeText(mContext, "抱歉,未找到结果", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(mContext, poiDetailResult.getName() + ": " + poiDetailResult.getAddress(), Toast.LENGTH_SHORT).show(); } }
Example #5
Source File: MainActivity.java From MoveMapLocation with Apache License 2.0 | 5 votes |
/** * 输入框监听---输入完毕 * * @param s */ @Override public void afterTextChanged(Editable s) { if (s.length() == 0 || "".equals(s.toString())) { searchPois.setVisibility(View.GONE); } else { //创建PoiSearch实例 PoiSearch poiSearch = PoiSearch.newInstance(); //城市内检索 PoiCitySearchOption poiCitySearchOption = new PoiCitySearchOption(); //关键字 poiCitySearchOption.keyword(s.toString()); //城市 poiCitySearchOption.city(city); //设置每页容量,默认为每页10条 poiCitySearchOption.pageCapacity(10); //分页编号 poiCitySearchOption.pageNum(1); poiSearch.searchInCity(poiCitySearchOption); //设置poi检索监听者 poiSearch.setOnGetPoiSearchResultListener(new OnGetPoiSearchResultListener() { //poi 查询结果回调 @Override public void onGetPoiResult(PoiResult poiResult) { List<PoiInfo> poiInfos = poiResult.getAllPoi(); PoiSearchAdapter poiSearchAdapter = new PoiSearchAdapter(MainActivity.this, poiInfos, locationLatLng); searchPois.setVisibility(View.VISIBLE); searchPois.setAdapter(poiSearchAdapter); } //poi 详情查询结果回调 @Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { } }); } }
Example #6
Source File: SearchInteracter.java From BmapLite with GNU General Public License v3.0 | 4 votes |
private void searchPoiNearbyByBaidu(MyPoiModel nearby, String keyword, int page, final OnSearchResultListener listener) { mPoiSearchBaidu.setOnGetPoiSearchResultListener(new OnGetPoiSearchResultListener() { @Override public void onGetPoiResult(PoiResult poiResult) { if (null != poiResult && null != poiResult.getAllPoi() && !poiResult.getAllPoi().isEmpty()) { List<MyPoiModel> list = new ArrayList<>(); for (PoiInfo poi : poiResult.getAllPoi()) { MyPoiModel myPoi = new MyPoiModel(mType); myPoi.setCity(poi.city); myPoi.setUid(poi.uid); myPoi.setAddress(poi.address); myPoi.setName(poi.name); myPoi.setInfo(poi.phoneNum); if (null != poi.location) { myPoi.setLatitude(poi.location.latitude); myPoi.setLongitude(poi.location.longitude); } if (poi.type == PoiInfo.POITYPE.BUS_LINE) { myPoi.setTypePoi(TypePoi.BUS_LINE); } else if (poi.type == PoiInfo.POITYPE.SUBWAY_LINE) { myPoi.setTypePoi(TypePoi.SUBWAY_LINE); } else if (poi.type == PoiInfo.POITYPE.BUS_STATION) { myPoi.setTypePoi(TypePoi.BUS_STATION); } else if (poi.type == PoiInfo.POITYPE.SUBWAY_STATION) { myPoi.setTypePoi(TypePoi.SUBWAY_STATION); } else if (poi.type == PoiInfo.POITYPE.POINT) { myPoi.setTypePoi(TypePoi.POINT); } list.add(myPoi); } listener.setSearchResult(list); listener.onShowData("search"); } else { listener.onNoData("search"); } } @Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { } @Override public void onGetPoiIndoorResult(PoiIndoorResult poiIndoorResult) { } }); mPoiSearchBaidu.searchNearby(new PoiNearbySearchOption().location(new LatLng(nearby.getLatitude(), nearby.getLongitude())).keyword(keyword).radius(20000).sortType(PoiSortType.distance_from_near_to_far).pageNum(page).pageCapacity(20)); }
Example #7
Source File: SearchInteracter.java From BmapLite with Apache License 2.0 | 4 votes |
private void searchPoiNearbyByBaidu(MyPoiModel nearby, String keyword, int page, final OnSearchResultListener listener) { mPoiSearchBaidu.setOnGetPoiSearchResultListener(new OnGetPoiSearchResultListener() { @Override public void onGetPoiResult(PoiResult poiResult) { if (null != poiResult && null != poiResult.getAllPoi() && !poiResult.getAllPoi().isEmpty()) { List<MyPoiModel> list = new ArrayList<>(); for (PoiInfo poi : poiResult.getAllPoi()) { MyPoiModel myPoi = new MyPoiModel(mType); myPoi.setCity(poi.city); myPoi.setUid(poi.uid); myPoi.setAddress(poi.address); myPoi.setName(poi.name); myPoi.setInfo(poi.phoneNum); if (null != poi.location) { myPoi.setLatitude(poi.location.latitude); myPoi.setLongitude(poi.location.longitude); } if (poi.type == PoiInfo.POITYPE.BUS_LINE) { myPoi.setTypePoi(TypePoi.BUS_LINE); } else if (poi.type == PoiInfo.POITYPE.SUBWAY_LINE) { myPoi.setTypePoi(TypePoi.SUBWAY_LINE); } else if (poi.type == PoiInfo.POITYPE.BUS_STATION) { myPoi.setTypePoi(TypePoi.BUS_STATION); } else if (poi.type == PoiInfo.POITYPE.SUBWAY_STATION) { myPoi.setTypePoi(TypePoi.SUBWAY_STATION); } else if (poi.type == PoiInfo.POITYPE.POINT) { myPoi.setTypePoi(TypePoi.POINT); } list.add(myPoi); } listener.setSearchResult(list); listener.onShowData("search"); } else { listener.onNoData("search"); } } @Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { } @Override public void onGetPoiIndoorResult(PoiIndoorResult poiIndoorResult) { } }); mPoiSearchBaidu.searchNearby(new PoiNearbySearchOption().location(new LatLng(nearby.getLatitude(), nearby.getLongitude())).keyword(keyword).radius(20000).sortType(PoiSortType.distance_from_near_to_far).pageNum(page).pageCapacity(20)); }
Example #8
Source File: LocationActivity.java From imsdk-android with MIT License | 4 votes |
@Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { }
Example #9
Source File: MyPoiSearchListener.java From AndroidAnimationExercise with Apache License 2.0 | 4 votes |
@Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { Log.e("onGetPoiDetailResult", "--------->" + poiDetailResult); }
Example #10
Source File: LocationDelegate.java From FastWaiMai with MIT License | 2 votes |
@Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { }
Example #11
Source File: SetFavoriteMapActivity.java From AssistantBySDK with Apache License 2.0 | 2 votes |
@Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { }
Example #12
Source File: NaviConfirmPointActivity.java From AssistantBySDK with Apache License 2.0 | 2 votes |
@Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { }
Example #13
Source File: TrafficShowPresenter.java From AssistantBySDK with Apache License 2.0 | 2 votes |
@Override public void onGetPoiDetailResult(PoiDetailResult poiDetailResult) { }
Example #14
Source File: BusActivity.java From BaiduMap-TrafficAssistant with MIT License | 2 votes |
@Override public void onGetPoiDetailResult(PoiDetailResult result) { }