I'm trying to get a cast of an Address on a EditText.
There is not syntax errors, but the LogCat throws a casting error message, and it doesn't work.
geoPoint((Address)direction.getText()); // this is the cast
Where direction
is an EditText
, and geoPoint()
is defined like this:
public static GeoPoint geoPoint(Address direction){
geoPoint = new GeoPoint(direction.getLongitude(), direction.getLatitude());
return geoPoint;
}
The idea is to get the coordinates of a postal address
Thanks in advance!