第71行: | 第71行: | ||
</div> | </div> | ||
<div> | <div> | ||
− | <div>searchInCity</div> | + | <div>searchInCity(PoiCitySearchOption option)</div> |
</div> | </div> | ||
<div> | <div> | ||
<div>城市内检索</div> | <div>城市内检索</div> | ||
</div> | </div> | ||
− | </div>< | + | </div> |
+ | <div class="table_wrap_w"> | ||
+ | <div> | ||
+ | <div class="table-wrap-className">PoiCitySearchOption</div> | ||
+ | </div> | ||
+ | <div> | ||
+ | <div>city(String city)</div> | ||
+ | </div> | ||
+ | <div> | ||
+ | <div>设置检索城市</div> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="table_wrap_w"> | ||
+ | <div> | ||
+ | <div class="table-wrap-className">PoiCitySearchOption</div> | ||
+ | </div> | ||
+ | <div> | ||
+ | <div>keyword(String key)</div> | ||
+ | </div> | ||
+ | <div> | ||
+ | <div>搜索关键字</div> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="table_wrap_w"> | ||
+ | <div> | ||
+ | <div class="table-wrap-className">PoiCitySearchOption</div> | ||
+ | </div> | ||
+ | <div> | ||
+ | <div>pageNum(int pageNum)</div> | ||
+ | </div> | ||
+ | <div> | ||
+ | <div>分页编号</div> | ||
+ | </div> | ||
+ | </div> | ||
<div class="table_wrap_w"> | <div class="table_wrap_w"> | ||
<div> | <div> | ||
− | <div class="table-wrap-className"> | + | <div class="table-wrap-className">PoiCitySearchOption</div> |
</div> | </div> | ||
<div> | <div> | ||
− | <div> | + | <div>pageCapacity(int pageCapacity)</div> |
</div> | </div> | ||
<div> | <div> | ||
− | <div> | + | <div>每页容量</div> |
</div> | </div> | ||
</div> | </div> | ||
<div class="table_wrap_w"> | <div class="table_wrap_w"> | ||
<div> | <div> | ||
− | <div class="table-wrap-className"> | + | <div class="table-wrap-className">PoiCitySearchOption</div> |
</div> | </div> | ||
<div> | <div> | ||
− | <div> | + | <div>scope(int scope)</div> |
</div> | </div> | ||
<div> | <div> | ||
− | <div> | + | <div>设置检索检索结果详细程度 取值为1 或空,则返回基本信息;取值为2,返回检索POI详细信息</div> |
</div> | </div> | ||
</div> | </div> | ||
<div class="table_wrap_w"> | <div class="table_wrap_w"> | ||
<div> | <div> | ||
− | <div class="table-wrap-className"> | + | <div class="table-wrap-className">PoiCitySearchOption</div> |
</div> | </div> | ||
<div> | <div> | ||
− | <div> | + | <div>poiFilter(PoiFilter poiFilter)</div> |
</div> | </div> | ||
<div> | <div> | ||
− | <div> | + | <div>检索过滤条件</div> |
</div> | </div> | ||
</div> | </div> | ||
<div class="table_wrap_w"> | <div class="table_wrap_w"> | ||
<div> | <div> | ||
− | <div class="table-wrap-className"> | + | <div class="table-wrap-className">PoiCitySearchOption</div> |
</div> | </div> | ||
<div> | <div> | ||
− | <div> | + | <div>cityLimit(boolean cityLimit)</div> |
</div> | </div> | ||
<div> | <div> | ||
− | <div> | + | <div>设置区域数据召回限制 为true时,仅召回city对应区域内数据</div> |
</div> | </div> | ||
</div> | </div> | ||
第126行: | 第159行: | ||
</div> | </div> | ||
<div> | <div> | ||
− | <div>newLatLng</div> | + | <div>newLatLng(LatLng latLng)</div> |
</div> | </div> | ||
<div> | <div> | ||
第137行: | 第170行: | ||
</div> | </div> | ||
<div> | <div> | ||
− | <div>setMapStatus</div> | + | <div>setMapStatus(MapStatusUpdate update)</div> |
</div> | </div> | ||
<div> | <div> | ||
第148行: | 第181行: | ||
</div> | </div> | ||
<div> | <div> | ||
− | <div>fromResource</div> | + | <div>fromResource(int resourceID)</div> |
</div> | </div> | ||
<div> | <div> |
2020年6月2日 (二) 15:13的版本
地点检索
功能场景
支持用户根据关键词查询出行的起终点、兴趣点等,可结合路线规划、导航等功能使用。
Android
iOS
//mapopen-website-wiki.bj.bcebos.com/demos/AndroidVideos/SVID_20200530_205921_1.mp4
1590746640|//mapopen-website-wiki.bj.bcebos.com/demos/qrcodes/地点检索.png
扫码体验
使用产品
Android地图SDK|/index.php?title=androidsdk
>
POI城市检索|/index.php?title=androidsdk/guide/search/poi
下载源码
//mapopen-pub-androidsdk.cdn.bcebos.com/map/sample/BaiduLBS_AndroidSDK_Sample.zip
核心接口
类
接口
描述
PoiSearch
searchInCity(PoiCitySearchOption option)
城市内检索
PoiCitySearchOption
city(String city)
设置检索城市
PoiCitySearchOption
keyword(String key)
搜索关键字
PoiCitySearchOption
pageNum(int pageNum)
分页编号
PoiCitySearchOption
pageCapacity(int pageCapacity)
每页容量
PoiCitySearchOption
scope(int scope)
设置检索检索结果详细程度 取值为1 或空,则返回基本信息;取值为2,返回检索POI详细信息
PoiCitySearchOption
poiFilter(PoiFilter poiFilter)
检索过滤条件
PoiCitySearchOption
cityLimit(boolean cityLimit)
设置区域数据召回限制 为true时,仅召回city对应区域内数据
MapStatusUpdateFactory
newLatLng(LatLng latLng)
创建设置地图新中心点状态
BaiduMap
setMapStatus(MapStatusUpdate update)
改变地图状态
BitmapDescriptorFactory
fromResource(int resourceID)
根据资源Id创建不适配设备像素密度的bitmap描述信息
核心代码
JAVA
// 发起请求 mPoiSearch.searchInCity((new PoiCitySearchOption()) .city(cityStr) .keyword(keyWordStr) .pageNum(mLoadIndex) // 分页编号 .cityLimit(false) .scope(scope));
复制
深色
复制成功