DownloadOsmTask - the zoomAfterDownload parameter does not work

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

DownloadOsmTask - the zoomAfterDownload parameter does not work

Marián Kyral

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
Reply | Threaded
Open this post in threaded view
|

Re: DownloadOsmTask - the zoomAfterDownload parameter does not work

Marián Kyral

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 <[hidden email]>
Komu: [hidden email]
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
"
Reply | Threaded
Open this post in threaded view
|

Re: DownloadOsmTask - the zoomAfterDownload parameter does not work

Marián Kyral

Fixed in https://github.com/mkyral/josm-tracer/commit/17fcab50509cf8fb37cf
7798b6558ed6fc334e7e




Sorry for disturbing ;-)




Marián




---------- Původní e-mail ----------
Od: Marián Kyral <[hidden email]>
Komu: [hidden email]
Datum: 18. 7. 2018 8:40:05
Předmět: Re: DownloadOsmTask - the zoomAfterDownload parameter does not work

"
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/29c7baa5cc67150685293607ce0
dcee2eeccf2b8?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 <[hidden email]>
Komu: [hidden email]
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
"
"