Ignore:
Timestamp:
2008-02-07T04:54:29+01:00 (17 years ago)
Author:
jrreid
Message:

Update lakewalker to have a preference for the WMS layer to use

Location:
applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java

    r5979 r6789  
    101101    target += " --tilesize=" + Main.pref.get(LakewalkerPreferences.PREF_LANDSAT_SIZE, "2000");
    102102    target += " --startdir=" + Main.pref.get(LakewalkerPreferences.PREF_START_DIR, "east");
     103    target += " --wms=" + Main.pref.get(LakewalkerPreferences.PREF_WMS, "IR1");   
    103104    target += " --josm";
    104105   
  • applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java

    r6127 r6789  
    1515  public static final String[] DIRECTIONS = new String[] {"east", "northeast", "north", "northwest", "west", "southwest", "south", "southeast"};
    1616  public static final String[] WAYTYPES = new String[] {"water", "coastline", "land", "none"};
     17  public static final String[] WMSLAYERS = new String[] {"IR1", "IR2", "IR3"};
    1718
    1819  public static final String PREF_PYTHON = "lakewalker.python";
     
    2728  public static final String PREF_START_DIR = "lakewalker.startdir";
    2829  public static final String PREF_WAYTYPE = "lakewalker.waytype";
     30  public static final String PREF_WMS = "lakewalker.wms";
    2931   
    3032  protected StringConfigurer pythonConfig = new StringConfigurer();
     
    5052  protected StringEnumConfigurer lakeTypeConfig = new StringEnumConfigurer(WAYTYPES);
    5153  protected JLabel lakeTypeLabel = new JLabel(tr("Tag ways as"));
     54  protected StringEnumConfigurer wmsConfig = new StringEnumConfigurer(WMSLAYERS);
     55  protected JLabel wmsLabel = new JLabel(tr("WMS Layer"));
    5256 
    5357  public void addGui(PreferenceDialog gui) {
     
    6367    startDirConfig.setToolTipText(tr("Direction to search for land. Default east."));
    6468    lakeTypeConfig.setToolTipText(tr("Tag ways as water, coastline, land or nothing. Default is water."));
     69    wmsConfig.setToolTipText(tr("Which WMS layer to use for tracing against. Default is IR1."));
    6570
    6671    String description = tr("An interlude to the Lakewalker Python module to trace water bodies on Landsat imagery.<br><br>Version: {0}", LakewalkerPlugin.VERSION);
     
    7984    startDirConfig.setValue(Main.pref.get(PREF_START_DIR, "east"));
    8085    lakeTypeConfig.setValue(Main.pref.get(PREF_WAYTYPE, "water"));
     86    wmsConfig.setValue(Main.pref.get(PREF_WMS, "IR1"));
    8187  }
    8288 
     
    107113    prefPanel.add(lakeTypeLabel, labelConstraints);
    108114    prefPanel.add(lakeTypeConfig.getControls(), dataConstraints);
     115    prefPanel.add(wmsLabel, labelConstraints);
     116    prefPanel.add(wmsConfig.getControls(), dataConstraints);
    109117  }
    110118
     
    124132    Main.pref.put(PREF_START_DIR, startDirConfig.getValueString());
    125133    Main.pref.put(PREF_WAYTYPE, lakeTypeConfig.getValueString());
     134    Main.pref.put(PREF_WMS, wmsConfig.getValueString());
    126135  }
    127136 
Note: See TracChangeset for help on using the changeset viewer.