public class SearchParam extends java.lang.Object implements ParamObject
指定城市的地点搜索:如在北京搜索餐馆; 圆形区域搜索:一般用于指定位置的周边(附近)地点搜索:如,搜索颐和园附近的酒店; 矩形区域的地点搜索:在地图应用中,往往用于视野内搜索,因为显示地图的区域是个矩形。
Modifier and Type | Class and Description |
---|---|
static class |
SearchParam.Nearby
周边搜索(圆形范围):
boundary=nearby(lat,lng(中心坐标),radius(半径/米)[, auto_extend])
|
static class |
SearchParam.Rectangle
矩形区域范围
示例:boundary=rectangle(lat,lng[左下,西南], lat,lng[右上,东北]) |
static class |
SearchParam.Region
指定地区名称,默认不自动扩大范围
示例:boundary=region(city[,auto_extend][,lat,lng])
|
Constructor and Description |
---|
SearchParam() |
SearchParam(java.lang.String keyword,
com.tencent.lbssearch.object.param.SearchParam.Boundary boundary)
创建搜索参数请求
|
Modifier and Type | Method and Description |
---|---|
SearchParam |
boundary(com.tencent.lbssearch.object.param.SearchParam.Boundary boundary)
搜索地理范围
|
RequestParams |
buildParameters()
构造参数
|
boolean |
checkParams()
检查参数是否完整
|
SearchParam |
filter(java.lang.String... values)
筛选条件
|
SearchParam |
keyword(java.lang.String keyword)
POI搜索关键字,用于全文检索字段
|
SearchParam |
orderby(boolean asce)
设置排序方式
|
SearchParam |
page_index(int page_index)
Deprecated.
|
SearchParam |
page_size(int pagesize)
Deprecated.
|
SearchParam |
pageIndex(int page_index)
第x页,默认第1页
|
SearchParam |
pageSize(int pagesize)
每页条目数,最大限制为20条。
|
SearchParam |
region(SearchParam.Region region)
Deprecated.
已废弃
|
public SearchParam()
public SearchParam(java.lang.String keyword, com.tencent.lbssearch.object.param.SearchParam.Boundary boundary)
keyword
- POI搜索关键字,用于全文检索字段boundary
- 边界类型,可传入以下对象:Rectangle || Nearby || Regionpublic SearchParam keyword(java.lang.String keyword)
public SearchParam boundary(com.tencent.lbssearch.object.param.SearchParam.Boundary boundary)
boundary
- 边界类型,
可传入以下对象:Rectangle || Nearby || Regionpublic SearchParam filter(java.lang.String... values)
values
- 示例取值范围:http://lbs.qq.com/webservice_v1/guide-appendix.htmlpublic SearchParam orderby(boolean asce)
asce
- 是否按照距离升序排列public SearchParam pageSize(int pagesize)
public SearchParam page_size(int pagesize)
pageSize(int)
public SearchParam pageIndex(int page_index)
public SearchParam page_index(int page_index)
pageIndex(int)
public SearchParam region(SearchParam.Region region)
region
- public boolean checkParams()
checkParams
in interface ParamObject
public RequestParams buildParameters()
buildParameters
in interface ParamObject