Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
Class Info |
|---|
public class TextSearchRequest Represents a request object used to search for places by keyword. |
Constructor Name |
|---|
TextSearchRequest() Default constructor. |
Qualifier and Type |
Method Name and Description |
|---|---|
String |
Obtains the code of the country/region to which a place belongs. |
| Obtains the Huawei POI type of a place. |
|
String |
Obtains the language for displaying the keyword search results. |
| Obtains the longitude and latitude to which search results need to be biased. |
|
Integer |
Obtains the number of the current page. |
Integer |
Obtains the number of records on each page. |
| Obtains the POI type of a place. |
|
String |
Obtains the political view. NOTICE This method has been deprecated. |
String |
getQuery() Obtains the search keyword. |
Integer |
Obtains the search radius. |
List<String> |
Obtains multiple country or region codes that are set. |
boolean |
Checks whether to return information about child nodes. |
void |
setChildren(boolean children) Sets whether to return information about child nodes. |
void |
setCountryCode(String countryCode) Sets the country/region code for place search. |
void |
setHwPoiType(HwLocationType hwPoiType) Sets the Huawei POI type of a place. |
void |
setLanguage(String language) Sets the language for displaying the search results. |
void |
setLocation(Coordinate location) Sets the longitude and latitude to which search results need to be biased. |
void |
setPageIndex(Integer pageIndex) Sets the number of the current page. |
void |
setPageSize(Integer pageSize) Sets the number of records on each page. |
void |
setPoiType(LocationType poiType) Sets the POI type of a place. |
void |
setPoliticalView(String politicalView) Sets the political view. NOTICE This method has been deprecated. |
void |
setQuery(String query) Sets the search keyword. |
void |
setRadius(Integer radius) Sets the search radius. |
void |
setCountries(List<String> countries) Sets multiple country or region codes. |
Method |
|---|
public String getCountryCode() Obtains the code of the country/region to which a place belongs. |
Returns
Type |
Description |
|---|---|
String |
Country/Region code, which complies with ISO 3166-1 alpha-2. This parameter is used to specify the country/region where places are searched. |
Method |
|---|
public HwLocationType getHwPoiType() Obtains the Huawei POI type of a place. |
Returns
Type |
Description |
|---|---|
Method |
|---|
public String getLanguage() Obtains the language for displaying the keyword search results. |
Returns
Type |
Description |
|---|---|
String |
Language for displaying the keyword search results. |
Method |
|---|
public Coordinate getLocation() Obtains the longitude and latitude to which search results need to be biased. |
Returns
Type |
Description |
|---|---|
Longitude and latitude to which search results need to be biased. |
Method |
|---|
public Integer getPageIndex() Obtains the number of the current page. |
Returns
Type |
Description |
|---|---|
Integer |
Number of the current page. |
Method |
|---|
public Integer getPageSize() Obtains the number of records on each page. |
Returns
Type |
Description |
|---|---|
Integer |
Number of records on each page. |
Method |
|---|
public LocationType getPoiType() Obtains the POI type of a place. |
Returns
Type |
Description |
|---|---|
This method has been deprecated.
Method |
|---|
public String getPoliticalView() Obtains the political view. |
Returns
Type |
Description |
|---|---|
String |
Political view. |
Method |
|---|
public String getQuery() Obtains the search keyword. |
Returns
Type |
Description |
|---|---|
String |
Search keyword. |
Method |
|---|
public Integer getRadius() Obtains the search radius. |
Returns
Type |
Description |
|---|---|
Integer |
Search radius, in meters. |
Method |
|---|
public List<String> getCountries() Obtains multiple country or region codes that are set. |
Returns
Type |
Description |
|---|---|
List<String> |
List of country or region codes. |
Method |
|---|
public boolean isChildren() Checks whether to return information about child nodes. |
Returns
Type |
Description |
|---|---|
boolean |
true if information about child nodes is returned; false otherwise. The default value is false. |
Method |
|---|
public void setChildren(boolean children) Sets whether to return information about child nodes. |
Parameters
Name |
Description |
|---|---|
children |
Indicates whether to return information about child nodes.
The default value is false. |
Method |
|---|
public void setCountryCode(String countryCode) Sets the country/region code for place search. |
Parameters
Name |
Description |
|---|---|
countryCode |
Country/Region code, which complies with ISO 3166-1 alpha-2. This parameter is used to specify the country/region where places are searched. |
Method |
|---|
public void setHwPoiType(HwLocationType hwPoiType) Sets the Huawei POI type of a place. |
Parameters
Name |
Description |
|---|---|
hwPoiType |
Huawei POI type. This parameter is recommended. NOTE If both hwPoiType and poiType are set, search results of hwPoiType take precedence. |
Method |
|---|
public void setLanguage(String language) Sets the language for displaying the search results. |
Parameters
Name |
Description |
|---|---|
language |
Language for displaying the search results. For details, please refer to Supported Languages. If this parameter is not passed, the local language will be used. |
Method |
|---|
public void setLocation(Coordinate location) Sets the longitude and latitude to which search results need to be biased. |
Parameters
Name |
Description |
|---|---|
location |
Longitude and latitude to which search results need to be biased. |
Method |
|---|
public void setPageIndex(Integer pageIndex) Sets the number of the current page. |
Parameters
Name |
Description |
|---|---|
pageIndex |
Number of the current page. The value ranges from 1 to 60. The default value is 1. NOTE The following formula must be met: pageIndex x pageSize ≤ 60. |
Method |
|---|
public void setPageSize(Integer pageSize) Sets the number of records on each page. |
Parameters
Name |
Description |
|---|---|
pageSize |
Number of records on each page. The value ranges from 1 to 20. The default value is 20. NOTE The following formula must be met: pageIndex x pageSize ≤ 60. |
Method |
|---|
public void setPoiType(LocationType poiType) Sets the POI type of a place. |
Parameters
Name |
Description |
|---|---|
poiType |
NOTE Huawei POI types are recommended. |
This method has been deprecated.
Method |
|---|
public void setPoliticalView(String politicalView) Sets the political view. |
Parameters
Name |
Description |
|---|---|
politicalView |
Political view. The value is a two-letter country/region code complying with ISO 3166-1 alpha-2. |
Method |
|---|
public void setQuery(String query) Sets the search keyword. |
Parameters
Name |
Description |
|---|---|
query |
Search keyword. This parameter is mandatory. |
Method |
|---|
public void setRadius(Integer radius) Sets the search radius. |
Parameters
Name |
Description |
|---|---|
radius |
Search radius, in meters. The value ranges from 1 to 50,000. The default value is 50000. |
Method |
|---|
public void setCountries(List<String> countries) Sets multiple country or region codes. |
Parameters
Name |
Description |
|---|---|
countries |
List of country or region codes. |