Geocoder를 사용하여 일부 좌표의 주소를 가져옵니다. 주소 개체에 결과 주소를 제공합니다. 주소 개체를 연구하여 사용자 디스플레이 (예 : 구내, 면적, 경계표, 지역, sublocality, 도시, 주)의 다양한 특성을 다시 정렬 할 수 있습니다.Android 지오 코더 응답 구조 란 무엇입니까?
이전에는 Geocoder 객체가 이전에 사용했던 것과 약간 다른 주소를 사용한다고 가정하지만 현재는 하나만 있고 모든 쉼표로 구분 된 구문은 아래에서 제공하는 나머지 본문과 일치하지 않습니다. 참조
json으로 아래 구조 :
이1> Delhi Address: [
{
"mAddressLines": {
"0": "E46, Lodhi Colony, Sector 3G, Rohini, Delhi, 110085, India"
},
"mAdminArea": "Delhi",
"mCountryCode": "IN",
"mCountryName": "India",
"mFeatureName": "E46",
"mHasLatitude": true,
"mHasLongitude": true,
"mLatitude": 28.703985300000003,
"mLocale": "en_US",
"mLocality": "Delhi",
"mLongitude": 77.1024425,
"mMaxAddressLineIndex": 0,
"mPostalCode": "110085",
"mPremises": "E46",
"mSubAdminArea": "North West Delhi",
"mSubLocality": "Rohini"
}
]
2> Delhi Address: [
{
"mAddressLines": {
"0": "684, Pocket 7, Sector 2, Rohini, Delhi, 110085, India"
},
"mAdminArea": "Delhi",
"mCountryCode": "IN",
"mCountryName": "India",
"mFeatureName": "684",
"mHasLatitude": true,
"mHasLongitude": true,
"mLatitude": 28.700565400000002,
"mLocale": "en_US",
"mLocality": "Delhi",
"mLongitude": 77.0993105,
"mMaxAddressLineIndex": 0,
"mPostalCode": "110085",
"mPremises": "684",
"mSubAdminArea": "North West Delhi",
"mSubLocality": "Rohini"
},
{
"mAddressLines": {
"0": "Himalaya Apartment, Guru Gowalkar Marg, Pocket 00, Sector 2, Rohini, Delhi, 110085, India"
},
"mAdminArea": "Delhi",
"mCountryCode": "IN",
"mCountryName": "India",
"mFeatureName": "Himalaya Apartment",
"mHasLatitude": true,
"mHasLongitude": true,
"mLatitude": 28.7004086,
"mLocale": "en_US",
"mLocality": "Delhi",
"mLongitude": 77.09895829999999,
"mMaxAddressLineIndex": 0,
"mPostalCode": "110085",
"mPremises": "Himalaya Apartment",
"mSubAdminArea": "New Delhi",
"mSubLocality": "Rohini",
"mThoroughfare": "Guru Gowalkar Marg"
}
]
3> Hyderabad Address: [
{
"mAddressLines": {
"0": "Rinda Legend Capital Mall, Main Rd, Subhash Nagar, Badi Chowdi, Koti, Hyderabad, Telangana 500095, India"
},
"mAdminArea": "Telangana",
"mCountryCode": "IN",
"mCountryName": "India",
"mFeatureName": "Rinda Legend Capital Mall",
"mHasLatitude": true,
"mHasLongitude": true,
"mLatitude": 17.3852123,
"mLocale": "en_US",
"mLocality": "Hyderabad",
"mLongitude": 78.48660459999999,
"mMaxAddressLineIndex": 0,
"mPostalCode": "500095",
"mPremises": "Rinda Legend Capital Mall",
"mSubAdminArea": "Ranga Reddy",
"mSubLocality": "Koti",
"mThoroughfare": "Main Road"
},
{
"mAddressLines": {
"0": "5-1-314, Main Rd, Subhash Nagar, Badi Chowdi, Koti, Hyderabad, Telangana 500095, India"
},
"mAdminArea": "Telangana",
"mCountryCode": "IN",
"mCountryName": "India",
"mFeatureName": "5-1-314",
"mHasLatitude": true,
"mHasLongitude": true,
"mLatitude": 17.3852895,
"mLocale": "en_US",
"mLocality": "Hyderabad",
"mLongitude": 78.4865963,
"mMaxAddressLineIndex": 0,
"mPostalCode": "500095",
"mSubAdminArea": "Hyderabad",
"mSubLocality": "Koti",
"mSubThoroughfare": "5-1-314",
"mThoroughfare": "Main Road"
},
{
"mAddressLines": {
"0": "Omnitech InfoSolutions, 1st Floor, Bulding No 17, Main Rd, Goutam Nagar, Badi Chowdi, Kachiguda, Hyderabad, Telangana 501301, India"
},
"mAdminArea": "Telangana",
"mCountryCode": "IN",
"mCountryName": "India",
"mFeatureName": "Omnitech InfoSolutions",
"mHasLatitude": true,
"mHasLongitude": true,
"mLatitude": 17.385044,
"mLocale": "en_US",
"mLocality": "Hyderabad",
"mLongitude": 78.486671,
"mMaxAddressLineIndex": 0,
"mPostalCode": "501301",
"mPremises": "Omnitech InfoSolutions",
"mSubAdminArea": "Ranga Reddy",
"mSubLocality": "Kachiguda",
"mSubThoroughfare": "1st Floor, Bulding No 17",
"mThoroughfare": "Main Road"
},
{
"mAddressLines": {
"0": "Mobile Tower, Main Rd, Goutam Nagar, Badi Chowdi, Kachiguda, Hyderabad, Telangana 500095, India"
},
"mAdminArea": "Telangana",
"mCountryCode": "IN",
"mCountryName": "India",
"mFeatureName": "Mobile Tower",
"mHasLatitude": true,
"mHasLongitude": true,
"mLatitude": 17.385044,
"mLocale": "en_US",
"mLocality": "Hyderabad",
"mLongitude": 78.486671,
"mMaxAddressLineIndex": 0,
"mPostalCode": "500095",
"mPremises": "Mobile Tower",
"mSubAdminArea": "Ranga Reddy",
"mSubLocality": "Kachiguda",
"mThoroughfare": "Main Road"
},
{
"mAddressLines": {
"0": "Saini Industries, 1-47/2, Fateh Nagar, Fateh Nagar, Gandhi Nagar, Badi Chowdi, Kachiguda, Hyderabad, Telangana 500018, India"
},
"mAdminArea": "Telangana",
"mCountryCode": "IN",
"mCountryName": "India",
"mFeatureName": "Saini Industries",
"mHasLatitude": true,
"mHasLongitude": true,
"mLatitude": 17.385047399999998,
"mLocale": "en_US",
"mLocality": "Hyderabad",
"mLongitude": 78.4866596,
"mMaxAddressLineIndex": 0,
"mPostalCode": "500018",
"mPremises": "Saini Industries",
"mSubAdminArea": "Hyderabad",
"mSubLocality": "Kachiguda"
}
]
중 하나가 mAddressLine 신체의 나머지 부분과 일치하지 않는 이유에 대한 통찰력을 제공 할 수 있습니까?
는편집 : 예를 들어, 1 일 AddressLine이다 내 의심의 여지가있다 :
"E46, Lodhi Colony, Sector 3G, Rohini, Delhi, 110085, India"
그러나 몸의 나머지 :
"mAdminArea": "Delhi",
"mCountryCode": "IN",
"mCountryName": "India",
"mFeatureName": "E46",
"mHasLatitude": true,
"mHasLongitude": true,
"mLatitude": 28.703985300000003,
"mLocale": "en_US",
"mLocality": "Delhi",
"mLongitude": 77.1024425,
"mMaxAddressLineIndex": 0,
"mPostalCode": "110085",
"mPremises": "E46",
"mSubAdminArea": "North West Delhi",
"mSubLocality": "Rohini"
가 'Lodhi 식민지'또는 '없다 섹터 3G ', 그게 뭐야? 대신 지역은 '델리'로 표시됩니다. 지역이 아니라 전체 도시입니다.
자바에서
를 역 직렬화 할 수있는 기본 구조가); 그러나 주소가 json으로 변환되면 위의 구조가 생성되지만 구조에는 문제가 없지만 주소 행과 본문의 아래 부분 사이에 불일치가 있습니다. – Ari