Package com.baidu.mapapi.search.geocode
Class ReverseGeoCodeResult.AddressComponent
java.lang.Object
com.baidu.mapapi.search.geocode.ReverseGeoCodeResult.AddressComponent
- All Implemented Interfaces:
android.os.Parcelable
- Enclosing class:
- ReverseGeoCodeResult
public static class ReverseGeoCodeResult.AddressComponent
extends Object
implements android.os.Parcelable
此类表示地址解析结果的层次化地址信息。
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionint行政区域编码 http://mapopen-pub-webserviceapi.bj.bcebos.com/geocoding/%E5%8C%BA%E5%8E%BF%E7%BA%A7%E8%A1%8C%E6%94%BF%E5%8C%BA%E5%88%92%E6%B8%85%E5%8D%95V35.xlsx城市名称int城市所在级别(仅国外有参考意义。国外行政区划与中国有差异, 城市对应的层级不一定为『city』。country、province、city、district、town分别对应0-4级, 若city_level=3,则district层级为该国家的city层级) V7.3.0版本开放int国家号码国家英文缩写(三位) V7.3.0版本开放国家英文缩写(两位) V7.3.0版本开放国家名称static final android.os.Parcelable.Creator<ReverseGeoCodeResult.AddressComponent>相对当前坐标点的方向,当有门牌号的时候返回数据 V5.2.0版本开放相对当前坐标点的距离,当有门牌号的时候返回数据 V5.2.0版本开放区县名称省份名称街道名称(行政区划中的街道层级)门牌号码乡镇名称 V5.2.0版本开放乡镇id V7.3.0版本开放Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint获取层次化地址信息中的相对当前坐标点的方向,当有门牌号的时候返回数据获取层次化地址信息中的相对当前坐标点的距离,当有门牌号的时候返回数据getTown()获取层次化地址信息中的乡镇名称voidsetDirection(String direction) 设置层次化地址信息中的相对当前坐标点的方向,当有门牌号的时候返回数据voidsetDistance(String distance) 设置层次化地址信息中的相对当前坐标点的距离,当有门牌号的时候返回数据voidsetRegionCodeIso(String regionCodeIso) void设置层次化地址信息中的乡镇名称voidwriteToParcel(android.os.Parcel dest, int flags)
-
Field Details
-
streetNumber
门牌号码 -
street
街道名称(行政区划中的街道层级) -
town
乡镇名称 V5.2.0版本开放 -
district
区县名称 -
city
城市名称 -
province
省份名称 -
countryName
国家名称 -
countryCode
public int countryCode国家号码 -
adcode
public int adcode行政区域编码 http://mapopen-pub-webserviceapi.bj.bcebos.com/geocoding/%E5%8C%BA%E5%8E%BF%E7%BA%A7%E8%A1%8C%E6%94%BF%E5%8C%BA%E5%88%92%E6%B8%85%E5%8D%95V35.xlsx -
direction
相对当前坐标点的方向,当有门牌号的时候返回数据 V5.2.0版本开放 -
distance
相对当前坐标点的距离,当有门牌号的时候返回数据 V5.2.0版本开放 -
countryCodeIso
国家英文缩写(三位) V7.3.0版本开放 -
countryCodeIso2
国家英文缩写(两位) V7.3.0版本开放 -
townCode
乡镇id V7.3.0版本开放 -
cityLevel
public int cityLevel城市所在级别(仅国外有参考意义。国外行政区划与中国有差异, 城市对应的层级不一定为『city』。country、province、city、district、town分别对应0-4级, 若city_level=3,则district层级为该国家的city层级) V7.3.0版本开放 -
regionCodeIso
-
CREATOR
-
-
Constructor Details
-
AddressComponent
public AddressComponent() -
AddressComponent
protected AddressComponent(android.os.Parcel in)
-
-
Method Details
-
describeContents
public int describeContents()- Specified by:
describeContentsin interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags) - Specified by:
writeToParcelin interfaceandroid.os.Parcelable
-
getTown
获取层次化地址信息中的乡镇名称- Returns:
- 乡镇名称
-
setTown
设置层次化地址信息中的乡镇名称- Parameters:
town- 乡镇名称
-
getDirection
获取层次化地址信息中的相对当前坐标点的方向,当有门牌号的时候返回数据- Returns:
- 相对当前坐标点的方向,比如“西”,“东”, “附近”
-
setDirection
设置层次化地址信息中的相对当前坐标点的方向,当有门牌号的时候返回数据- Parameters:
direction- 相对当前坐标点的方向,比如“西”,“东”, “附近”
-
getDistance
获取层次化地址信息中的相对当前坐标点的距离,当有门牌号的时候返回数据- Returns:
- 相对当前坐标点的距离
-
setDistance
设置层次化地址信息中的相对当前坐标点的距离,当有门牌号的时候返回数据- Parameters:
distance- 相对当前坐标点的距离
-
getRegionCodeIso
-
setRegionCodeIso
-