Class Info |
|---|
public class NearbySearchRequest Represents a request object used to search for nearby places. |
Qualifier and Type |
Method Name and Description |
|---|---|
| Obtains the Huawei POI type of a place. |
|
String |
Obtains the language for displaying searched nearby places. |
| Obtains the current location of a user. |
|
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. CAUTION:
This method has been deprecated. |
String |
getQuery() Obtains the search keyword. |
Integer |
Obtains the search radius. |
Boolean |
Obtains whether to strictly restrict place search in the bounds specified by location and radius. |
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 current location of a user. |
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. CAUTION:
This method has been deprecated. |
void |
setQuery(String query) Sets the search keyword. |
void |
setRadius(Integer radius) Sets the search radius. |
void |
setStrictBounds(Boolean strictBounds) Sets whether to strictly restrict place search in the bounds specified by location and radius. |
Method |
|---|
public HwLocationType getHwPoiType() Obtains the Huawei POI type of a place. |
Returns
Type |
Description |
|---|---|
Method |
|---|
public String getLanguage() Obtains the language for displaying searched nearby places. |
Returns
Type |
Description |
|---|---|
String |
Language for displaying searched nearby places. |
Method |
|---|
public Coordinate getLocation() Obtains the current location of a user. |
Returns
Type |
Description |
|---|---|
Current location of a user. |
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 |
|---|---|
POI type of a place. |
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 Boolean getStrictBounds() Obtains whether to strictly restrict place search in the bounds specified by location and radius. |
Returns
Type |
Description |
|---|---|
Boolean |
Whether to strictly restrict place search in the bounds specified by location and radius. |
Method |
|---|
public void setHwPoiType(HwLocationType hwPoiType) Sets the Huawei POI type. |
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 current location of a user. |
Parameters
Name |
Description |
|---|---|
location |
Current location of a user. This parameter is mandatory. |
Method |
|---|
public void setPageIndex(Integer pageIndex) Sets the current page number. |
Parameters
Name |
Description |
|---|---|
pageIndex |
Number of the current page. The value ranges from 1 to 60. The default value is 1. NOTE:
pageIndex * 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:
pageIndex * pageSize<=60 |
Method |
|---|
public void setPoiType(LocationType poiType) Sets the Huawei 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. |
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 1000. |
Method |
|---|
public void setStrictBounds(Boolean strictBounds) Sets whether to strictly restrict place search in the bounds specified by location and radius. |
Parameters
Name |
Description |
|---|---|
strictBounds |
Indicates whether to strictly restrict place search in the bounds specified by location and radius. The default value is true. |