final Thread t = new Thread(new Runnable() {
/**
* @see java.lang.Runnable#run()
*/
public void run() {
final GeocodeExchange ex =
Geocoder.getInstance().geocode(null,
_freeFormEditField.getText(),
dim, 0);
// Check if the request was successful
if (ex.getExceptionList().size() == 0) {
requestSuccess(ex);
} else {
requestFailure(ex);
}
}
});
t.start();
} else {
Geocoder.getInstance().geocode(this,
_freeFormEditField.getText(), dim, 0);
}
} else // Use the structured data
{
if (blocking) {
// We are making a blocking request, should not be
// called on event thread.
final Thread t = new Thread(new Runnable() {
/**
* @see java.lang.Runnable#run()
*/
public void run() {
try {
final GeocodeExchange ex =
Geocoder.getInstance().geocode(
null, createMapLocation(),
dim, 0);
// Check if the request was successful
if (ex.getExceptionList().size() == 0) {
requestSuccess(ex);
} else {
requestFailure(ex);
}
} catch (final GeocodeException ge) {