Ticket #8556: ImportHandler.java.patch
| File ImportHandler.java.patch, 1.6 KB (added by , 13 years ago) |
|---|
-
src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
25 25 26 26 private URL url; 27 27 private Collection<DownloadTask> suitableDownloadTasks; 28 private boolean newLayer; 28 29 29 30 @Override 30 31 protected void handleRequest() throws RequestHandlerErrorException { … … 32 33 if (suitableDownloadTasks != null && !suitableDownloadTasks.isEmpty()) { 33 34 // TODO: add new_layer parameter 34 35 // TODO: handle multiple suitable download tasks ? 35 suitableDownloadTasks.iterator().next().loadUrl( false, url.toExternalForm(), null);36 suitableDownloadTasks.iterator().next().loadUrl(newLayer, url.toExternalForm(), null); 36 37 } 37 38 } catch (Exception ex) { 38 39 System.out.println("RemoteControl: Error parsing import remote control request:"); … … 106 107 } catch (MalformedURLException e) { 107 108 throw new RequestHandlerBadRequestException("MalformedURLException: "+e.getMessage()); 108 109 } 110 111 // See if there is a new-layer specified. 112 newLayer = false; 113 if(args.containsKey("nl") && args.get("nl").equals("yes")) 114 { 115 newLayer = true; 116 } 117 109 118 // Find download tasks for the given URL 110 119 suitableDownloadTasks = Main.main.menu.openLocation.findDownloadTasks(urlString); 111 120 if (suitableDownloadTasks.isEmpty()) {
