Last change
on this file since 11063 was 10630, checked in by simon04, 8 years ago |
fix #13201 - Support Geo URLs on command line and open location
|
File size:
886 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.actions.downloadtasks;
|
---|
3 |
|
---|
4 | import org.openstreetmap.josm.gui.progress.ProgressMonitor;
|
---|
5 | import org.openstreetmap.josm.tools.GeoUrlToBounds;
|
---|
6 |
|
---|
7 | import java.util.concurrent.Future;
|
---|
8 |
|
---|
9 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * Task allowing to download a Geo URL (as specified in <a href="https://tools.ietf.org/html/rfc5870">RFC 5870</a>).
|
---|
13 | */
|
---|
14 | public class DownloadGeoUrlTask extends DownloadOsmTask {
|
---|
15 |
|
---|
16 | @Override
|
---|
17 | public Future<?> loadUrl(boolean newLayer, String url, ProgressMonitor progressMonitor) {
|
---|
18 | return download(newLayer, GeoUrlToBounds.parse(url), null);
|
---|
19 | }
|
---|
20 |
|
---|
21 | @Override
|
---|
22 | public String[] getPatterns() {
|
---|
23 | return new String[]{GeoUrlToBounds.PATTERN.toString()};
|
---|
24 | }
|
---|
25 |
|
---|
26 | @Override
|
---|
27 | public String getTitle() {
|
---|
28 | return tr("Download Geo URL");
|
---|
29 | }
|
---|
30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.