X-Git-Url: https://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2FDownloadOsmFunction.java;h=b3ee1b292447bd02e4c3eaab1b0f5529258eb85d;hb=92dad5df664287acb51728e9ea599f150765d34a;hp=bef09adb14574e0ea87ff46e2cc98fe0ff3f7330;hpb=f35b6d628f68e3b5ef19965ad8988d0dd1eb8efa;p=GpsPrune.git diff --git a/tim/prune/function/DownloadOsmFunction.java b/tim/prune/function/DownloadOsmFunction.java index bef09ad..b3ee1b2 100644 --- a/tim/prune/function/DownloadOsmFunction.java +++ b/tim/prune/function/DownloadOsmFunction.java @@ -243,9 +243,10 @@ public class DownloadOsmFunction extends GenericFunction implements Runnable */ public void run() { - final String url = "http://www.informationfreeway.org/api/0.6/map?bbox=" + - _latLonLabels[1].getText() + "," + _latLonLabels[3].getText() + "," + - _latLonLabels[2].getText() + "," + _latLonLabels[0].getText(); + String url = "http://overpass-api.de/api/interpreter?data=(node(" + + _latLonLabels[3].getText() + "," + _latLonLabels[1].getText() + "," + + _latLonLabels[0].getText() + "," + _latLonLabels[2].getText() + ");<;);out%20qt;"; + // System.out.println(url); byte[] buffer = new byte[1024]; InputStream inStream = null; @@ -263,8 +264,7 @@ public class DownloadOsmFunction extends GenericFunction implements Runnable } catch (MalformedURLException mue) {} catch (IOException ioe) { - // TODO: throw exception or show dialog - System.out.println("Exception: " + ioe.getClass().getName()); + _app.showErrorMessageNoLookup(getNameKey(), ioe.getClass().getName() + " - " + ioe.getMessage()); } // clean up streams finally {