DownloadOsmTask - the zoomAfterDownload parameter does not work

Marián Kyral mkyral at email.cz
Wed Jul 18 06:34:27 UTC 2018


hmm,

it seems that this commit is the reason:




https://github.com/openstreetmap/josm/commit/29c7baa5cc67150685293607ce0dcee
2eeccf2b8?diff=unified
(https://github.com/openstreetmap/josm/commit/29c7baa5cc67150685293607ce0dcee2eeccf2b8?diff=unified)




    [javac] Compiling 67 source files to /home/marian/projekty/josm/josm_
plugins/plugins/tracer/build
    [javac] /home/marian/projekty/josm/josm_plugins/plugins/tracer/src/org/
openstreetmap/josm/plugins/tracer/DownloadOsmMissingAreaTask.java:31: 
warning: [deprecation] download(OsmServerReader,boolean,Bounds,
ProgressMonitor) in DownloadOsmTask has been deprecated
    [javac]     public Future<?> download(OsmServerReader reader, boolean 
newLayer, Bounds downloadArea, ProgressMonitor progressMonitor) {
    [javac]                      ^
    [javac] /home/marian/projekty/josm/josm_plugins/plugins/tracer/src/org/
openstreetmap/josm/plugins/tracer/DownloadOsmMissingAreaTask.java:37: 
warning: [deprecation] DownloadOsmTask.DownloadTask(boolean,OsmServerReader,
ProgressMonitor,boolean) in DownloadOsmTask.DownloadTask has been deprecated
    [javac]             super(newLayer, reader, progressMonitor, false); // 
do not center and scale to downloaded area
    [javac]             ^
    [javac] /home/marian/projekty/josm/josm_plugins/plugins/tracer/src/org/
openstreetmap/josm/plugins/tracer/TracerModule.java:279: warning: 
[deprecation] download(boolean,Bounds,ProgressMonitor) in DownloadOsmTask 
has been deprecated
    [javac]             final Future<?> future = task.download(false, area, 
null);
    [javac]                                          ^
    [javac] 3 warnings





I'm not sure how to fix it yet, but will try.




Regards,
Marián
---------- Původní e-mail ----------
Od: Marián Kyral <mkyral at email.cz>
Komu: josm-dev at openstreetmap.org
Datum: 18. 7. 2018 8:24:42
Předmět: DownloadOsmTask - the zoomAfterDownload parameter does not work 
" 
Hi, 

I'm not sure if this is a bug in Tracer-testing plugin or regression in 
Josm. 





In new Tracer (Tracer-testing) we are using Download action to automatically

download area around clicked point if needed. 



public final class DownloadOsmMissingAreaTask extends DownloadOsmTask { 

    @Override 
    public Future<?> download(OsmServerReader reader, boolean newLayer, 
Bounds downloadArea, ProgressMonitor progressMonitor) { 
        return download(new DownloadMissingAreaTask(newLayer, reader, 
progressMonitor), downloadArea); 
    } 

    protected class DownloadMissingAreaTask extends DownloadOsmTask. 
DownloadTask { 
        public DownloadMissingAreaTask(boolean newLayer, OsmServerReader 
reader, ProgressMonitor progressMonitor) { 
            super(newLayer, reader, progressMonitor, false); // do not 
center and scale to downloaded area 
        } 
    } 
} 




https://github.com/mkyral/josm-tracer/blob/development/src/org/ 
openstreetmap/josm/plugins/tracer/DownloadOsmMissingAreaTask.java 




It worked well, but in current Josm, the "zoomAfterDownload" parameter has 
no effect. The zoom always change to downloaded area. 

I'm investigating this issue, but I'm not not sure, what is wrong. 




What do you think? 




Thanks, 

Marián 
"


More information about the josm-dev mailing list