source: osm/applications/editors/josm/plugins/wmsplugin/src/wmsplugin/NPE_WMSmenuAction.java@ 6775

Last change on this file since 6775 was 6775, checked in by gabriel, 17 years ago

wmsplugin: Remove executable bits from source files.

File size: 1.1 KB
Line 
1package wmsplugin;
2
3import java.awt.event.ActionEvent;
4
5import javax.swing.AbstractAction;
6
7import javax.swing.JOptionPane;
8
9import org.openstreetmap.josm.Main;
10
11
12public class NPE_WMSmenuAction extends AbstractAction {
13
14 /**
15 *
16 */
17
18
19 public NPE_WMSmenuAction() {
20 super("Use NPE maps");
21
22 }
23
24 public void actionPerformed(ActionEvent e) {
25
26 /*String npeURL = (" http://www.getmapping.com/iedirectimage/getmappingwms.aspx?"+
27 "srs=EPSG:27700&Service=WMS&Version=1.1.0&"+
28 "Request=GetMap&format=image/jpeg&layers=npeoocmap");*/
29
30 String npeURL = ("http://nick.dev.openstreetmap.org/openpaths/freemap.php?layers=npe&");
31
32
33
34 Main.pref.put("wmsplugin.url", npeURL);
35
36 JOptionPane.showMessageDialog(null, "WMS set to New Public Edition.");
37
38 //need to reset the particular download task
39 //DownloadWMSTask
40
41 for (int i = 0; i < Main.main.menu.download.dialog.downloadTasks.size(); ++i) {
42
43 if (Main.main.menu.download.dialog.downloadTasks.get(i).getPreferencesSuffix().compareTo("wmsplugin") == 0){
44
45 Main.main.menu.download.dialog.downloadTasks.remove(i);
46 }
47 }
48
49
50
51 }
52}
Note: See TracBrowser for help on using the repository browser.