Last change
on this file since 6032 was 6032, checked in by Don-vip, 11 years ago |
see #8809 - Add Help button to "open location" error dialog + javadoc fixes in download tasks
|
File size:
900 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.actions.downloadtasks;
|
---|
3 |
|
---|
4 | import java.util.concurrent.Future;
|
---|
5 |
|
---|
6 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
7 |
|
---|
8 | import org.openstreetmap.josm.gui.progress.ProgressMonitor;
|
---|
9 | import org.openstreetmap.josm.tools.OsmUrlToBounds;
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * Task allowing to download an OSM url containing coordinates
|
---|
13 | * @since 4996
|
---|
14 | */
|
---|
15 | public class DownloadOsmUrlTask extends DownloadOsmTask {
|
---|
16 |
|
---|
17 | @Override
|
---|
18 | public Future<?> loadUrl(boolean newLayer, String url, ProgressMonitor progressMonitor) {
|
---|
19 | return download(newLayer, OsmUrlToBounds.parse(url), null);
|
---|
20 | }
|
---|
21 |
|
---|
22 | @Override
|
---|
23 | public String[] getPatterns() {
|
---|
24 | return new String[]{"http://www\\.openstreetmap\\.org/\\?lat=.*&lon=.*"};
|
---|
25 | }
|
---|
26 |
|
---|
27 | @Override
|
---|
28 | public String getTitle() {
|
---|
29 | return tr("Download OSM URL");
|
---|
30 | }
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.