public static ArrayList<SearchInfo> findGeoPoint(String address) {
ArrayList<SearchInfo> arraySearchInfo = new ArrayList<SearchInfo>();
Geocoder geocoder = new Geocoder(mInstance);
Address addr;
GeoPoint location = null;
try {
List<Address> listAddress = geocoder.getFromLocationName(address, 1);
for (int a = 0; a < listAddress.size(); a++) {
if (listAddress.size() > 0) { // 주소값이 존재 하면
addr = listAddress.get(a); // Address
int lat = (int) (addr.getLatitude() * 1E6);
int lng = (int) (addr.getLongitude() * 1E6);
location = new GeoPoint(lat, lng);
} else {
Log.e(AppConst.TAG, "N O T F O U N D");
}
}
} catch (IOException e) {
e.printStackTrace();
}
return arraySearchInfo;
}
위에처럼 소스적용했더니 주소명이 하나씩만 나오네요... 소스가 잘못된건가요,,.?
다른방법으로 여러개의 주소명이 나오는 방법있으면 참고 부탁드립니다 ㅠ 감사합니다.