Changeset 18417 in osm for applications/editors/josm/plugins/remotecontrol
- Timestamp:
- 2009-11-02T08:58:53+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/remotecontrol
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/remotecontrol/build.xml
r18295 r18417 26 26 <attribute name="Plugin-Description" value="Let other applications send commands to JOSM."/> 27 27 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/RemoteControl"/> 28 <attribute name="Plugin-Mainversion" value="23 27"/>28 <attribute name="Plugin-Mainversion" value="2381"/> 29 29 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 30 30 </manifest> -
applications/editors/josm/plugins/remotecontrol/src/org/openstreetmap/josm/plugins/remotecontrol/RequestProcessor.java
r18302 r18417 37 37 import org.openstreetmap.josm.data.osm.Way; 38 38 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 39 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;40 39 41 40 /** … … 167 166 maxlon = downloadBounds.getMaxX(); 168 167 } 169 Future<?> future = osmTask.download(false /*no new layer*/, new Bounds(minlat,minlon,maxlat,maxlon), null /* let the task manage the progress monitor */); 170 Main.worker.submit(new PostDownloadHandler(osmTask, future)); 168 Future<?> future = osmTask.download(false /*no new layer*/, new Bounds(minlat,minlon,maxlat,maxlon), null /* let the task manage the progress monitor */); 169 Main.worker.submit(new PostDownloadHandler(osmTask, future)); 171 170 } catch (AlreadyLoadedException ex) { 172 171 System.out.println("RemoteControl: no download necessary"); … … 199 198 } 200 199 } 201 for (Way w : Main.main.getCurrentDataSet(). ways) if (ways.contains(w.getId())) newSel.add(w);202 for (Node n : Main.main.getCurrentDataSet(). nodes) if (nodes.contains(n.getId())) newSel.add(n);203 for (Relation r : Main.main.getCurrentDataSet(). relations) if (relations.contains(r.getId())) newSel.add(r);200 for (Way w : Main.main.getCurrentDataSet().getWays()) if (ways.contains(w.getId())) newSel.add(w); 201 for (Node n : Main.main.getCurrentDataSet().getNodes()) if (nodes.contains(n.getId())) newSel.add(n); 202 for (Relation r : Main.main.getCurrentDataSet().getRelations()) if (relations.contains(r.getId())) newSel.add(r); 204 203 Main.main.getCurrentDataSet().setSelected(newSel); 205 204 if (Main.pref.getBoolean("remotecontrol.permission.change-viewport", true)) … … 291 290 * Adds a node, reacts to the GET /add_node?lon=...&lat=... request. 292 291 * @param args 293 * @param out 294 * @throws IOException 292 * @param out 293 * @throws IOException 295 294 */ 296 295 private void addNode(HashMap<String, String> args, Writer out) throws IOException { … … 299 298 return; 300 299 } 301 300 302 301 // Parse the arguments 303 302 double lat = Double.parseDouble(args.get("lat")); 304 303 double lon = Double.parseDouble(args.get("lon")); 305 304 System.out.println("Adding node at (" + lat + ", " + lon + ")"); 306 305 307 306 // Create a new node 308 307 LatLon ll = new LatLon(lat, lon); 309 308 Node nnew = new Node(ll); 310 309 311 310 // Now execute the commands to add this node. 312 311 Main.main.undoRedo.add(new AddCommand(nnew)); 313 312 Main.main.getCurrentDataSet().setSelected(nnew); 314 313 Main.map.mapView.repaint(); 315 314 316 315 } 317 316
Note:
See TracChangeset
for help on using the changeset viewer.