title: How to get latitude/longitude based on entered address in android?
body: <p>I wanna draw a route on the basis of the entered source &amp; destination address. I need to get lat/log on the basis of address to draw a map in android. So how can i get lat/log on the basis of entered address.</p>
  
  <pre><code> Geocoder geoCoder = new Geocoder( getBaseContext(), Locale.getDefault());
   try {
       List&lt;Address&gt; addresses = geoCoder.getFromLocationName("Loc",1);
       String add = "";
       if (addresses.size() &gt; 0) 
       {
           add = addresses.get(0);
       }
  
       Toast.makeText(getBaseContext(), add, Toast.LENGTH_SHORT).show();
   } catch (IOException e) {                
       Toast.makeText(getBaseContext(), e.getMessage(), Toast.LENGTH_LONG).show();
   }
  </code></pre>