| 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. |
| Return type | Method name |
| void | setCountry(String country) |
| void | setProvince(String province) |
| void | setCity(String city) |
| void | setDistrict(String district) |
| void | setCounty(String county) |
| void | setLocale(String locale) |
| Method |
| public void setCountry(String country) |
| Sets the country name. |
Parameters
| Parameter name | Parameter desc |
| country | Country 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 name | Parameter desc |
| province | Province 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 name | Parameter desc |
| city | City 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 name | Parameter desc |
| district | District 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 name | Parameter desc |
| county | County 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 name | Parameter desc |
| locale | Language 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. |