Passing an ArrayList of address into MapActivity to Display Multiple location into map (android) -
i have list of address(not lat,lng) on other activity. want pass address mapactivity via intent extras , geocode it. how can this?
below address data in listview activity
viewholder.address.settext(row[4]);//read csv file
pass data activity using list or map , use following code lat long address
public void getlocationfromaddress(string straddress){ geocoder coder = new geocoder(this); list<address> address; geopoint p1 = null; try { address = coder.getfromlocationname(straddress,5); if (address==null) { return null; } address location=address.get(0); location.getlatitude(); location.getlongitude(); log.i("tag","lat = "+location.getlatitude()) log.i("tag","long = "+location.getlongitude()) } }
also check geocoding example
Comments
Post a Comment