Ignore:
Timestamp:
2015-04-18T16:54:05+02:00 (5 years ago)
Author:
simon04
Message:

see #11000 - Remote control: allow to specify layer_name for load_and_zoom, load_object

Location:
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java

    r7937 r8221  
    7373    @Override
    7474    public String[] getOptionalParams() {
    75         return new String[] {"new_layer", "addtags", "select", "zoom_mode", "changeset_comment", "changeset_source", "search"};
     75        return new String[] {"new_layer", "layer_name", "addtags", "select", "zoom_mode", "changeset_comment", "changeset_source", "search"};
    7676    }
    7777
     
    102102    @Override
    103103    protected void handleRequest() throws RequestHandlerErrorException {
    104         DownloadTask osmTask = new DownloadOsmTask();
     104        DownloadTask osmTask = new DownloadOsmTask() {
     105            {
     106                newLayerName = args.get("layer_name");
     107            }
     108        };
    105109        try {
    106110            boolean newLayer = isLoadInNewLayer();
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java

    r7937 r8221  
    4040    @Override
    4141    public String[] getOptionalParams() {
    42         return new String[] {"new_layer", "addtags", "relation_members", "referrers"};
     42        return new String[] {"new_layer", "layer_name", "addtags", "relation_members", "referrers"};
    4343    }
    4444
     
    6464            final boolean newLayer = isLoadInNewLayer();
    6565            final boolean relationMembers = Boolean.parseBoolean(args.get("relation_members"));
    66             final boolean referrers = args.containsKey("referrers") ? Boolean.parseBoolean(args.get("referrers")) : true;
     66            final boolean referrers = Boolean.parseBoolean(args.get("referrers"));
    6767            final DownloadPrimitivesWithReferrersTask task = new DownloadPrimitivesWithReferrersTask(
    68                     newLayer, ps, referrers, relationMembers, null);
     68                    newLayer, ps, referrers, relationMembers, args.get("layer_name"), null);
    6969            Main.worker.submit(task);
    7070            Main.worker.submit(new Runnable() {
Note: See TracChangeset for help on using the changeset viewer.