目录

SearchFilter

Class Info

public class SearchFilter

Widget search criteria.

Public Constructor Summary

Constructor Name

SearchFilter()

Default constructor.

Public Method Summary

Qualifier and Type

Method Name and Description

CoordinateBounds

getBounds()

Obtains the coordinate bounds to which search results need to be biased.

String

getCountryCode()

Obtains the code of the country/region to which a place belongs.

String

getLanguage()

Obtains the language for displaying the search results.

Coordinate

getLocation()

Obtains the longitude and latitude to which search results need to be biased.

List<LocationType>

getPoiType()

Obtains the POI types of places.

String

getPoliticalView()

Obtains the political view.

CAUTION:

This method has been deprecated.

String

getQuery()

Obtains the search keyword.

Integer

getRadius()

Obtains the search radius.

Boolean

getStrictBounds()

Checks whether place search is strictly restricted in the bounds specified by Bounds.

boolean

isChildren()

Checks whether to return information about child nodes.

void

setChildren(boolean children)

Sets whether to return information about child nodes.

void

setBounds(CoordinateBounds bounds)

Sets the coordinate bounds to which search results need to be biased.

void

setCountryCode(String countryCode)

Sets a country/region code.

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

setPoiType(List<LocationType> poiType)

Sets the POI types of places.

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 Bounds.

Public Methods

[h2]getBounds

Method

public CoordinateBounds getBounds()

Obtains the coordinate bounds to which search results need to be biased.

Returns

Type

Description

CoordinateBounds

Coordinate bounds to which search results need to be biased.

[h2]getCountryCode

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.

[h2]getLanguage

Method

public String getLanguage()

Obtains the language for displaying the search results.

Returns

Type

Description

String

Language for displaying the search results.

[h2]getLocation

Method

public Coordinate getLocation()

Obtains the longitude and latitude to which search results need to be biased.

Returns

Type

Description

Coordinate

Longitude and latitude to which search results need to be biased.

[h2]getPoiType

Method

public List<LocationType> getPoiType()

Obtains the POI types of places.

Returns

Type

Description

List<LocationType>

POI types of places.

[h2]getPoliticalView

This method has been deprecated.

Method

public String getPoliticalView()

Obtains the political view.

Returns

Type

Description

String

Political view.

[h2]getQuery

Method

public String getQuery()

Obtains the search keyword.

Returns

Type

Description

String

Search keyword.

[h2]getRadius

Method

public Integer getRadius()

Obtains the search radius.

Returns

Type

Description

Integer

Search radius, in meters.

[h2]getStrictBounds

Method

public Boolean getStrictBounds()

Checks whether place search is strictly restricted in the bounds specified by Bounds.

Returns

Type

Description

Boolean

Whether place search is strictly restricted in the bounds specified by Bounds.

[h2]isChildren

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.

[h2]setChildren

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.

  • true: Returns siteId of child nodes.
  • false: Returns no information about child nodes.

The default value is false.

[h2]setBounds

Method

public void setBounds(CoordinateBounds bounds)

Sets the coordinate bounds to which search results need to be biased.

Parameters

Name

Description

bounds

Coordinate bounds to which search results need to be biased.

[h2]setCountryCode

Method

public void setCountryCode(String countryCode)

Sets a country/region code.

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.

[h2]setLanguage

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.

[h2]setLocation

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.

[h2]setPoiType

Method

public void setPoiType(List<LocationType> poiType)

Sets the POI types of places.

Parameters

Name

Description

poiType

POI types. The value range is a subset of LocationType, including:

  • GEOCODE
  • ADDRESS
  • ESTABLISHMENT
  • REGIONS
  • CITIES

[h2]setPoliticalView

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.

[h2]setQuery

Method

public void setQuery(String query)

Sets the search keyword.

Parameters

Name

Description

query

Search keyword.

[h2]setRadius

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.

[h2]setStrictBounds

Method

public void setStrictBounds(Boolean strictBounds)

Sets whether to strictly restrict place search in the bounds specified by Bounds.

Parameters

Name

Description

strictBounds

Indicates whether to strictly restrict place search in the bounds specified by Bounds. The default value is false.