Converting an address into geopoint
android, google-maps
Solution
you can do so by simply calling getFromLocationName()
Geocoder geoCoder = new Geocoder(context, Locale.getDefault());
try {
List<Address> address = geoCoder.getFromLocationName(locationName, 1);
double latitude = address.get(0).getLatitude();
double longitude = address.get(0).getLongitude();
} catch (IOException e) {
e.printStackTrace();
}
Problem
I want the user to enter the location he wants to search for places that are near by using google places api.I want to know how to convert the string into geopoints?