public class DistrictSearchQuery
extends java.lang.Object
implements android.os.Parcelable, java.lang.Cloneable
| 限定符和类型 | 字段和说明 |
|---|---|
static android.os.Parcelable.Creator<DistrictSearchQuery> |
CREATOR |
static java.lang.String |
KEYWORDS_BUSINESS
已过时。
V3.6.1 不再需要此参数限制
V3.6.1 no longer requires this parameter restriction. |
static java.lang.String |
KEYWORDS_CITY
已过时。
V3.6.1 不再需要此参数限制
V3.6.1 no longer requires this parameter restriction. |
static java.lang.String |
KEYWORDS_COUNTRY
已过时。
V3.6.1 不再需要此参数限制
V3.6.1 no longer requires this parameter restriction. |
static java.lang.String |
KEYWORDS_DISTRICT
已过时。
V3.6.1 不再需要此参数限制
V3.6.1 no longer requires this parameter restriction. |
static java.lang.String |
KEYWORDS_PROVINCE
已过时。
V3.6.1 不再需要此参数限制
V3.6.1 no longer requires this parameter restriction. |
| 构造器和说明 |
|---|
DistrictSearchQuery()
构造 DistrictSearchQuery 对象
Construct a DistrictSearchQuery object. |
DistrictSearchQuery(java.lang.String keywords,
java.lang.String keywordsLevel,
int pageNum)
已过时。
自V3.6.1废除此接口,建议用
DistrictSearchQuery() 构造。
This interface is deprecated since V3.6.1, it is recommended to use DistrictSearchQuery() to construct. |
DistrictSearchQuery(java.lang.String keywords,
java.lang.String keywordsLevel,
int pageNum,
boolean showChild,
int pageSize)
已过时。
自V3.6.1废除此接口,建议用
DistrictSearchQuery() 构造。
This interface is deprecated since V3.6.1, it is recommended to use DistrictSearchQuery() to construct. |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
checkKeyWords()
返回行政区划查询条件的关键字是否为非空
Whether the keyword of the administrative division query condition is non-empty. |
boolean |
checkLevels()
已过时。
V3.6.1 不再需要此参数限制
V3.6.1 no longer requires this parameter restriction. |
DistrictSearchQuery |
clone() |
int |
describeContents() |
boolean |
equals(java.lang.Object obj)
比较两个查询条件是否相同
Compare whether two query conditions are the same. |
java.lang.String |
getKeywords()
返回查询时所用字符串关键字
Returns the string keyword used in the query. |
java.lang.String |
getKeywordsLevel()
已过时。
V3.6.1 不再需要此参数限制
V3.6.1 no longer requires this parameter restriction. |
int |
getPageNum()
获取设置查询的是第几页,从0开始
Get the setting of which page to query, starting from 0. |
int |
getPageSize()
返回查询页面的结果数目
Returns the number of results on the query page. |
int |
getSubDistrict()
是否返回下级区划
Whether to return sub-level administrative divisions. |
int |
hashCode() |
boolean |
isShowBoundary()
返回行政区域查询是否返回边界值
Returns whether the administrative region query returns boundary values. |
boolean |
isShowBusinessArea()
已过时。
自 5.1.0 废弃,用率极低,而且会影响精准度,取消商圈(biz_area)级别数据,用街道(street)顶替商圈位置
Deprecated since 5.1.0, rarely used and affects accuracy. The business district (biz_area) level data is removed and replaced with street (street) data. |
boolean |
isShowChild()
已过时。
自 7.1.0 废弃,返回下级行政区划参考
getSubDistrict()
Deprecated since 7.1.0, return sub-administrative divisions refer to getSubDistrict() |
void |
setKeywords(java.lang.String mKeywords)
设置查询字符串关键字
Set the query string keyword. |
void |
setKeywordsLevel(java.lang.String mLevel)
已过时。
V3.6.1 不再需要此参数限制
V3.6.1 no longer requires this parameter restriction. |
void |
setPageNum(int mPageNum)
设置查询第几页的结果数目
Set the number of results for the query page. |
void |
setPageSize(int mPageSize)
设置查询每页的结果数目, 默认值是20 条,取值范围在[1-50]
Set the number of results per page for the query, default is 20, range is [1-50]. |
void |
setShowBoundary(boolean isBoundary)
设置行政区域搜索是否返回边界值,true为返回,false为不返回
Set whether the administrative region search returns boundary values, true to return, false not to return. |
void |
setShowBusinessArea(boolean showbiz)
已过时。
自 5.1.0 废弃,使用率极低,而且会影响精准度,取消商圈(biz_area)级别数据,用街道(street)顶替商圈位置
Deprecated since 5.1.0, rarely used and affects accuracy. The business district (biz_area) level data is removed and replaced with street (street) data. |
void |
setShowChild(boolean mShowChild)
已过时。
自 7.1.0 废弃,设置下级行政区划参考
setSubDistrict(int) ()}
Deprecated since 7.1.0, set sub-administrative divisions refer to setSubDistrict(int) ()} |
void |
setSubDistrict(int subDistrict)
设置显示下级行政区级数(行政区级别包括:国家、省/直辖市、市、区/县、乡镇/街道多级数据)
Set the number of sub-level administrative divisions to display (administrative levels include: country, province/municipality, city, district/county, township/street, etc.). |
boolean |
weakEquals(DistrictSearchQuery districtQuery) |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final java.lang.String KEYWORDS_COUNTRY
public static final java.lang.String KEYWORDS_PROVINCE
public static final java.lang.String KEYWORDS_CITY
public static final java.lang.String KEYWORDS_DISTRICT
public static final java.lang.String KEYWORDS_BUSINESS
public static final android.os.Parcelable.Creator<DistrictSearchQuery> CREATOR
public DistrictSearchQuery()
public DistrictSearchQuery(java.lang.String keywords,
java.lang.String keywordsLevel,
int pageNum)
DistrictSearchQuery() 构造。
DistrictSearchQuery() to construct.keywords - 关键词,支持:行政区名称、城市编码、区域编码。
keywordsLevel - 关键词级别,可参见 DistrictSearch 中的常量定义。(V3.6.1以后此参数已无效)
pageNum - 查询第几页的结果,从0开始,默认为0,最大为第99页。
public DistrictSearchQuery(java.lang.String keywords,
java.lang.String keywordsLevel,
int pageNum,
boolean showChild,
int pageSize)
DistrictSearchQuery() 构造。
DistrictSearchQuery() to construct.keywords - 关键词,支持:行政区名称、城市编码、区域编码。
keywordsLevel - 关键词级别,可参见 DistrictSearch 中的常量定义。(V3.6.1以后此参数已无效)
pageNum - 查询第几页的结果,从0开始,默认为0,最大为第99页。
showChild - 是否显示下一级别的行政区。
pageSize - 每页显示多少个数据,默认值是20 条,取值范围在[1-50] 。
public void setShowBoundary(boolean isBoundary)
isBoundary - – true/false。public boolean isShowBoundary()
public int getPageNum()
public void setPageNum(int mPageNum)
mPageNum - 查询第几页的结果,从0开始。自 5.2.1后修改成从1开始,和iOS保持一致。
public int getPageSize()
public void setPageSize(int mPageSize)
mPageSize - 每页的最大结果数目。
public java.lang.String getKeywords()
public void setKeywords(java.lang.String mKeywords)
mKeywords - 查询字符串关键字。
public java.lang.String getKeywordsLevel()
public void setKeywordsLevel(java.lang.String mLevel)
mLevel - 查询关键字的级别,请参见 DistrictSearch 中定义的常量。
DistrictSearch.public boolean isShowChild()
getSubDistrict()
getSubDistrict()public void setShowChild(boolean mShowChild)
setSubDistrict(int) ()}
setSubDistrict(int) ()}mShowChild - 是否返回下级区划,默认为true,返回下级区划。
public int getSubDistrict()
public void setSubDistrict(int subDistrict)
subDistrict - 0:不返回下级行政区,1:返回下一级行政区;2:返回下两级行政区;3:返回下三级行政区。
需要在此特殊说明,目前部分城市和省直辖县因为没有区县的概念,故在市级下方直接显示街道。
例如:广东-东莞、海南-文昌市
public boolean isShowBusinessArea()
public void setShowBusinessArea(boolean showbiz)
showbiz - 可选为true/false,为了能够精准的定位到街道,特别是在快递、物流、送餐等场景下,强烈建议将此设置为false。
public boolean checkLevels()
public boolean checkKeyWords()
public int hashCode()
hashCode 在类中 java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals 在类中 java.lang.Objectobj - 查询条件。
public boolean weakEquals(DistrictSearchQuery districtQuery)
public DistrictSearchQuery clone()
clone 在类中 java.lang.Objectpublic int describeContents()
describeContents 在接口中 android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel 在接口中 android.os.Parcelable