try {
progressMonitor.indeterminateSubTask(tr("Contacting OSM Server..."));
if (crosses180th) {
// API 0.6 does not support requests crossing the 180th meridian, so make two requests
GpxData result = downloadRawGps("trackpoints?bbox="+lon1+","+lat1+",180.0,"+lat2+"&page=", progressMonitor);
result.mergeFrom(downloadRawGps("trackpoints?bbox=-180.0,"+lat1+","+lon2+","+lat2+"&page=", progressMonitor));
return result;
} else {
// Simple request
return downloadRawGps("trackpoints?bbox="+lon1+","+lat1+","+lon2+","+lat2+"&page=", progressMonitor);
}