Class Info |
|---|
public class TextSearchRequest 基于关键字搜索的请求对象。 |
Qualifier and Type |
Method Name and Description |
|---|---|
String |
获取地点的国家/地区码。 |
| 获取返回地点的华为POI类型。 |
|
String |
获取用于关键字搜索结果的语种。 |
| 获取搜索结果偏向的经纬度。 |
|
Integer |
获取当前页数。 |
Integer |
获取每页的记录数。 |
| 获取返回地点的POI类型。 |
|
String |
获取政治观点。 注意:
该接口已废弃。 |
String |
getQuery() 获取搜索关键字。 |
Integer |
获取搜索半径。 |
List<String> |
获取当前设置的多个国家码。 |
boolean |
判断是否查询子节点。 |
void |
setChildren(boolean children) 设置是否返回子节点。 |
void |
setCountryCode(String countryCode) 设置地点的国家/地区码。 |
void |
setHwPoiType(HwLocationType hwPoiType) 设置返回地点的华为POI类型。 |
void |
setLanguage(String language) 设置搜索结果返回的语言。 |
void |
setLocation(Coordinate location) 设置搜索结果偏向的经纬度。 |
void |
setPageIndex(Integer pageIndex) 设置当前页数。 |
void |
setPageSize(Integer pageSize) 设置每页的记录数。 |
void |
setPoiType(LocationType poiType) 设置返回地点的POI类型。 |
void |
setPoliticalView(String politicalView) 设置政治观点。 注意:
该接口已废弃。 |
void |
setQuery(String query) 设置搜索关键字。 |
void |
setRadius(Integer radius) 设置搜索半径。 |
void |
setCountries(List<String> countries) 设置多个国家码。 |
Method |
|---|
public String getCountryCode() 您调用此API可以获取地点的国家/地区码。 |
Returns
Type |
Description |
|---|---|
String |
国家/地区码,在指定的国家内搜索,采用ISO 3166-1 alpha-2。 |
Method |
|---|
public HwLocationType getHwPoiType() 您调用此API可以获取返回地点的华为POI类型。 |
Returns
Type |
Description |
|---|---|
地点的华为POI类型。 |
Method |
|---|
public String getLanguage() 您调用此API可以获取用于关键字搜索结果的语种。 |
Returns
Type |
Description |
|---|---|
String |
用于关键字搜索结果的语种。 |
Method |
|---|
public Coordinate getLocation() 您调用此API可以获取搜索结果偏向的经纬度。 |
Returns
Type |
Description |
|---|---|
搜索结果偏向的经纬度。 |
Method |
|---|
public Integer getPageIndex() 您调用此API可以获取当前页数。 |
Returns
Type |
Description |
|---|---|
Integer |
当前页数。 |
Method |
|---|
public Integer getPageSize() 您调用此API可以获取每页的记录数。 |
Returns
Type |
Description |
|---|---|
Integer |
每页的记录数。 |
Method |
|---|
public LocationType getPoiType() 您调用此API可以获取返回地点的POI类型。 |
Returns
Type |
Description |
|---|---|
地点的POI类型。 |
该接口已废弃。
Method |
|---|
public String getPoliticalView() 您调用此API可以获取政治观点。 |
Returns
Type |
Description |
|---|---|
String |
政治观点。 |
Method |
|---|
public String getQuery() 您调用此API可以获取搜索关键字。 |
Returns
Type |
Description |
|---|---|
String |
搜索关键字。 |
Method |
|---|
public Integer getRadius() 您调用此API可以获取搜索半径。 |
Returns
Type |
Description |
|---|---|
Integer |
搜索半径,单位:米。 |
Method |
|---|
public List<String> getCountries() 您调用此API可以获取当前设置的多个国家码。 |
Returns
Type |
Description |
|---|---|
List<String> |
国家码列表。 |
Method |
|---|
public boolean isChildren() 您调用此API判断是否查询子节点。 |
Returns
Type |
Description |
|---|---|
boolean |
默认值为false。 |
Method |
|---|
public void setChildren(boolean children) 您调用此API可以设置是否返回子节点。 |
Parameters
Name |
Description |
|---|---|
children |
是否返回子节点。
默认值为false。 |
Method |
|---|
public void setCountryCode(String countryCode) 您调用此API可以设置地点的国家/地区码。 |
Parameters
Name |
Description |
|---|---|
countryCode |
国家/地区码,在指定的国家内搜索,采用ISO 3166-1 alpha-2。 |
Method |
|---|
public void setHwPoiType(HwLocationType hwPoiType) 您调用此API可以设置返回地点的华为POI类型。 |
Parameters
Name |
Description |
|---|---|
hwPoiType |
华为POI类型,推荐使用该类型。 说明:
如果同时设置了hwPoiType和poiType,搜索结果优先符合hwPoiType。 |
Method |
|---|
public void setLanguage(String language) 您调用此API可以设置搜索结果返回的语言。 |
Parameters
Name |
Description |
|---|---|
language |
搜索结果返回的语言,取值范围参见支持的语言的语种代码。如果不传,返回地点的当地语言。 |
Method |
|---|
public void setLocation(Coordinate location) 您调用此API可以设置搜索结果偏向的经纬度。 |
Parameters
Name |
Description |
|---|---|
location |
搜索结果偏向的经纬度。 |
Method |
|---|
public void setPageIndex(Integer pageIndex) 您调用此API可以设置当前页数。 |
Parameters
Name |
Description |
|---|---|
pageIndex |
当前页数。取值范围:[1, 60],默认1。 说明:
pageIndex * pageSize<=60 |
Method |
|---|
public void setPageSize(Integer pageSize) 您调用此API可以设置每页的记录数。 |
Parameters
Name |
Description |
|---|---|
pageSize |
每页的记录数。取值范围:[1, 20],默认20。 说明:
pageIndex * pageSize<=60 |
Method |
|---|
public void setPoiType(LocationType poiType) 您调用此API可以设置返回地点的POI类型。 |
Parameters
该接口已废弃。
Method |
|---|
public void setPoliticalView(String politicalView) 您调用此API可以设置政治观点。 |
Parameters
Name |
Description |
|---|---|
politicalView |
政治观点,采用ISO 3166-1-alpha-2规范的2位国家/地区码。 |
Method |
|---|
public void setQuery(String query) 您调用此API可以设置搜索关键字。 |
Parameters
Name |
Description |
|---|---|
query |
搜索关键字,query为必选参数。 |