Changeset 12335 in osm for applications/editors/josm/plugins/wmsplugin/src
- Timestamp:
- 2008-12-13T20:17:21+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java
r12331 r12335 24 24 import org.openstreetmap.josm.gui.IconToggleButton; 25 25 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 26 import org.openstreetmap.josm.io.MirroredInputStream; 26 27 import org.openstreetmap.josm.actions.JosmAction; 27 28 import org.openstreetmap.josm.data.Bounds; … … 104 105 wmsList.add(new WMSInfo(name, url, prefid)); 105 106 } 106 setDefault(true, tr("Landsat"), 107 "http://onearth.jpl.nasa.gov/wms.cgi?request=GetMap&"+ 108 "layers=global_mosaic&styles=&srs=EPSG:4326&format=image/jpeg"); 109 setDefault(true, tr("Open Aerial Map"), 110 "http://openaerialmap.org/wms/?VERSION=1.0&request=GetMap"+ 111 "&layers=world&styles=&srs=EPSG:4326&format=image/jpeg"); 112 setDefault(true, tr("NPE Maps"), 113 "http://nick.dev.openstreetmap.org/openpaths/freemap.php?layers=npe"); 114 setDefault(false, tr("YAHOO (GNOME)"), 115 "yahoo://gnome-web-photo --mode=photo --format=png {0} /dev/stdout"); 116 setDefault(false, tr("YAHOO (GNOME Fix)"), 117 "yahoo://gnome-web-photo-fixed {0}"); 118 setDefault(true, tr("YAHOO (WebKit)"), 119 "yahoo://webkit-image {0}"); 120 setDefault(false, tr("YAHOO (WebKit GTK)"), 121 "yahoo://webkit-image-gtk {0}"); 122 setDefault(false, tr("Oberpfalz Geofabrik.de"), 123 "http://oberpfalz.geofabrik.de/wms4josm?"); 107 String source = "http://svn.openstreetmap.org/applications/editors/josm/plugins/wmsplugin/sources.cfg"; 108 try 109 { 110 MirroredInputStream s = new MirroredInputStream(source, 111 Main.pref.getPreferencesDir() + "plugins/wmsplugin/", -1); 112 InputStreamReader r; 113 try 114 { 115 r = new InputStreamReader(s, "UTF-8"); 116 } 117 catch (UnsupportedEncodingException e) 118 { 119 r = new InputStreamReader(s); 120 } 121 BufferedReader reader = new BufferedReader(r); 122 String line; 123 while((line = reader.readLine()) != null) 124 { 125 String val[] = line.split(";"); 126 if(!line.startsWith("#") && val.length == 3) 127 setDefault("true".equals(val[0]), tr(val[1]), val[2]); 128 } 129 } 130 catch (IOException e) 131 { 132 } 124 133 125 134 Collections.sort(wmsList);
Note:
See TracChangeset
for help on using the changeset viewer.