class info
public class WeatherPosition implements Parcelable
Request parameter class, which is used to pass address information to obtain weather information. The address information includes six attributes: country, province, city, district, county, and language type.
An address consists of the country, province, city, district, and county. The city must be set and other four attributes are optional. For example, if you want to query the weather of London, you can pass only the city attribute London or both the country attribute UK and city attribute London.
The language type is of the locale format. For example, en_GB indicates British English. Note that the language type is mandatory and must meet the locale format language code_country/region code.

Public Method Summary

Return typeMethod name
voidsetCountry(String country)
voidsetProvince(String province)
voidsetCity(String city)
voidsetDistrict(String district)
voidsetCounty(String county)
voidsetLocale(String locale)

Public Methods

Method
public void setCountry(String country)
Sets the country name.

Parameters

Parameter nameParameter desc
countryCountry name. You are advised to pass this parameter so that the address will be more accurate.
Method
public void setProvince(String province)
Sets the province name.

Parameters

Parameter nameParameter desc
provinceProvince name. You are advised to pass this parameter so that the address will be more accurate.
Method
public void setCity(String city)
Sets the city name.

Parameters

Parameter nameParameter desc
cityCity name. You are advised to pass this parameter so that the address will be more accurate.
Method
public void setDistrict(String district)
Sets the district name.

Parameters

Parameter nameParameter desc
districtDistrict name. You are advised to pass this parameter so that the address will be more accurate.
Method
public void setCounty(String county)
Sets the county name.

Parameters

Parameter nameParameter desc
countyCounty name. You are advised to pass this parameter so that the address will be more accurate.
Method
public void setLocale(String locale)
Sets the language type of the passed address.

Parameters

Parameter nameParameter desc
localeLanguage type of the passed address, for example, zh_CN or en_US. Note that the language type is mandatory and must meet the locale format language code_country/region code.